Page MenuHomeVyOS Platform

dhclient started by Cloud-init stays alive forever
Closed, ResolvedPublicBUG

Description

Some of the data sources contain VyOS-specific code that starts dhclient before fetching metadata:
https://github.com/vyos/vyos-cloud-init/blob/d695c78d291d192cc711659f89524395b3bd1d6f/cloudinit/sources/DataSourceAzure.py#L272-L276
https://github.com/vyos/vyos-cloud-init/blob/d695c78d291d192cc711659f89524395b3bd1d6f/cloudinit/sources/DataSourceEc2.py#L48-L52
https://github.com/vyos/vyos-cloud-init/blob/d695c78d291d192cc711659f89524395b3bd1d6f/cloudinit/sources/DataSourceGCE.py#L56-L60

This client stays active even after the full boot. This leads to the two issues:

  • it interferes with manual settings of IP addresses and routes
  • if an interface required to fetch metadata is not eth0, metadata may be not available, because dhclient drops the default route required to connect metadata server.

This trick with dhclient inside datasource was necessary because Debian does not apply network config autogenerated by Cloud-init, but this was fixed in the https://github.com/canonical/cloud-init/commit/a6faf3acef02bd8cd4d46ac9efeebf24b3f21d81#diff-538e433837b239e5fa3934aba14da94ac4fef0b6730e6fede272739db16ac14f

Due to the problems mentioned above, will be better to apply the fix from Cloud-init and remove additional dhclient calls from datasources.

Details

Difficulty level
Normal (likely a few hours)
Version
1.2.6-S1
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Behavior change