-
Notifications
You must be signed in to change notification settings - Fork 413
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
[mcbs] Validate rpm-ostree version is new enough #2859
[mcbs] Validate rpm-ostree version is new enough #2859
Conversation
@@ -100,6 +115,43 @@ func (r *RpmOstreeClient) loadStatus() (*rpmOstreeState, error) { | |||
return &rosState, nil | |||
} | |||
|
|||
func parseVer(s string) ([]int, 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.
Rust has totally spoiled me. I find it soooo hard to write code like this. In Rust it's just that simple and elegant: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=3709150890266cfee1f09a35c1f7391f
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.
colin we're not rewriting openshift in rust. at least... not yet. ;)
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.
just a question =)
@@ -20,8 +22,21 @@ const ( | |||
numRetriesNetCommands = 5 | |||
// Pull secret. Written by the machine-config-operator | |||
kubeletAuthFile = "/var/lib/kubelet/config.json" | |||
|
|||
// rpmOstreeVersionMinimum is the minimum required version | |||
rpmOstreeVersionMinimum = "2021.14" |
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.
nice idea for sanity check (aside from immediate mcbs use) 1 q from that pov: would hardcoding directly in file might make it go stale over time? how often would we expect this to change?
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 think we wouldn't change this too often. In practice, we'll just know out of band when we're using a new feature - it'll have landed in rhel 8.z or fast tracked into OCP.
I honestly don't have a really strong opinion on actually merging this patch. We can drop it too when we look at merging the mcbs branch.
But for now it'll be a sanity check.
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.
makes sense to me!
Capacity issues |
Hmm. The gcp-op failure looks much like node join failure. We really need coreos/ignition#585 Short term, I'll try moving this to be daemonset only, so we can more easily see failures. |
089e5d5
to
f8eaea8
Compare
Oh right, in fact duh - we can't do this check during node join, because my test payload didn't override the boot images. |
But actually, in order for this to be really useful I'm now realizing we really will want it on the boot images. But doing that escalates the level of difficulty, since it's harder to upload and manage e.g. GCP and AWS images than it is to just ship a container image. Hmm. Or...we accept a short term hack where we either double reboot, or we pull the machine-os-content, then live-apply to get the new rpm-ostree, then rebase again from there. |
This is *mainly* to validate that openshift/release#24225 worked. But, this code may be useful as a sanity check going forward. See also coreos/rpm-ostree#3251 (I also may try to expose e.g. `ex-container` as a feature flag that we can query instead of version-parsing)
f8eaea8
to
fd864d6
Compare
OK rebased 🏄 now that #2860 merged |
/lgtm |
Don't know what's wrong with the tide. retrying 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 |
/retest |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
4 similar comments
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
This is mainly to validate that
openshift/release#24225
worked.
But, this code may be useful as a sanity check going forward.
See also coreos/rpm-ostree#3251
(I also may try to expose e.g.
ex-container
as a feature flagthat we can query instead of version-parsing)