-
Notifications
You must be signed in to change notification settings - Fork 462
Bug 1790823: [baremetal] Verify that MDNS doesn't advertise localhost #1446
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
Conversation
|
@yboaron: This pull request references Bugzilla bug 1790823, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn 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. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: yboaron The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
I still didn't check e2e deployment (with customized MCO image) with this fix |
celebdor
left a comment
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.
Is there some change to baremetal-runtimecfg mdns-publisher so that it reads the hostname? Cause as far as I can see we are just writing it in /etc/mdns/hostname but we need to use it in rendering then.
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.
shouldn't it be the FQDN?
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.
Yep, I need to update also baremetal-runtimecfg to consider mdns hostname file
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.
localhost.localdomain ?
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.
Running 'hostname' from shell returns just the hostname without a domain name(e.g: localhost), while GOLANG os.Hostname() returns host+domain-name.
The baremetal-runtimecfg relevant code (utils.ShortHostname [1]) should work OK for both cases.
[1] https://github.com/openshift/baremetal-runtimecfg/blob/master/pkg/utils/utils.go#L22
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 we can safely drop the .txt extension
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.
OK
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.
Let's do it in up|down as well for good measure.
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.
What's the purpose of reading the cloned uts hostname?
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.
If verify-hostname init container start to run before NM dispatcher && If hostname in cloned uts namespace != localhost (meaning that verify-hostname start to run after hostname set by DHCP) -
there is no reason to wait for NM script, right?
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.
why not just cat ?
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 don't think it will kill us to try every second. It is literally just catting a file.
MDNS publisher static pod should start advertising the node only after node's hostname was set by DHCP. The idea is to add an init container that will monitor host's hostname until hostname != localhost. The issue was how host's hostname should be retrieved by the init container. Since the MDNS static pod doesn't use host's uts namespace, reading 'hostname' is not an option. Reading hostname using dbus didn't work due to security constraints(SElinux). The suggested solution composed of: 1. NM dispatcher script will monitor & store hostname in a file 2. Init container will mount this file, and read the value
|
@yboaron: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. DetailsInstructions 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. |
|
This PR is replaced by #1455 |
The utils.ShortHostname function should read hostname from mdns hostname (/etc/mdns/hostname), if mdns hostname file exists. The mdns hostname file being handled by [1] MCO PR. [1] openshift/machine-config-operator#1446
MDNS publisher static pod should start advertising the node
only after node's hostname was set by DHCP.
The idea is to add an init container that will monitor host's hostname
until hostname != localhost.
The issue was how host's hostname should be retrieved by the init container.
Since the MDNS static pod doesn't use host's uts namespace, reading 'hostname'
is not an option.
Reading hostname using dbus didn't work due to security constraints(SElinux).
The suggested solution composed of:
- What I did
- How to verify it
- Description for the changelog