Page MenuHomeVyOS Platform

Cloud-Init cannot fetch Meta-data on machines where the main Ethernet interface is not eth0
Closed, ResolvedPublicFEATURE REQUEST

Description

There is a problem with deployments, where the main Ethernet interface is any other except eth0 and Cloud-Init needs to fetch meta-data from the network.

Unfortunately, Cloud-Init has limited variants of ways for network configuration before a stage where it needs to fetch meta-data:

  • configuration file
  • kernel command line
  • initramfs config
  • fallback DHCP client on eth0

In the vast majority of cases, DHCP on eth0 does the work. But not in this one.

From these options, we cannot use initramfs because we do not initiate the network there (except PXE boot, but this is another story) and kernel command line, because we cannot modify it dynamically (actually, this is not 100% true, but performing Ethernet interfaces analysis from GRUB, seems to be too much if possible at all).

So, there is one sensible place where we still can do something - Cloud-Init configuration. I think we need to write a systemd service that will start before Cloud-Init, check all available interfaces for the DHCP server, and add this information to the Cloud-Init config. This will solve the problem (already tested).

Details

Version
-
Is it a breaking change?
Perfectly compatible

Event Timeline

zsdc changed the task status from Open to In progress.
zsdc claimed this task.
Viacheslav moved this task from Open to Finished on the VyOS 1.4 Sagitta board.
Viacheslav moved this task from Need Triage to Finished on the VyOS 1.3 Equuleus (1.3.4) board.