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-49894: Ensure proxy config exists when reverting from OCL to non-OCL #4833

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

cheesesashimi
Copy link
Member

- What I did

I added the proxy config to the revert systemd service that gets written whenever one reverts from OCL to non-OCL. This is needed for the same reason that the revert systemd mechanism is; after rebooting into the factory OS, all of the configs are gone and the node effectively needs to be re-bootstrapped. While this works, the proxy config was not being recognized since it was effectively not there.

Additionally, this moves file management for all of the files needed into the RevertService implementation and outputs these files as part of the Ignition config that gets written to disk. This consolidates that process and makes things a bit easier to reason about.

Note: This PR is based upon #4825, which must land before this PR does.

- How to verify it

  1. Bring up a cluster with OCL and a proxy config.
  2. Create a MachineOSConfig for a given pool and wait for the build to complete.
  3. Once the build is complete, label a node so that it joins the OCL-enabled pool.
  4. Once the node has rebooted into the OCL image, move the node back to the non-OCL-enabled pool.
  5. The node should revert back to the non-OCL configuration.

- Description for the changelog
Ensure proxy config exists when reverting from OCL to non-OCL

This was needed because if there was a problem rebooting, the
MCDRebootError would never be surfaced. Additionally, the degraded
message would not include that. This fixes that problem by adding revert
code and also makes the OCL update path more similar to the non-OCL
update path.
@openshift-ci-robot openshift-ci-robot added jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. labels Feb 5, 2025
@openshift-ci-robot
Copy link
Contributor

@cheesesashimi: This pull request references Jira Issue OCPBUGS-49894, which is invalid:

  • expected the bug to target the "4.19.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:

- What I did

I added the proxy config to the revert systemd service that gets written whenever one reverts from OCL to non-OCL. This is needed for the same reason that the revert systemd mechanism is; after rebooting into the factory OS, all of the configs are gone and the node effectively needs to be re-bootstrapped. While this works, the proxy config was not being recognized since it was effectively not there.

Additionally, this moves file management for all of the files needed into the RevertService implementation and outputs these files as part of the Ignition config that gets written to disk. This consolidates that process and makes things a bit easier to reason about.

Note: This PR is based upon #4825, which must land before this PR does.

- How to verify it

  1. Bring up a cluster with OCL and a proxy config.
  2. Create a MachineOSConfig for a given pool and wait for the build to complete.
  3. Once the build is complete, label a node so that it joins the OCL-enabled pool.
  4. Once the node has rebooted into the OCL image, move the node back to the non-OCL-enabled pool.
  5. The node should revert back to the non-OCL configuration.

- Description for the changelog
Ensure proxy config exists when reverting from OCL to non-OCL

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.

@openshift-ci-robot openshift-ci-robot added the jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label Feb 5, 2025
@cheesesashimi cheesesashimi changed the title OCPBUGS-49894: writes the proxy config to disk before reverting from OCL OCPBUGS-49894: Ensure proxy config exists when reverting from OCL to non-OCL Feb 5, 2025
@cheesesashimi cheesesashimi force-pushed the zzlotnik/fix-proxy-restoration branch from 12b8b7f to 309ea69 Compare February 5, 2025 22:40
Copy link
Contributor

openshift-ci bot commented Feb 5, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cheesesashimi

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 openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 5, 2025
When a proxy config is used with OCL, the proxy config disappears from
the nodes' disk when the node reboots itself for the same reason that
makes the revert systemd service needed. This writes the proxy config to
the node (when enabled) to a custom location before launching the revert
service.
@cheesesashimi cheesesashimi force-pushed the zzlotnik/fix-proxy-restoration branch from 309ea69 to 3112f68 Compare February 7, 2025 14:22
Copy link
Contributor

openshift-ci bot commented Feb 7, 2025

@cheesesashimi: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-vsphere-ovn-upi 3112f68 link false /test e2e-vsphere-ovn-upi
ci/prow/e2e-gcp-op 3112f68 link true /test e2e-gcp-op
ci/prow/e2e-azure-ovn-upgrade-out-of-change 3112f68 link false /test e2e-azure-ovn-upgrade-out-of-change
ci/prow/e2e-vsphere-ovn-upi-zones 3112f68 link false /test e2e-vsphere-ovn-upi-zones

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.

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/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants