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

[mcbs] Validate rpm-ostree version is new enough #2859

Conversation

cgwalters
Copy link
Member

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)

@@ -100,6 +115,43 @@ func (r *RpmOstreeClient) loadStatus() (*rpmOstreeState, error) {
return &rosState, nil
}

func parseVer(s string) ([]int, error) {
Copy link
Member Author

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

Copy link
Contributor

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. ;)

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.

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"
Copy link
Contributor

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?

Copy link
Member Author

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

makes sense to me!

@cgwalters
Copy link
Member Author

Capacity issues
/test e2e-aws

@cgwalters
Copy link
Member Author

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.

@cgwalters cgwalters force-pushed the mcbs-validate-rpm-ostree-version branch from 089e5d5 to f8eaea8 Compare December 3, 2021 20:30
@cgwalters
Copy link
Member Author

Oh right, in fact duh - we can't do this check during node join, because my test payload didn't override the boot images.

@cgwalters
Copy link
Member Author

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)
@cgwalters cgwalters force-pushed the mcbs-validate-rpm-ostree-version branch from f8eaea8 to fd864d6 Compare December 6, 2021 23:18
@cgwalters
Copy link
Member Author

OK rebased 🏄 now that #2860 merged

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 8, 2021
@sinnykumari
Copy link
Contributor

/lgtm

@sinnykumari
Copy link
Contributor

Don't know what's wrong with the tide. retrying lgtm
/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 8, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 8, 2021

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

@sinnykumari
Copy link
Contributor

/retest

@openshift-bot
Copy link
Contributor

/retest-required

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

4 similar comments
@openshift-bot
Copy link
Contributor

/retest-required

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

@openshift-bot
Copy link
Contributor

/retest-required

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

@openshift-bot
Copy link
Contributor

/retest-required

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

@openshift-bot
Copy link
Contributor

/retest-required

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

@openshift-merge-robot openshift-merge-robot merged commit c9de8ff into openshift:mcbs Dec 9, 2021
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. layering lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants