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
OCPBUGS-15941: ABI - Validate release image arch, add cpu_architectures to RELEASE_IMAGES #7349
OCPBUGS-15941: ABI - Validate release image arch, add cpu_architectures to RELEASE_IMAGES #7349
Conversation
@jeffdyoung: This pull request references Jira Issue OCPBUGS-15941, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. In 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. |
This will also undo the work done in #7276 |
6fa6e96
to
3e652af
Compare
/retest |
1 similar comment
/retest |
/assign @zaneb |
28d52c4
to
10647b2
Compare
/retest |
3 similar comments
/retest |
/retest |
/retest |
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.
PTAL
cmd/openshift-install/testdata/agent/image/validations/sno_invalid_arch.txt
Outdated
Show resolved
Hide resolved
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.
Minor changes
007a4de
to
4526e8f
Compare
/retest-required |
cmd/openshift-install/testdata/agent/image/validations/sno_invalid_arch.txt
Outdated
Show resolved
Hide resolved
3603937
to
5fd1791
Compare
@@ -33,6 +33,7 @@ func releaseImageFromPullSpec(pullSpec, arch string) (releaseImage, error) { | |||
return releaseImage{ | |||
ReleaseVersion: versionString, | |||
Arch: arch, | |||
Archs: archs, |
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.
@jeffdyoung this point it's not clear to me. What's the requirement to have separate fields Archs
and Arch
? Would make sense to have just one field Archs
to cover all the cases?
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 it's just because Archs
was added later.
openshift/assisted-service#4248
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 like we'll need both for now:
level=fatal msg="failed to create Versions handlers" func=main.main.func1 file="/src/cmd/main.go:237" error="Missing value in ReleaseImage for 'cpu_architecture' field"
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.
This isn't an exhaustive list, but I see both used in various parts of the assisted-service:
https://github.com/openshift/assisted-service/blob/master/models/infra_env.go#L39
https://github.com/openshift/assisted-service/blob/master/models/infra_env_create_params.go#L40
https://github.com/openshift/assisted-service/blob/master/models/os_image.go#L26
https://github.com/openshift/assisted-service/blob/master/models/release_image.go#L27-L30
https://github.com/openshift/assisted-service/blob/master/models/openshift_version.go#L25
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.
This would be easier to review (and faster to re-review) if the logically separate changes were in separate commits. I can see at least these 5 logical changes:
- Use more realistic pull secret in unit tests
- Refactor execute() function to not do arg splitting
- Move execute() function to a common location
- Support multi-arch payload in releaseImage data
- Validate release arch when possible
@@ -33,6 +33,7 @@ func releaseImageFromPullSpec(pullSpec, arch string) (releaseImage, error) { | |||
return releaseImage{ | |||
ReleaseVersion: versionString, | |||
Arch: arch, | |||
Archs: archs, |
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 it's just because Archs
was added later.
openshift/assisted-service#4248
pullSpec, | ||
templateFilter, | ||
} | ||
releaseArch, err := ExecuteOC(pullSecret, getReleaseArch) |
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.
This is ok for this PR, but particularly with the heterogeneous cluster support coming in I'd like to see a follow-up switching to direct docker client calls as suggested in #7349 (comment).
I think validation of the release payload arch is going to be critical for heterogeneous clusters in particular.
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.
@zaneb I agree, that something* needs to be done to validate the release image(s) for all IPI/assisted/agent installs. Not sure how that suggestion will work with sparse manifest list? But yeah, want to figure this out for heterogeneous in future releases.
acf3aa3
to
2f8fdaf
Compare
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.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: zaneb 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 |
d1402b7
to
0fca7bb
Compare
0fca7bb
to
19f298a
Compare
/retest |
4 similar comments
/retest |
/retest |
/retest |
/retest |
/retest |
2 similar comments
/retest |
/retest |
/lgtm |
@jeffdyoung: The following tests failed, say
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. |
8710137
into
openshift:master
@jeffdyoung: Jira Issue OCPBUGS-15941: All pull requests linked via external trackers have merged: Jira Issue OCPBUGS-15941 has been moved to the MODIFIED state. In 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 openshift-eng/jira-lifecycle-plugin repository. |
Adding additional validation to check that the release payload architecture matches the cluster's architecture.
Also fixes OCPBUGS-27787 - single arch ABI installs w/multi payload, adding
cpu_architectures
to RELEASE_IMAGESRELEASE_IMAGES:
Single arch -
Multi -