-
Notifications
You must be signed in to change notification settings - Fork 462
Bug 1821888: controller: do not error on empty Ignition configs #1631
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
Bug 1821888: controller: do not error on empty Ignition configs #1631
Conversation
|
@yuqi-zhang: This pull request references Bugzilla bug 1821888, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
DetailsIn 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. |
|
Right now any machineconfig we apply, during or after bootstrap, without an ignition section fails since the parse errors with a nil ignition config |
With the introduction of rawExtension for Ignition config objects via openshift#996, we also now use ignition.Parse directly to process the validity of ignition configs. This will cause machineconfigs without a Ignition section to fail, which we don't want. Also modify some error messages for clarity. Signed-off-by: Yu Qi Zhang <jerzhang@redhat.com>
b3f391d to
823c298
Compare
|
There are also other locations where we introduced ign.Parse directly but those paths shouldn't be affected like this |
ashcrow
left a comment
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.
Looks good. Since we do the check and shuffle a few times it may make sense to make that part a function to reuse in the future.
LorbusChris
left a comment
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.
looks sensible
|
/test e2e-gcp-rt-4.5 I wonder if this works... |
|
Can we add a test for these types of configs to our e2e? If this is a valid config, then adding the test to be a POC of this PR and as insurance would be good. |
|
Will take a look at adding a test to catch this regression. Alternatively I can also modify existing tests to have empty ignition sections to catch this |
If I'm understanding correctly, you should be able to just mod this test and remove igncfg, no? machine-config-operator/test/e2e/mcd_test.go Line 229 in 219a942
|
|
Discussed with Kirsten, the test is harder to fix than that because: Today our tests uses this clientset function to create a machineconfig to post to the server: https://github.com/openshift/machine-config-operator/blob/master/pkg/generated/clientset/versioned/typed/machineconfiguration.openshift.io/v1/machineconfig.go#L90 So for now we can merge this PR (I manually tested on GCP to fix). I will open another ticket regarding the test discrepancy |
|
I'm swamped.. Can someone else test this pre-merge? |
|
im spinning up cluster just in case.. |
|
/retest |
|
/hold cancel |
kikisdeliveryservice
left a comment
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.
verified
/lgtm
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ashcrow, kikisdeliveryservice, LorbusChris, yuqi-zhang The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/test e2e-gcp-upgrade |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
I took a look a the gcp-upgrade failure was unrelated to this PR. Will just have to retest.. |
|
No degraded pools or errors in mc* logs. Will just let retest bot handle this |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
2 similar comments
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
@yuqi-zhang: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. DetailsInstructions 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. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
@yuqi-zhang: All pull requests linked via external trackers have merged: openshift/machine-config-operator#1631. Bugzilla bug 1821888 has been moved to the MODIFIED state. DetailsIn 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. |
With the introduction of rawExtension for Ignition config objects
via #996,
we also now use ignition.Parse directly to process the validity of
ignition configs. This will cause machineconfigs without a Ignition
section to fail, which we don't want.
Also modify some error messages for clarity.
Signed-off-by: Yu Qi Zhang jerzhang@redhat.com