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: Ensure valid hostname during install #788
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. |
[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 |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #788 +/- ##
==========================================
- Coverage 56.43% 56.28% -0.16%
==========================================
Files 15 15
Lines 3358 3367 +9
==========================================
Hits 1895 1895
- Misses 1289 1295 +6
- Partials 174 177 +3
|
@CrystalChun please add a test for hostname with Capital letters |
@tsorya please review |
https://issues.redhat.com/browse/MGMT-16843 Some processes during install time depend on the hostname and an invalid hostname (e.g. 'localhost', having capital letters, etc.) that could cause the install to fail. Extra validation is added when checking the hostname to ensure it is valid. A random hostname will be assigned if the current hostname is invalid.
af644c5
to
662bf4c
Compare
if hostname != "localhost" { | ||
i.log.Infof("hostname is not localhost, no need to do anything") | ||
|
||
if err := validations.ValidateHostname(hostname); err == nil && hostname != "localhost" { |
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.
maybe we can always write requested hostname?
Though this seems fine
a3605aa
to
662bf4c
Compare
/lgtm |
9f1f798
into
openshift:master
/cherry-pick release-ocm-2.9 |
/cherry-pick release-ocm-2.8 |
/cherry-pick release-4.15 |
/cherry-pick release-4.14 |
@CrystalChun: #788 failed to apply on top of branch "release-ocm-2.9":
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. |
@CrystalChun: #788 failed to apply on top of branch "release-ocm-2.8":
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. |
@CrystalChun: new pull request created: #791 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. |
@CrystalChun: #788 failed to apply on top of branch "release-4.14":
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. |
[ART PR BUILD NOTIFIER] This PR has been included in build ose-agent-installer-orchestrator-container-v4.16.0-202402222111.p0.g9f1f798.assembly.stream.el8 for distgit ose-agent-installer-orchestrator. |
https://issues.redhat.com/browse/MGMT-16843 Some processes during install time depend on the hostname and an invalid hostname (e.g. 'localhost', having capital letters, etc.) that could cause the install to fail. Extra validation is added when checking the hostname to ensure it is valid. A random hostname will be assigned if the current hostname is invalid.
Cherry pick of PR openshift#788 https://issues.redhat.com/browse/MGMT-16843 Some processes during install time depend on the hostname and an invalid hostname (e.g. 'localhost', having capital letters, etc.) that could cause the install to fail. Extra validation is added when checking the hostname to ensure it is valid. A random hostname will be assigned if the current hostname is invalid.
Cherry pick of PR openshift#788 https://issues.redhat.com/browse/MGMT-16843 Some processes during install time depend on the hostname and an invalid hostname (e.g. 'localhost', having capital letters, etc.) that could cause the install to fail. Extra validation is added when checking the hostname to ensure it is valid. A random hostname will be assigned if the current hostname is invalid.
Cherry pick of PR openshift#788 https://issues.redhat.com/browse/MGMT-16843 Some processes during install time depend on the hostname and an invalid hostname (e.g. 'localhost', having capital letters, etc.) that could cause the install to fail. Extra validation is added when checking the hostname to ensure it is valid. A random hostname will be assigned if the current hostname is invalid.
https://issues.redhat.com/browse/MGMT-16843 Some processes during install time depend on the hostname and an invalid hostname (e.g. 'localhost', having capital letters, etc.) that could cause the install to fail. Extra validation is added when checking the hostname to ensure it is valid. A random hostname will be assigned if the current hostname is invalid.
Cherry pick of PR openshift#788 https://issues.redhat.com/browse/MGMT-16843 Some processes during install time depend on the hostname and an invalid hostname (e.g. 'localhost', having capital letters, etc.) that could cause the install to fail. Extra validation is added when checking the hostname to ensure it is valid. A random hostname will be assigned if the current hostname is invalid.
Cherry pick of PR openshift#788 https://issues.redhat.com/browse/MGMT-16843 Some processes during install time depend on the hostname and an invalid hostname (e.g. 'localhost', having capital letters, etc.) that could cause the install to fail. Extra validation is added when checking the hostname to ensure it is valid. A random hostname will be assigned if the current hostname is invalid.
) Cherry pick of PR #788 https://issues.redhat.com/browse/MGMT-16843 Some processes during install time depend on the hostname and an invalid hostname (e.g. 'localhost', having capital letters, etc.) that could cause the install to fail. Extra validation is added when checking the hostname to ensure it is valid. A random hostname will be assigned if the current hostname is invalid.
) Cherry pick of PR #788 https://issues.redhat.com/browse/MGMT-16843 Some processes during install time depend on the hostname and an invalid hostname (e.g. 'localhost', having capital letters, etc.) that could cause the install to fail. Extra validation is added when checking the hostname to ensure it is valid. A random hostname will be assigned if the current hostname is invalid.
Cherry pick of PR #788 https://issues.redhat.com/browse/MGMT-16843 Some processes during install time depend on the hostname and an invalid hostname (e.g. 'localhost', having capital letters, etc.) that could cause the install to fail. Extra validation is added when checking the hostname to ensure it is valid. A random hostname will be assigned if the current hostname is invalid.
https://issues.redhat.com/browse/MGMT-16843
Some processes during install time depend on the hostname and an invalid hostname (e.g. 'localhost', having capital letters, etc.) that could cause the install to fail.
Extra validation is added when checking the hostname to ensure it is valid. A random hostname will be assigned if the current hostname is invalid.
See above issue for an example of the scenario with an invalid hostname fails to install.
/cc @omertuc @gamli75