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-29290: AWS: Always persist the existing node name on 4.14 #4215

Conversation

JoelSpeed
Copy link
Contributor

On AWS, we persist the hostname into a file on disk, with the idea being that, this value is passed as a --hostname-override to kubelet, such that it should register with the overriden hostname to the cluster.
In 4.13 and lower, if the hostname override is set, it is ignored as the AWS cloud provider integration takes precedence.

To ensure the upgrade from 4.13 to 4.14 is smooth (where the in-tree logic is removed), we must persist the hostname that the node originally registered with. If we do not, then the host name may change between versions, which breaks the upgrade and requires manual intervention to recover the nodes by approving new certificates, and removing the old node objects.

@openshift-ci-robot openshift-ci-robot added jira/severity-moderate Referenced Jira bug's severity is moderate for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Feb 26, 2024
@openshift-ci-robot
Copy link
Contributor

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

6 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.13.z) matches configured target version for branch (4.13.z)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)
  • dependent bug Jira Issue OCPBUGS-29916 is in the state Closed (Done), which is one of the valid states (VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA))
  • dependent Jira Issue OCPBUGS-29916 targets the "4.14.z" version, which is one of the valid target versions: 4.14.0, 4.14.z
  • bug has dependents

Requesting review from QA contact:
/cc @sunzhaohua2

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

In response to this:

On AWS, we persist the hostname into a file on disk, with the idea being that, this value is passed as a --hostname-override to kubelet, such that it should register with the overriden hostname to the cluster.
In 4.13 and lower, if the hostname override is set, it is ignored as the AWS cloud provider integration takes precedence.

To ensure the upgrade from 4.13 to 4.14 is smooth (where the in-tree logic is removed), we must persist the hostname that the node originally registered with. If we do not, then the host name may change between versions, which breaks the upgrade and requires manual intervention to recover the nodes by approving new certificates, and removing the old node objects.

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.

@JoelSpeed JoelSpeed force-pushed the persist-existing-nodename branch 2 times, most recently from 9055072 to 02ac771 Compare February 27, 2024 12:43
@JoelSpeed
Copy link
Contributor Author

/payload-job periodic-ci-openshift-release-master-nightly-4.14-upgrade-from-stable-4.13-e2e-aws-sdn-upgrade

Copy link
Contributor

openshift-ci bot commented Feb 27, 2024

@JoelSpeed: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-master-nightly-4.14-upgrade-from-stable-4.13-e2e-aws-sdn-upgrade

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/003408b0-d589-11ee-8c09-fd4f3aba27c1-0

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 28, 2024
@JoelSpeed JoelSpeed changed the title OCPBUGS-29290: AWS: Always persist the existing node name on 4.13 OCPBUGS-29290: AWS: Always persist the existing node name on 4.14 Feb 28, 2024
@JoelSpeed JoelSpeed changed the base branch from release-4.13 to release-4.14 February 28, 2024 09:27
@openshift-ci-robot openshift-ci-robot removed the jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. label Feb 28, 2024
@openshift-ci-robot
Copy link
Contributor

@JoelSpeed: This pull request references Jira Issue OCPBUGS-29290, which is invalid:

  • expected the bug to target either version "4.14." or "openshift-4.14.", but it targets "4.13.z" instead
  • expected dependent Jira Issue OCPBUGS-29916 to target a version in 4.15.0, 4.15.z, but it targets "4.14.z" 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.

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

In response to this:

On AWS, we persist the hostname into a file on disk, with the idea being that, this value is passed as a --hostname-override to kubelet, such that it should register with the overriden hostname to the cluster.
In 4.13 and lower, if the hostname override is set, it is ignored as the AWS cloud provider integration takes precedence.

To ensure the upgrade from 4.13 to 4.14 is smooth (where the in-tree logic is removed), we must persist the hostname that the node originally registered with. If we do not, then the host name may change between versions, which breaks the upgrade and requires manual intervention to recover the nodes by approving new certificates, and removing the old node objects.

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 28, 2024
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 28, 2024
@JoelSpeed
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 Feb 28, 2024
@openshift-ci-robot
Copy link
Contributor

@JoelSpeed: This pull request references Jira Issue OCPBUGS-29290, which is valid.

6 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.14.z) matches configured target version for branch (4.14.z)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)
  • dependent bug Jira Issue OCPBUGS-29916 is in the state Closed (Done), which is one of the valid states (VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA))
  • dependent Jira Issue OCPBUGS-29916 targets the "4.15.z" version, which is one of the valid target versions: 4.15.0, 4.15.z
  • bug has dependents

Requesting review from QA contact:
/cc @huali9

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot requested a review from huali9 February 28, 2024 19:11
@huali9
Copy link

huali9 commented Feb 29, 2024

/label qe-approved

@openshift-ci openshift-ci bot added the qe-approved Signifies that QE has signed off on this PR label Feb 29, 2024
@JoelSpeed
Copy link
Contributor Author

/retest

Copy link
Member

@damdo damdo left a comment

Choose a reason for hiding this comment

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

Bash syntax and reasoning
/lgtm

Is there an automated test in CI that exercises this scenario or did you test this manually somehow?
Thanks

@JoelSpeed
Copy link
Contributor Author

@damdo I have manually tested yesterday on my own cluster and @huali9 has also tested again this morning, detailed test report in the attached bug

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 29, 2024
# We must ensure that it persists across this upgrade boundary by writing the current node name out, no matter what we expected it to be.
if [ -e "${CURRENT_CLIENT_CERT}" ]; then
HOSTNAME=$(openssl x509 -noout -subject -in "${CURRENT_CLIENT_CERT}" | sed 's/.*CN = //' | sed 's/\"//g' | sed 's/system:node://')
if [[ ! -z "${HOSTNAME}" ]]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

possible silly Q / nit

why are we checking that the hostname is non empty here? is it possible that the extraction above could fail? do we want explicit error handling in that case? or will
if [[ ! -z "${HOSTNAME}" ]]; then skipping the following code be sufficient?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I expected it may be possible that the file had been created but was empty, in that case, I just wanted to fallback to the original logic, which I believe is what will happen given this currently

@theobarberbany
Copy link
Contributor

one question, but other than that

/lgtm

@sinnykumari
Copy link
Contributor

/label backport-risk-assessed

Copy link
Contributor

openshift-ci bot commented Feb 29, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: damdo, JoelSpeed, sinnykumari, theobarberbany

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 29, 2024
@sergiordlr
Copy link

/label cherry-pick-approved

@openshift-ci openshift-ci bot added the cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. label Feb 29, 2024
@sinnykumari sinnykumari added the backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. label Feb 29, 2024
Copy link
Contributor

openshift-ci bot commented Feb 29, 2024

@JoelSpeed: 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-aws-ovn-upgrade e4ccde8 link true /test e2e-aws-ovn-upgrade
ci/prow/e2e-aws-ovn-fips e4ccde8 link false /test e2e-aws-ovn-fips
ci/prow/e2e-gcp-rt e4ccde8 link false /test e2e-gcp-rt
ci/prow/okd-scos-images e4ccde8 link true /test okd-scos-images
ci/prow/images e4ccde8 link true /test images
ci/prow/verify e4ccde8 link true /test verify
ci/prow/okd-images e4ccde8 link true /test okd-images
ci/prow/e2e-aws-ovn e4ccde8 link true /test e2e-aws-ovn
ci/prow/bootstrap-unit e4ccde8 link false /test bootstrap-unit
ci/prow/okd-scos-e2e-aws-ovn e4ccde8 link false /test okd-scos-e2e-aws-ovn
ci/prow/e2e-aws-ovn-fips-op e4ccde8 link false /test e2e-aws-ovn-fips-op

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 8f8dbba into openshift:release-4.14 Feb 29, 2024
18 of 20 checks passed
@openshift-ci-robot
Copy link
Contributor

@JoelSpeed: Jira Issue OCPBUGS-29290: All pull requests linked via external trackers have merged:

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

In response to this:

On AWS, we persist the hostname into a file on disk, with the idea being that, this value is passed as a --hostname-override to kubelet, such that it should register with the overriden hostname to the cluster.
In 4.13 and lower, if the hostname override is set, it is ignored as the AWS cloud provider integration takes precedence.

To ensure the upgrade from 4.13 to 4.14 is smooth (where the in-tree logic is removed), we must persist the hostname that the node originally registered with. If we do not, then the host name may change between versions, which breaks the upgrade and requires manual intervention to recover the nodes by approving new certificates, and removing the old node objects.

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

[ART PR BUILD NOTIFIER]

This PR has been included in build ose-machine-config-operator-container-v4.14.0-202402291242.p0.g8f8dbba.assembly.stream.el8 for distgit ose-machine-config-operator.
All builds following this will include this PR.

@openshift-merge-robot
Copy link
Contributor

Fix included in accepted release 4.14.0-0.nightly-2024-02-29-134959

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. backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. jira/severity-moderate Referenced Jira bug's severity is moderate for the branch this PR is targeting. 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