Skip to content
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 1879099: Inject version into controllerconfig, refuse mismatches #2206

Merged

Conversation

cgwalters
Copy link
Member

Should fix: https://bugzilla.redhat.com/show_bug.cgi?id=1879099

Basically we only want to roll out new machineconfigs if
the controllerconfig (generated by the operator) and the
controller are at matching versions.

Per Jerry's comment in Bugzilla:

  1. The new MCO rolls out. It first syncs the controllerconfig to the new one as part of the RenderConfig step above.
  2. The running (old) MCC's template controller has an informer on the controllerconfig, which since the previous step updated the config, calls a syncControllerConfig. This re-generates the base master config (00-master MC)
  3. The running (old) MCC now sees a MC change which calls another sync call to generate a new rendered config, and instructs the master pool to start an update
  4. The new MCC rolls out, and does the whole rendering process, creating the actual updated MC for the master pool, which it waits until the previous one is finished, and starts the new (real) update.

After this patch, the old MCC will refuse to render from a controllerconfig generated by the new MCO.

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 5, 2020
@cgwalters
Copy link
Member Author

This is an alternative to #2112 that uses an annotation

@cgwalters cgwalters closed this Nov 5, 2020
@cgwalters cgwalters reopened this Nov 5, 2020
@cgwalters
Copy link
Member Author

So in this code I didn't actually adjust the version in the bootstrap path because that requires special casing the controllerconfig rendering there, and I'm not 100% sure it's required. (If it's not I'll delete the first hunk too)

@yuqi-zhang
Copy link
Contributor

hm, I did try using this on 4.5, and I get:

F1109 21:34:21.714659       1 bootstrap.go:47] error running MCC[BOOTSTRAP]: Ignoring controller config generated without machineconfiguration.openshift.io/generated-by-version annotation (my version: machine-config-daemon-4.5.0-202006231303.p0-55-gaaef53f0)

@cgwalters
Copy link
Member Author

OK tried to fix the bootstrap

@cgwalters cgwalters force-pushed the render-version-check2 branch 2 times, most recently from 8c2e3fa to 952c3a3 Compare November 12, 2020 01:01
@cgwalters
Copy link
Member Author

OK e2e-aws got a cluster up, this only failed on some test flakes.
/test e2e-aws
and e2e-gcp-op is also known broken for other reasons, this can't affect it.

@cgwalters cgwalters changed the title Inject version into controllerconfig, refuse mismatches Bug 1879099: Inject version into controllerconfig, refuse mismatches Nov 12, 2020
@openshift-ci-robot openshift-ci-robot added bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. labels Nov 12, 2020
@openshift-ci-robot
Copy link
Contributor

@cgwalters: This pull request references Bugzilla bug 1879099, which is valid. 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.7.0) matches configured target release for branch (4.7.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1879099: Inject version into controllerconfig, refuse mismatches

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.

@cgwalters
Copy link
Member Author

/test e2e-gcp-op

@runcom
Copy link
Member

runcom commented Nov 24, 2020

/retest

Should fix: https://bugzilla.redhat.com/show_bug.cgi?id=1879099

Basically we only want to roll out new machineconfigs if
the controllerconfig (generated by the operator) and the
controller are at matching versions.

Per Jerry's comment in Bugzilla:

> 1. The new MCO rolls out. It first syncs the controllerconfig to the new one as part of the RenderConfig step above.
> 2. The running (old) MCC's template controller has an informer on the controllerconfig, which since the previous step updated the config, calls a syncControllerConfig. This re-generates the base master config (00-master MC)
> 3. The running (old) MCC now sees a MC change which calls another sync call to generate a new rendered config, and instructs the master pool to start an update
> 4. The new MCC rolls out, and does the whole rendering process, creating the actual updated MC for the master pool, which it waits until the previous one is finished, and starts the new (real) update.

After this patch, the old MCC will refuse to render from a controllerconfig generated by the new MCO.
@runcom
Copy link
Member

runcom commented Nov 25, 2020

/approve
/lgtm
/retest

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cgwalters, runcom

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

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

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-merge-robot openshift-merge-robot merged commit 6531aac into openshift:master Nov 25, 2020
@openshift-ci-robot
Copy link
Contributor

@cgwalters: All pull requests linked via external trackers have merged:

Bugzilla bug 1879099 has been moved to the MODIFIED state.

In response to this:

Bug 1879099: Inject version into controllerconfig, refuse mismatches

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-merge-robot
Copy link
Contributor

@cgwalters: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/okd-e2e-aws 60c5ee2 link /test okd-e2e-aws

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.

@cgwalters
Copy link
Member Author

/cherrypick release-4.6

@openshift-cherrypick-robot

@cgwalters: new pull request created: #2257

In response to this:

/cherrypick release-4.6

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/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. 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. team-mco
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants