Can't find proper metadata source IP - Interoperability problem with CentOS8/Stream, NetworkManager and Apache CloudStack
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Expired
|
Medium
|
Unassigned |
Bug Description
System environment: Apache CloudStack 4.11; KVM zone
In CentOS 8 either Upstream, there is NetworkManager. cloud-init currently packaged there is 20.3-9.el8.
We are talking about the code of the CloudStack datasource.
What we observe, is that on our CentOS test systems, cloud-init jumps into the default_gateway() method to return VR IP address 192.xxx.xxx.1. This is however wrong, this IP does not return metadata. To compare, an Ubuntu 20.04 deployed on same network resolves to 192.xxx.xxx.5.
This IP can be found under /run/NetworkMan
./NetworkManage
./NetworkManage
./NetworkManage
While CloudStack datasource follows several approaches to find the IP, the code does not seem to implement the situation when there is NetworkManager.
What happens instead:
- first approach is to try data-server DNS entry first; this is up to our system, we will try out as well
- then, it looks for DHCP lease file location "/run/systemd/
- then, it finds lease file /var/lib/
- well and finally it is going to the default gateway method.
Would you say this is a bug, or maybe a missing feature to ensure interoperability with NetworkManager? (in terms that cloudinit does not look under /run/NetworkMan
description: | updated |
description: | updated |
Changed in cloud-init: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
P.S. asked also at https:/ /gitlab. freedesktop. org/NetworkMana ger/NetworkMana ger/-/issues/ 658