-
Notifications
You must be signed in to change notification settings - Fork 59
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
default hostname now is fedora
, used to be localhost
#649
Comments
This is what I see in my boot logs:
According to the systemd code this indicates that systemd was compiled with Prior to pivot the console log shows:
So it appears that this is baked into the image that pivot “pivots” to in this case:
|
Ways to fix it:
I'm not entirely sure which platforms are affected - so far AWS is known to work and it certainly breaks on GCP. Could we give a try on all FCOS-supported platforms? Seems afterburn fix is the easiest to implement, but not sure if its a good idea to clean up after systemd-resolved |
Maybe let's keep discussing in openshift/machine-config-operator#2160 how to proceed before doing anything here? |
I was a bit puzzled by this bug report, so I checked the behavior of a plain FCOS 33.x on GCP and I can see the hostname properly set from DHCP in initramfs:
This seems right to me, and it also matches the behavior I'd expect on other platforms. |
Right, okd disables DHCP on GCP: If it weren't for that I wouldn't personally have a problem with my deployments but I have modified my installer to allow me to set my clusterdomain to the basedomain instead of having to have a 4 segment domain name. |
fedora
on GCP, unlike other platformsfedora
, used to be localhost
I've opened https://bugzilla.redhat.com/show_bug.cgi?id=1892235 for Fedora package owners to explore whether the branding sugar can be applied in a different place or in some other way which would be easier to control at provisioning time. |
We discussed this in the community meeting today.
@lucab has started the discussion with systemd already in BZ1892235. The discussion with NM is upcoming. |
coreos/afterburn#512 addresses the setting of the default hostname in GCP |
Comment #649 (comment) does not address the immediate pain in GCP. On GCP, the default hostname "fedora" is a symptom of a problem -- the DHCP received hostname is too long and NM refuses to set it. Afterburn can write the FQDN to |
Having NM handle this case and truncate rather than refusing (as suggested in #649 (comment)) would help?
A combination of coreos/afterburn#512 and coreos/afterburn#509 would also alleviate the issue then? |
In my environment the hostname returned by GCP fits in hostname. It is still a problem there for OKD because NM dhcp is explicitly disabled by the machineconfig provided ignition configuration. It is relatively straight forward to modify NM's DHCP behavior to modify the DHCP hostname to the desired short name. Based on prior discussion I believe we are not willing to go that route. |
Any more context there or a link to where the discussion happened? |
Ah right @bdurrow
This is true for the MCO. For FCOS, it is not the default. And there's a really good reason why this is disabled -- NM gets cantankerous when the hostname is set outside of NetworkManager and it will reset the hostname to the long hostname -- and that breaks OKD/OCP. |
We discussed this again in today's meeting:
@lucab will approach the NM developers about truncating the hostname in-tree. @cgwalters brought up that truncating might not be the right approach universally, but there's agreement that at least on GCP we do want it. |
This was related to the fact that infrastructure orchestrators may generally need to maintain routable identities for nodes based on their FQDN. That is, the local hostname should not be maimed in a way that it cannot be matched anymore at infra-level name resolution. However if NM follows the path of systemd/systemd#7616 I think we are not going to break that property. This is based on the fact that each label in a DNS-valid FQDN can have at most 63 chars, which is smaller than the |
Upstream ticket at https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/572. I did reproduce the "overlong DHCP hostname" case with a customized scenario on top of |
Just to note: This is a release blocker for OKD 4.6 |
New curve ball. The revert (rpm build) didn't solve the problem completely so rather than churn the revert was reverted. This problem is extremely complex. There were two changes introduced in Fedora 33.
When we revert the fallback hostname change we now break through to attempt reverse DNS because the previous things failed:
So that's good, now we're trying reverse DNS again like we were in Fedora 32. Now's where it gets tricky and new problems arise because of the switch to The
where in Fedora 32 it was:
This means things will now go through However the new problems arise when either:
In this case
In this case the nsswitch.conf file falls through to the next entry after I think the most ideal thing to do in Fedora 33 is to:
For after Fedora 33 we need to be smarter in NM about the glibc resolver and possible configurations there and also collaborate between systemd and NetworkManager on what this should look like in the future. |
I'll throw out the other options I see in addition to the one mentioned above. The revert was reverted because:
So theoretically completely unconfigured systems now have The way I see it our options are to: [1. IDEAL OPTION]
[2. OK OPTION]
[3. WORST OPTION]
This option basically reverts everything to how it was in Fedora 32 |
Here is another option: [4. SLIGHTLY LESS WORSE OPTION]
This option is not great either, but it is attractive because of what we've already done to |
This one is complicated, we need to revert the systemd change in f33 that makes it fallback to `fedora` rather than `localhost` for the hostname and we also need to essentially render systemd-resolved ineffective because it's internal fallbacks for reverse DNS make it really hard to set the hostnmae via reverse DNS, which is something we don't want to break and needs upstream work to get more appropriate fixes in. More context in coreos/fedora-coreos-tracker#649 (comment)
This one is complicated, we need to revert the systemd change in f33 that makes it fallback to `fedora` rather than `localhost` for the hostname and we also need to essentially render systemd-resolved ineffective because it's internal fallbacks for reverse DNS make it really hard to set the hostname via reverse DNS, which is something we don't want to break and needs upstream work to get more appropriate fixes in. More context in coreos/fedora-coreos-tracker#649 (comment)
ok attempt at option 4 has been started over in coreos/fedora-coreos-config#780. Still pending some things that need to land first but we're almost there. |
This one is complicated, we need to revert the systemd change in f33 that makes it fallback to `fedora` rather than `localhost` for the hostname and we also need to essentially render systemd-resolved ineffective because it's internal fallbacks for reverse DNS make it really hard to set the hostname via reverse DNS, which is something we don't want to break and needs upstream work to get more appropriate fixes in. More context in coreos/fedora-coreos-tracker#649 (comment)
This one is complicated, we need to revert the systemd change in f33 that makes it fallback to `fedora` rather than `localhost` for the hostname and we also need to essentially render systemd-resolved ineffective because it's internal fallbacks for reverse DNS make it really hard to set the hostname via reverse DNS, which is something we don't want to break and needs upstream work to get more appropriate fixes in. More context in coreos/fedora-coreos-tracker#649 (comment)
This one is complicated, we need to revert the systemd change in f33 that makes it fallback to `fedora` rather than `localhost` for the hostname and we also need to essentially render systemd-resolved ineffective because it's internal fallbacks for reverse DNS make it really hard to set the hostname via reverse DNS, which is something we don't want to break and needs upstream work to get more appropriate fixes in. More context in coreos/fedora-coreos-tracker#649 (comment) (cherry picked from commit 969380b)
This one is complicated, we need to revert the systemd change in f33 that makes it fallback to `fedora` rather than `localhost` for the hostname and we also need to essentially render systemd-resolved ineffective because it's internal fallbacks for reverse DNS make it really hard to set the hostname via reverse DNS, which is something we don't want to break and needs upstream work to get more appropriate fixes in. More context in coreos/fedora-coreos-tracker#649 (comment) (cherry picked from commit 969380b)
After pivot systemd-resolved cannot reset /etc/resolv.conf symlink due to a SELinux issue (coreos/fedora-coreos-tracker#649). Make a link ourselves
After pivot systemd-resolved cannot reset /etc/resolv.conf symlink due to a SELinux issue (coreos/fedora-coreos-tracker#649). Make a link ourselves Bring back DNSStubListener setting for systemd-resolved
After pivot systemd-resolved cannot reset /etc/resolv.conf symlink due to a SELinux issue (coreos/fedora-coreos-tracker#649). Make a link ourselves Bring back DNSStubListener setting for systemd-resolved
The latest on this is:
See also https://bugzilla.redhat.com/show_bug.cgi?id=1892235#c25 for more details. But anyway, at least as far as this specific issue is concerned, let's consider it fixed by coreos/fedora-coreos-config#868. |
followup in #834 |
Booted 33.20201006.1.0 from
next
stream on GCP and default hostname isfedora
:OKD-on-FCOS expects default hostname to be
localhost
(as on AWS).See openshift/machine-config-operator#2160 (comment)
The text was updated successfully, but these errors were encountered: