Skip to content

cloud-init fails to fetch metadata when shared networks are present #3557

@onitake

Description

@onitake
ISSUE TYPE
  • Bug Report
COMPONENT NAME
VR
metadata
cloud-init
CLOUDSTACK VERSION
4.11.2
likely others affected as well
CONFIGURATION

Advanced networking, with isolated and shared networks.

OS / ENVIRONMENT

CentOS 7, but likely other VM operating systems affected as well.

SUMMARY

As reported here: https://bugs.launchpad.net/cloud-init/+bug/1839854

cloud-init is longer able to fetch metadata on VMs that have both isolated and shared networks attached. In older cloud-init versions (0.7.5), acquiring metadata would still succeed if network manager was used, because cloud-init would then ignore the DHCP lease files and use the default gateway.

The logic in cloud-init is to use the latest created DHCP lease file for obtaining the metadata server IP, but if that is

STEPS TO REPRODUCE
  • Deploy a VM that has cloud-init newer than 0.7.5 and attach an isolated and a shared network to the VM
  • Configure cloud-init to use CloudStack metadata
  • Depending on the OS, ensure that the shared network obtains a DHCP lease last
  • Apply metadata to the VM
EXPECTED RESULTS
  • cloud-init obtains and applies metadata on boot
ACTUAL RESULTS
  • The VM takes much longer to boot than normal,
  • fails to obtain metadata because it isn't offered by the shared network router
  • and doesn't apply metadata to the host

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions