-
Notifications
You must be signed in to change notification settings - Fork 457
OCPBUGS-54872: Make sure generation fields in MCN do not have a value of 0 #4982
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-54872: Make sure generation fields in MCN do not have a value of 0 #4982
Conversation
|
Skipping CI for Draft Pull Request. |
|
@isabella-janssen: This pull request references Jira Issue OCPBUGS-54872, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
Requesting review from QA contact: 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 openshift-eng/jira-lifecycle-plugin repository. |
c434a93 to
34e6c9c
Compare
|
@isabella-janssen: This pull request references Jira Issue OCPBUGS-54872, which is valid. 3 validation(s) were run on this bug
Requesting review from QA contact: 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 openshift-eng/jira-lifecycle-plugin repository. |
ed4e1a9 to
0656eb0
Compare
|
Pre-merge verified:
$ oc describe machineconfignodes ip-10-0-15-48.us-east-2.compute.internal | tail -n 10
Last Transition Time: 2025-04-11T05:00:14Z
Message: All is good
Reason: AsExpected
Status: False
Type: PinnedImageSetsDegraded
Config Version:
Current: rendered-master-48ea8c8dd98876f60b585a16ada3d0db
Desired: rendered-master-48ea8c8dd98876f60b585a16ada3d0db
Observed Generation: 5
Events:
$ oc describe machineconfignodes ip-10-0-69-189.us-east-2.compute.internal | tail -n 10
Last Transition Time: 2025-04-11T05:01:47Z
Message: All is good
Reason: AsExpected
Status: False
Type: PinnedImageSetsDegraded
Config Version:
Current: rendered-worker-2ab2379ed6bbc6fbffbe53ffacc2de00
Desired: rendered-worker-2ab2379ed6bbc6fbffbe53ffacc2de00
Observed Generation: 4
Events:
$ oc get machineconfignode ip-10-0-15-48.us-east-2.compute.internal -o yaml | tail -n 10
type: Uncordoned
- lastTransitionTime: "2025-04-11T05:00:14Z"
message: All is good
reason: AsExpected
status: "False"
type: PinnedImageSetsDegraded
configVersion:
current: rendered-master-48ea8c8dd98876f60b585a16ada3d0db
desired: rendered-master-475d88e145caaa28698a83b8a5a00bdf
observedGeneration: 6
$ oc get machineconfignode ip-10-0-69-189.us-east-2.compute.internal -o yaml| tail -n 10
type: Uncordoned
- lastTransitionTime: "2025-04-11T07:46:02Z"
message: All is good
reason: AsExpected
status: "False"
type: PinnedImageSetsDegraded
configVersion:
current: rendered-worker-dcfc7ccdb9b4b89247cedd00091124a6
desired: rendered-worker-dcfc7ccdb9b4b89247cedd00091124a6
observedGeneration: 5
Exampleoc create -f - << EOF
apiVersion: machineconfiguration.openshift.io/v1
kind: PinnedImageSet
metadata:
labels:
machineconfiguration.openshift.io/role: worker
name: tc-80334-worker-pinned-images
spec:
pinnedImages:
- name: "quay.io/openshifttest/busybox@sha256:0415f56ccc05526f2af5a7ae8654baec97d4a614f24736e8eef41a4591f08019"
- name: quay.io/openshifttest/alpine@sha256:be92b18a369e989a6e86ac840b7f23ce0052467de551b064796d67280dfa06d5
EOF
pinnedimageset.machineconfiguration.openshift.io/tc-80334-worker-pinned-images created
$ oc describe machineconfignodes ip-10-0-64-82.us-east-2.compute.internal | tail -n 10
....
Type: PinnedImageSetsDegraded
Config Version:
Current: rendered-worker-dcfc7ccdb9b4b89247cedd00091124a6
Desired: rendered-worker-dcfc7ccdb9b4b89247cedd00091124a6
Observed Generation: 3
Pinned Image Sets:
Current Generation: 1
Desired Generation: 1
Name: tc-80334-worker-pinned-images
Events:
- Applied the invalid PIS
Exampleoc create -f - << EOF
apiVersion: machineconfiguration.openshift.io/v1
kind: PinnedImageSet
metadata:
labels:
machineconfiguration.openshift.io/role: worker
name: pinned-bad-image-tc-73361
spec:
pinnedImages:
- name: "quay.io/openshiftfake/fakeimage@sha256:0415f56ccc05526f2af5a7ae8654baec97d4a614f24736e8eef41a4591f08019"
EOF
pinnedimageset.machineconfiguration.openshift.io/pinned-bad-image-tc-73361 created
$ oc describe machineconfignodes ip-10-0-64-82.us-east-2.compute.internal | tail -n 10
oc describe machineconfignodes ip-10-0-23-169.us-east-2.compute.internal | tail -n 10
Config Version:
Current: rendered-worker-dcfc7ccdb9b4b89247cedd00091124a6
Desired: rendered-worker-dcfc7ccdb9b4b89247cedd00091124a6
Observed Generation: 3
Pinned Image Sets:
Desired Generation: 1
Last Failed Generation: 1
Last Failed Generation Error: failed to execute podman manifest inspect for "quay.io/openshiftfake/fakeimage@sha256:0415f56ccc05526f2af5a7ae8654baec97d4a614f24736e8eef41a4591f08019": exit status 125
Name: pinned-bad-image-tc-73361
Events:
Adding QE approved label |
|
/lgtm Thanks for the fix! |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: djoshy, isabella-janssen 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-required |
|
@isabella-janssen: 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-sigs/prow repository. I understand the commands that are listed here. |
c7c2314
into
openshift:main
|
@isabella-janssen: Jira Issue OCPBUGS-54872: All pull requests linked via external trackers have merged: Jira Issue OCPBUGS-54872 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. |
|
[ART PR BUILD NOTIFIER] Distgit: ose-machine-config-operator |
Closes: OCPBUGS-54872
- What I did
This updates the part of
generateAndApplyMachineConfigNodesthat create's an MCN'sStatus.PinnedImageSetsobject to only setLastFailedGenerationto a real (non-default) value. This is needed due to a validation change being made for the V1 MCN API (ref).- How to verify it
What to look for:
a. MCN should transition through conditions.
b.
ObservedGenerationvalue should increment.c. Observed functionality should overall be consistent with before this change.
Example MC
apiVersion: machineconfiguration.openshift.io/v1 kind: MachineConfig metadata: labels: machineconfiguration.openshift.io/role: worker name: 99-worker-testfile spec: config: ignition: version: 3.2.0 storage: files: - contents: source: data:,hello%20world%0A mode: 420 path: /home/core/testa. Note that
LastFailedGenerationshould not report a value of0.Example Valid PIS
apiVersion: machineconfiguration.openshift.io/v1 kind: PinnedImageSet metadata: name: test-pinned labels: machineconfiguration.openshift.io/role: "worker" spec: pinnedImages: - name: quay.io/openshift-release-dev/ocp-release@sha256:513cf1028aa1a021fa73d0601427a0fbcf6d212b88aaf9d76d4e4841a061e44e - name: quay.io/openshift-release-dev/ocp-release@sha256:61eae2d261e54d1b8a0e05f6b5326228b00468364563745eed88460af04f909ba. Note that
LastFailedGenerationshould reflect that the PIS application has failed andLastFailedGenerationErrorshould be populated.Example Invalid PIS
apiVersion: machineconfiguration.openshift.io/v1 kind: PinnedImageSet metadata: name: test-pinned labels: machineconfiguration.openshift.io/role: "worker" spec: pinnedImages: - name: quay.io/rh-ee-ijanssen/machine-config-operator@sha256:65d3a308767b1773b6e3ead2ec1bcae499dde6ef085753d7e20e685f78841079 - name: quay.io/rh-ee-ijanssen/machine-config-operator@sha256:fd3692eff21338e900a244dfe62152c959b84d73f2dd4503893de0f3fae61b0b- Description for the changelog
OCPBUGS-54872: Make sure generation fields in MCN do not have a value of 0