Skip to content

Conversation

@yuqi-zhang
Copy link
Contributor

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

@openshift-ci-robot
Copy link
Contributor

@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
  • bug is open, matching expected state (open)
  • bug target release (4.5.0) matches configured target release for branch (4.5.0)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)
Details

In response to this:

Bug 1821888: controller: do not error on empty Ignition configs

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.

@openshift-ci-robot openshift-ci-robot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Apr 8, 2020
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 8, 2020
@yuqi-zhang yuqi-zhang requested review from LorbusChris and removed request for mtrmac and umohnani8 April 8, 2020 15:37
@yuqi-zhang
Copy link
Contributor Author

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>
@yuqi-zhang
Copy link
Contributor Author

There are also other locations where we introduced ign.Parse directly but those paths shouldn't be affected like this

Copy link
Member

@ashcrow ashcrow left a 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.

Copy link
Contributor

@LorbusChris LorbusChris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks sensible

@yuqi-zhang
Copy link
Contributor Author

/test e2e-gcp-rt-4.5

I wonder if this works...

@kikisdeliveryservice
Copy link
Contributor

kikisdeliveryservice commented Apr 8, 2020

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.

@yuqi-zhang
Copy link
Contributor Author

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

@kikisdeliveryservice
Copy link
Contributor

kikisdeliveryservice commented Apr 8, 2020

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?

func TestKernelType(t *testing.T) {

@yuqi-zhang
Copy link
Contributor Author

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
this requires a NON-EMPTY config (ignition) section, e.g. what we do here: https://github.com/openshift/machine-config-operator/blob/master/test/e2e/mcd_test.go#L243 which creates a ignition section with just version field. User applications of empty configs sections, however, is perfectly fine. So until we modify that behaviour we are stuck unable to test this case.

So for now we can merge this PR (I manually tested on GCP to fix). I will open another ticket regarding the test discrepancy

@kikisdeliveryservice
Copy link
Contributor

I'm swamped.. Can someone else test this pre-merge?

@kikisdeliveryservice
Copy link
Contributor

im spinning up cluster just in case..
hold to verify
/hold

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 8, 2020
@yuqi-zhang
Copy link
Contributor Author

/retest

@kikisdeliveryservice
Copy link
Contributor

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 8, 2020
Copy link
Contributor

@kikisdeliveryservice kikisdeliveryservice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

verified

/lgtm

@kikisdeliveryservice kikisdeliveryservice added the lgtm Indicates that a PR is ready to be merged. label Apr 8, 2020
@openshift-ci-robot
Copy link
Contributor

[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

Details Needs approval from an approver in each of these files:
  • OWNERS [ashcrow,kikisdeliveryservice,yuqi-zhang]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@yuqi-zhang
Copy link
Contributor Author

/test e2e-gcp-upgrade

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@kikisdeliveryservice
Copy link
Contributor

kikisdeliveryservice commented Apr 8, 2020

I took a look a the gcp-upgrade failure was unrelated to this PR. Will just have to retest..

@kikisdeliveryservice
Copy link
Contributor

No degraded pools or errors in mc* logs.

Will just let retest bot handle this

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

2 similar comments
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Apr 9, 2020

@yuqi-zhang: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/e2e-aws-scaleup-rhel7 823c298 link /test e2e-aws-scaleup-rhel7

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.

Details

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.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit 04c69c5 into openshift:master Apr 9, 2020
@openshift-ci-robot
Copy link
Contributor

@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.

Details

In response to this:

Bug 1821888: controller: do not error on empty Ignition configs

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants