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
OCPBUGS-16035: daemon: create /etc/systemd/network directory on node #3883
Conversation
@sinnykumari: This pull request references Jira Issue OCPBUGS-16035, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
Requesting review from QA contact: The bug has been updated to refer to the pull request using the external bug tracker. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
pkg/daemon/update.go
Outdated
@@ -1764,6 +1764,27 @@ func fileExists(path string) (bool, error) { | |||
return false, fmt.Errorf("cannot stat file: %w", err) | |||
} | |||
|
|||
// Determines if a directory exists by checking the returned error when we stat the file. | |||
// Also, check that it is a directory. | |||
func directoryExists(path string) (bool, error) { |
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.
I'm not objecting to this, but I don't personally think it's worth carrying over just using os.MkdirAll()
from the standard library like we do in other places (a lot of other places really).
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.
good point, doing all these additional check isn't adding much value. Replaced with using MkdirAll()
OCPBUGS-16035: On some system, nmstatectl fails to persists nic due to missing /etc/systemd/network. Until we use fixed version of nmstate in MCO, this workaround will ensure that the process happens successfully.
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cgwalters, sinnykumari The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Putting hold for qe testing |
@sinnykumari: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Verified using UPI on AWS We don't have an environment to reproduce the original problem. After talking with @sinnykumari we executed the following verification steps.
Note that this fix only works when the host OS is RHEL8. If the directory is not present in a RHEL9 host OS then this fix will not create the directory before running the nmstatectl command. We can add the qe-approved label /label qe-approved |
Thanks Sergio! Removing hold as this is pre-merge tested |
046d218
into
openshift:master
@sinnykumari: Jira Issue OCPBUGS-16035: All pull requests linked via external trackers have merged: Jira Issue OCPBUGS-16035 has been moved to the MODIFIED state. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
OCPBUGS-16035: On some system, nmstatectl fails to persists nic due to missing /etc/systemd/network. Until we use fixed version of nmstate in MCO, this workaround will ensure that the process happens successfully.