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

OCPBUGS-23085: MCO duplicates kernel arguments during firstboot #4046

Merged
merged 1 commit into from Dec 13, 2023

Conversation

ori-amizur
Copy link
Contributor

During firstboot, if a kernel argument appears both in the boot command line and in the encapsulated machine config, this kernel argument is duplicated.
The reason for that is that current running configuration is not taken into account when updating the configuration before reboot. The solution is to use the current running configuration when updating during firstboot.
Fixes: OCPBUGS-23085

- What I did
Use the current running configuration when updating in firstboot.
- How to verify it
Add a kernel argument that appears also in the machine-config to firstboot, and see that it is not duplicated after reboot.
- Description for the changelog

Do not duplicate kernel arguments if they are present during firstboot

/cc @sinnykumari

@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Nov 26, 2023
@openshift-ci-robot
Copy link
Contributor

@ori-amizur: This pull request references Jira Issue OCPBUGS-23085, which is invalid:

  • expected the bug to target the "4.15.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

During firstboot, if a kernel argument appears both in the boot command line and in the encapsulated machine config, this kernel argument is duplicated.
The reason for that is that current running configuration is not taken into account when updating the configuration before reboot. The solution is to use the current running configuration when updating during firstboot.
Fixes: OCPBUGS-23085

- What I did
Use the current running configuration when updating in firstboot.
- How to verify it
Add a kernel argument that appears also in the machine-config to firstboot, and see that it is not duplicated after reboot.
- Description for the changelog

Do not duplicate kernel arguments if they are present during firstboot

/cc @sinnykumari

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.

@ori-amizur
Copy link
Contributor Author

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Nov 26, 2023
@openshift-ci-robot
Copy link
Contributor

@ori-amizur: This pull request references Jira Issue OCPBUGS-23085, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.15.0) matches configured target version for branch (4.15.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)

In response to this:

/jira refresh

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.

During firstboot, if a kernel argument appears both in the boot command
line and in the encapsulated machine config, this kernel argument is
duplicated.
The reason for that is that current running configuration is not taken into
account when updating the configuration before reboot.
The solution is to use the current running configuration when updating
during firstboot.
@ori-amizur
Copy link
Contributor Author

/retest

@ori-amizur
Copy link
Contributor Author

/test e2e-hypershift

@ori-amizur
Copy link
Contributor Author

/retest

@ori-amizur
Copy link
Contributor Author

/test e2e-hypershift

@rioliu-rh
Copy link

/hold for pre-merge testing if possible

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 30, 2023
@sergiordlr
Copy link

Pre-merge verified using SNO and the assisted installer.

Without the fix we were able to reproduce the problem configuring a "psi=1" kernel argument. We could see the duplicated kernel arg here:

$ cat /proc/cmdline 
BOOT_IMAGE=(hd0,gpt3)/ostree/rhcos-c5e81d34808e0eed7879f40b3d81087bbbfaa1425bad972fa159fdddec688c3c/vmlinuz-5.14.0-284.41.1.el9_2.x86_64 ignition.platform.id=metal ostree=/ostree/boot.0/rhcos/c5e81d34808e0eed7879f40b3d81087bbbfaa1425bad972fa159fdddec688c3c/0 psi=1 ip=ens3:dhcp root=UUID=d8e8a7d0-1273-4718-9078-9b75c6da7fc2 rw rootflags=prjquota boot=UUID=b7df50ac-05b0-4d4c-bd21-b0c577e1eb24 systemd.unified_cgroup_hierarchy=1 cgroup_no_v1=all psi=1

When we used the image with the fix we could see that the kernel argument was not duplicated anymore

$ cat /proc/cmdline 
BOOT_IMAGE=(hd0,gpt3)/ostree/rhcos-1cd772e18eae2dcd9c5b451650bd672deb228fcf104368fe0725bc5f77f313a5/vmlinuz-5.14.0-284.44.1.el9_2.x86_64 ignition.platform.id=metal ostree=/ostree/boot.0/rhcos/1cd772e18eae2dcd9c5b451650bd672deb228fcf104368fe0725bc5f77f313a5/0 ip=ens3:dhcp root=UUID=5701b4f3-92c7-4543-b1c6-e3265ae1328b rw rootflags=prjquota boot=UUID=6e1b8298-6035-4605-be58-f8c4a74c3d9a systemd.unified_cgroup_hierarchy=1 cgroup_no_v1=all psi=1

We can add the qe-approved label.
/label qe-approved

Thank you very much @ori-amizur for helping us and doing all the hard work in this verification process. I very much appreciate it. Thanks!!

@openshift-ci openshift-ci bot added the qe-approved Signifies that QE has signed off on this PR label Dec 11, 2023
@openshift-ci-robot openshift-ci-robot added jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. and removed jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Dec 11, 2023
@openshift-ci-robot
Copy link
Contributor

@ori-amizur: This pull request references Jira Issue OCPBUGS-23085, which is invalid:

  • expected the bug to target either version "4.16." or "openshift-4.16.", but it targets "4.15.0" instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

During firstboot, if a kernel argument appears both in the boot command line and in the encapsulated machine config, this kernel argument is duplicated.
The reason for that is that current running configuration is not taken into account when updating the configuration before reboot. The solution is to use the current running configuration when updating during firstboot.
Fixes: OCPBUGS-23085

- What I did
Use the current running configuration when updating in firstboot.
- How to verify it
Add a kernel argument that appears also in the machine-config to firstboot, and see that it is not duplicated after reboot.
- Description for the changelog

Do not duplicate kernel arguments if they are present during firstboot

/cc @sinnykumari

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.

@sinnykumari
Copy link
Contributor

/jira refresh
/approve
Will wait little bit to see if any other MCO team members have any concern.

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Dec 11, 2023
@openshift-ci-robot
Copy link
Contributor

@sinnykumari: This pull request references Jira Issue OCPBUGS-23085, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.16.0) matches configured target version for branch (4.16.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

In response to this:

/jira refresh
/approve
Will wait little bit to see if any other MCO team members have any concern.

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-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 11, 2023
@sinnykumari
Copy link
Contributor

Removing hold since qe testing has been done
/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 11, 2023
@cdoern
Copy link
Contributor

cdoern commented Dec 11, 2023

/lgtm
/approve

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

openshift-ci bot commented Dec 11, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cdoern, ori-amizur, 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

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 0229441 and 2 for PR HEAD dc8e0aa in total

@ori-amizur
Copy link
Contributor Author

/retest

1 similar comment
@ori-amizur
Copy link
Contributor Author

/retest

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 5d8c005 and 1 for PR HEAD dc8e0aa in total

@ori-amizur
Copy link
Contributor Author

/retest

@ori-amizur
Copy link
Contributor Author

/test e2e-hypershift

Copy link
Contributor

openshift-ci bot commented Dec 13, 2023

@ori-amizur: all tests passed!

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.

@openshift-merge-bot openshift-merge-bot bot merged commit 8477a99 into openshift:master Dec 13, 2023
14 checks passed
@openshift-ci-robot
Copy link
Contributor

@ori-amizur: Jira Issue OCPBUGS-23085: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-23085 has been moved to the MODIFIED state.

In response to this:

During firstboot, if a kernel argument appears both in the boot command line and in the encapsulated machine config, this kernel argument is duplicated.
The reason for that is that current running configuration is not taken into account when updating the configuration before reboot. The solution is to use the current running configuration when updating during firstboot.
Fixes: OCPBUGS-23085

- What I did
Use the current running configuration when updating in firstboot.
- How to verify it
Add a kernel argument that appears also in the machine-config to firstboot, and see that it is not duplicated after reboot.
- Description for the changelog

Do not duplicate kernel arguments if they are present during firstboot

/cc @sinnykumari

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

[ART PR BUILD NOTIFIER]

This PR has been included in build openshift-proxy-pull-test-container-v4.16.0-202312131413.p0.g8477a99.assembly.stream for distgit openshift-proxy-pull-test.
All builds following this will include this PR.

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. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. qe-approved Signifies that QE has signed off on this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants