CloudStack datasource: querying data-server does not work on Fedora 34
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Cloud provider: CloudStack
CloudStack datasource uses multiple ways to determine the address of the metadata server. One of them (and sometimes the only available) is using a DNS query with hostname "data-server".
However, DNS resolution of "data-server" works because of the DNS search domain, which works well with Fedora 33 but not with Fedora 34.
In Python:
- With Fedora 33:
from socket import getaddrinfo
getaddrinfo(
getaddrinfo(
- With Fedora 34:
from socket import getaddrinfo
getaddrinfo(
getaddrinfo(
This is not caused by a change in Python (Python 3.9.6 is used for both) but probably in the underlying getaddrinfo implementation.
As the final dot is normally used to prevent using the DNS search domain, the error is actually normal, and the dot should be removed for cloud-init to work.
Changed in cloud-init: | |
status: | Incomplete → Fix Committed |
Hi Olivier. I think I need a little more context here. I'm not familiar with CloudStack.
Whats the FQDN of the metadata service? If it is anything beyond 'data-server.', then why aren't we specifying the FQDN rather than specifying a relative domain? If the FQDN is simply 'data-server.', I would need to understand what changed underneath us to justify switching to a relative domain.
"This is not caused by a change in Python (Python 3.9.6 is used for both) but probably in the underlying getaddrinfo implementation." 'localhost. ', 80) works fine. Similarly, I can hardcode a known server into /etc/hosts as 'test-server' and getaddrinfo( 'test-server. ', 80) works.
That isn't really enough of a justification. Can you point to something specific that changed? I can currently launch a fedora 34 instance, start a service on port 80, and getaddrinfo(
Is there something else that needs to be done to reproduce this behavior?