-
Notifications
You must be signed in to change notification settings - Fork 419
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
RHEL-79554: Consolidate OpenStack and PowerVS hostname handling into mco-hostname script #4866
Conversation
@EmilienM: This pull request references RHEL-79554 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.19.0" version, but no target version was set. 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. |
/cc mdbooth mandre |
templates/common/openstack/units/openstack-hostname.service.yaml
Outdated
Show resolved
Hide resolved
/test unit |
templates/common/openstack/files/usr-local-bin-openstack-afterburn-hostname.yaml
Show resolved
Hide resolved
/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.
Seems reasonable. Missing systemd bits in powervs.
/cc @hamzy |
/test e2e-openstack-singlestackv6 |
/test e2e-openstack-singlestackv6 |
Note that depending on the SELinux policy fix, we may also require the following systemd drop-in to make this work at This depends on whether we allow afterburn to load kernel modules or not. |
…mco-hostname script This change simplifies hostname management for OpenStack and PowerVS platforms by consolidating their handling into the existing `mco-hostname` script. * Introduces `set_openstack_hostname` and `set_powervs_hostname` functions in `mco-hostname` which until now was only used by GCP. * Removes the standalone `openstack-afterburn-hostname` script and replaces its invocation with `mco-hostname --openstack`. * Updates OpenStack and PowerVS systemd service units to call `mco-hostname` instead of using individual scripts. * Renames `afterburn-hostname.service.yaml` to `openstack-hostname.service.yaml` and `powervs-hostname.service.yaml` for clarity. * Ensures `RemainAfterExit=yes` is set in relevant services to persist hostname changes. * Add `set -euo pipefail` to the `mco-hostname` script so if an error happens during the script, it'll stop and return a failure. This refactoring reduces redundancy, improves maintainability, and aligns hostname configuration across platforms.
/test e2e-openstack-singlestackv6 |
/lgtm |
For info, I think we will allow afterburn to load kernel modules in the RHCOS backport, so this should not be required 🤞 |
/retest-required |
/retest |
/test e2e-openstack-singlestackv6 |
@EmilienM: No presubmit jobs available for openshift/machine-config-operator@main 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-sigs/prow repository. |
/retest-required |
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 the consolidation looks good logically. In older versions, the MCO would sometimes wrongly backup removed files/services (in this case, you'd end up with systems that have both afterburn-hostname.service
and openstack-hostname.service
) but I believe all of those are fixed now
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: EmilienM, mdbooth, mjturek, yuqi-zhang 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 |
1 similar comment
/retest-required |
2 similar comments
@EmilienM: 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. |
8cc645a
into
openshift:main
/cherry-pick release-4.18 |
@Prashanth684: #4866 failed to apply on top of branch "release-4.18":
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-sigs/prow repository. |
… script manual cherry-pick of openshift#4866 needed for OKD
- What I did
This change simplifies hostname management for OpenStack and PowerVS platforms by
consolidating their handling into the existing
mco-hostname
script.set_openstack_hostname
andset_powervs_hostname
functions inmco-hostname
which until now was only used by GCP.openstack-afterburn-hostname
script and replacesits invocation with
mco-hostname --openstack
.mco-hostname
instead of using individual scripts.
afterburn-hostname.service.yaml
toopenstack-hostname.service.yaml
and
powervs-hostname.service.yaml
for clarity.RemainAfterExit=yes
is set in relevant services to persist hostname changes.This refactoring reduces redundancy, improves maintainability, and aligns
hostname configuration across platforms.
- How to verify it
Ensure that afterburn hostname service is not in error state and that the hostname is correctly set.
- Description for the changelog
Fix issue with afterburn hostname retrieval by avoiding /dev/stdout in PowerVS.