-
Notifications
You must be signed in to change notification settings - Fork 87
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
MGMT-16843: Use hostnamectl to replace illegal hostname #839
MGMT-16843: Use hostnamectl to replace illegal hostname #839
Conversation
@CrystalChun: This pull request references MGMT-16843 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.16.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. |
Skipping CI for Draft Pull Request. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: CrystalChun 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 |
/test ? |
@CrystalChun: The following commands are available to trigger required jobs:
The following commands are available to trigger optional jobs:
Use
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/test-infra repository. |
/test e2e-agent-sno-ipv6 e2e-agent-compact-ipv4 |
src/installer/installer.go
Outdated
|
||
if highAvailabilityMode == models.ClusterHighAvailabilityModeNone { | ||
i.log.Infof("Restarting systemd-hostnamed service for SNO after writing new hostname [%s]", data) | ||
i.ops.SystemctlAction("restart", "systemd-hostnamed") |
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.
Wondering, maybe it is just easier to run hostnamectl command for all cases? it should set everything as expected without need to restart service?
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.
Good idea to use hostnamectl, will update. Do you also mean to do it on multi-node clusters too?
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 tested both ways and I get this when trying to access the installed spoke cluster
Unable to connect to the server: tls: failed to verify certificate: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "kube-apiserver-lb-signer")
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.
Should I send the requested hostname to the installer?
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.
very strange, hostname is not part of kubeconfig
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.
Ah sorry this error was a complete fluke. Something weird with my env 😅 Made the change to use hostnamectl
to set the hostname for any cluster (not just SNO)!
Hosts may not restart before beginning installation so if we generate a random hostname, it won't take effect unless we use hostnamectl to actually replace the hostname live.
/test edge-unit-test edge-e2e-metal-assisted edge-e2e-metal-assisted-single-node |
/retitle MGMT-16843: Use hostnamectl to replace illegal hostname |
@CrystalChun: This pull request references MGMT-16843 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.16.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. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #839 +/- ##
==========================================
- Coverage 55.73% 55.68% -0.06%
==========================================
Files 15 15
Lines 3199 3202 +3
==========================================
Hits 1783 1783
- Misses 1245 1247 +2
- Partials 171 172 +1
|
/test edge-e2e-ai-operator-ztp Forgot |
/lgtm |
/retest |
1 similar comment
/retest |
/retest-required |
@CrystalChun: 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-sigs/prow repository. I understand the commands that are listed here. |
[ART PR BUILD NOTIFIER] This PR has been included in build ose-agent-installer-orchestrator-container-v4.17.0-202405230209.p0.g9e2f22a.assembly.stream.el9 for distgit ose-agent-installer-orchestrator. |
/cherry-pick release-ocm-2.10 release-ocm-2.9 release-4.16 release-4.15 |
@CrystalChun: new pull request created: #848 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. |
/cherrypick release-ocm-2.9 release-4.16 release-4.15 |
@CrystalChun: new pull request created: #849 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. |
/cherrypick release-4.16 release-4.15 |
@CrystalChun: new pull request created: #850 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. |
Hosts may not restart before beginning installation
so if we generate a random hostname, it won't take
effect unless we use hostnamectl to actually replace
the hostname live.