-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure CNI dir exists before writing openshift CNI configuration under CNI dir #15064
Ensure CNI dir exists before writing openshift CNI configuration under CNI dir #15064
Conversation
@openshift/networking @dcbw PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM otherwise
pkg/sdn/plugin/node.go
Outdated
@@ -326,13 +332,17 @@ func (node *OsdnNode) Start() error { | |||
} | |||
} | |||
|
|||
if err := os.MkdirAll(CNI_DIR_PATH, os.ModePerm); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FileMode could be 0755 maybe?
aab5ed7
to
4de16b6
Compare
[test] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
pkg/sdn/plugin/node.go
Outdated
@@ -38,6 +39,11 @@ import ( | |||
kexec "k8s.io/kubernetes/pkg/util/exec" | |||
) | |||
|
|||
const ( | |||
CNI_DIR_PATH = "/etc/cni/net.d" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't do constants like this - if this is only used in this package, should be camelCase
…r CNI dir Found this issue on RHEL containerized openshift install.
4de16b6
to
23368fb
Compare
Changed constants to |
[test] |
Evaluated for origin test up to 23368fb |
continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_request_origin/3096/) (Base Commit: c52694b) (PR Branch Commit: 23368fb) |
Found this issue on RHEL containerized openshift install.
Fixes: #14661
Fixes: #15147