-
Notifications
You must be signed in to change notification settings - Fork 881
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
trying to load metadata from network before configuring the network #5771
Comments
Relevant discourse discussion at https://discourse.maas.io/t/cloud-init-tries-to-source-userdata-from-maas-before-the-network-is-configured/9446/4 |
According to the bug you pointed at:
It does not appear solved to me?
I looked but didn't succeed in finding a source for up more recent RPMs. The only source I'm aware of is RedHat's provided sources, and they're stuck with 2.3 at the moment...? $ dnf search cloud-init --showduplicates --enablerepo=epel-testing
Extra Packages for Enterprise Linux 9 - x86_64 2.0 MB/s | 23 MB 00:11
Extra Packages for Enterprise Linux 9 - Testing - x86_64 1.2 MB/s | 2.6 MB 00:02
Last metadata expiration check: 0:00:01 ago on Wed 02 Oct 2024 02:26:25 PM PDT.
====================================================================================================== Name Exactly Matched: cloud-init =======================================================================================================
cloud-init-23.4-7.el9_4.6.alma.1.noarch : Cloud instance init scripts
cloud-init-23.4-7.el9_4.3.alma.1.noarch : Cloud instance init scripts
cloud-init-23.4-7.el9_4.5.alma.1.noarch : Cloud instance init scripts
cloud-init-23.4-7.el9_4.6.alma.1.noarch : Cloud instance init scripts
cloud-init-23.4-7.el9_4.alma.1.noarch : Cloud instance init scripts even the Fedora upstream doesn't list any EPEL versions https://src.fedoraproject.org/rpms/cloud-init I'd love to help, but if you have sources to help bootstrap a 24.x package build that will make it more likely to happen soon. I know all about building RPMs, I don't need an RPM howto... but having done this in the past, I know that many/most packages require a lot of specific settings to work well and it can be timeconsuming to work those out. |
I missed that, thanks @jorhett. The reporter commented on the PR after it was already closed rather than filing a new bug which is probably why it wasn't noticed. I think that you are right. There is a fundamental problem in the distro-agnostic solution here. Klibc stuff is debian/ubuntu specific, so expecting it to deliver network config on non-debian distros is a non-starter. Note the log from the local datasource:
So the network configuration that is supposed to be received in the local stage from the initramfs isn't received on a RHEL derivative, and (I think) therefore the networking daemon isn't correctly configured so the IMDS cannot be reached later in Network stage. @blackboxsw does this sound right to you?
We publish releases to COPR for testing purposes, and there is also an RPM build script in the source tree ( Without doing further investigation, two questions come to mind:
I should take a closer look at what Klibc configuration is being received and where it comes from before speculating further. |
Sorry, I totally overlooked that spec file. I'm happy to build an RPM and put it on our images regardless of whether or not there's a fix for that one issue.
I don't know offhand, this is something @ani-sinha might be best positioned to answer.
Assuming we swap the 4 and 6 in this statement above 😉 yes this would 💯 work in our configuration. For my own curiosity... is it truly necessary to have this connection prior to applying the supplied network configuration? I realize that this might be specific to curtin/maas but the network configuration is written to disk prior to rebooting the node. So it would/could be entirely practical to simply apply the network configuration on disk prior to contacting the metadata. Is this something we could define/establish within the cloud-init config to skip this "pre-networking" step? |
AFAIK no. |
If that's the case, then no. What writes it to disk and where is it written? I'm afraid that I don't have a test system to verify/experiment on.
That sounds like it should work. |
Bug report
During boot cloud-init attempts to contact the metadata and reporting services prior to configuring the network.
During cloud-init of a successfully configured node cloud-init attempts to retrieve metadata from MaaS BEFORE initializing the network.
It also fails to post status messages. In fact, the cloud-init log has dozens and dozens of reports of network failure. After about 10 pages of this and 2 minutes of failures, we get down to:
and then we configure the network. This is clearly out of order, no?
Naive ideas about improvements:
I reported this to the maas project, they claim it's a cloud-init bug. If there’s anything I or maas (via curtin) can do in the configuration to address it, please supply clue-by-four.
Steps to reproduce the problem
I'll happily supplied the complete cloud.config.d files to someone offline, but I can't post them here. Key points are
Environment details
cloud-init logs
cloud-init.tar.gz
The text was updated successfully, but these errors were encountered: