← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1915216] [NEW] Can't find proper metadata source IP - Interoperability problem with CentOS8/Stream, NetworkManager and Apache CloudStack

 

Public bug reported:

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.102.146.1.
This is however wrong, this IP does not return metadata. To compare, an
Ubuntu 20.04 deployed on same network resolves to 192.102.146.5.

This IP can be found under /run/NetworkManager:

./NetworkManager/resolv.conf:nameserver 192.102.146.5
./NetworkManager/no-stub-resolv.conf:nameserver 192.102.146.5
./NetworkManager/devices/2:next-server=192.102.146.5

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/netif/leases". For some reason, this value is a hardcoded variable in net/dhcp.py: NETWORKD_LEASES_DIR = '/run/systemd/netif/leases'
- then, it finds lease file /var/lib/NetworkManager/internal-ea2b5464-7c5e-3243-aa40-7d77805f41ee-ens3.lease, but there is (as opposite to what we see in Ubuntu) just one line, "ADDRESS=192.102.146.34" - why this file does not contain the expected entry "SERVER_ADDRESS=192.102.146.5" as well, I am not sure.
- 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/NetworkManager/)

** Affects: cloud-init
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1915216

Title:
  Can't find proper metadata source IP - Interoperability problem with
  CentOS8/Stream, NetworkManager and Apache CloudStack

Status in cloud-init:
  New

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.102.146.1. This is however wrong, this IP does not return
  metadata. To compare, an Ubuntu 20.04 deployed on same network
  resolves to 192.102.146.5.

  This IP can be found under /run/NetworkManager:

  ./NetworkManager/resolv.conf:nameserver 192.102.146.5
  ./NetworkManager/no-stub-resolv.conf:nameserver 192.102.146.5
  ./NetworkManager/devices/2:next-server=192.102.146.5

  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/netif/leases". For some reason, this value is a hardcoded variable in net/dhcp.py: NETWORKD_LEASES_DIR = '/run/systemd/netif/leases'
  - then, it finds lease file /var/lib/NetworkManager/internal-ea2b5464-7c5e-3243-aa40-7d77805f41ee-ens3.lease, but there is (as opposite to what we see in Ubuntu) just one line, "ADDRESS=192.102.146.34" - why this file does not contain the expected entry "SERVER_ADDRESS=192.102.146.5" as well, I am not sure.
  - 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/NetworkManager/)

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1915216/+subscriptions


Follow ups