Re: cloud-init switching to udhcpc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/7/24 07:36, Petr Menšík wrote:
I am interested why two DHCP clients are required inside a single tool. Why it could not use NetworkManager in both times, but with some different settings? Maybe alternative service? If there is missing ability to change behaviour, it may make sense to fix just that. Instead of keeping another client maintained. Do we support any kind of images, which would not have Network Manager present?

One of the design goals of cloud-init is to use the dhcp client to get just enough networking done so the cloud instance can get to the cloud's metadata service. That metadata service provides information about network configuration, users, ssh keys, initial scripts, and more.

If NetworkManager is used for this step, then the network would need to be fully reconfigured when cloud-init finishes. It's my understanding that they block the boot until the network configuration is fully completed (using data from the metadata service) and then NetworkManager is allowed to continue.

If we had just NetworkManager-metadata.service, using alternate state directory as well, couldn't it provide similar functionality as additional dhcpcd/dhclient? Just with few configuration files in addition, instead of additional compiled package(s)?

That's certainly possible, but the cloud-init design goal seems to be to hold off on NetworkManager until the network is fully configured.

Are there simple steps, where I can as a dhcpcd maintainer try, how exactly is dhcpcd used during instance configuration process? Can I prepare VM image using mentioned metadata? Do we have any documentation on this topic for Fedora or RHEL at least? Can you point me to some documentation, how to test it?

Sure! You can build a Fedora cloud instance on a cloud of your choice, and rawhide should be using dhclient by default. However, cloud-init has not done a release yet with full dhcpcd support.

Once cloud-init makes a new release with dhcpcd support, you can remove dhclient, add dhcpcd, and re-run cloud-init by doing the following:

  dnf remove dhcp-client
  dnf install dhcpcd
  cloud-init clean --logs --reboot

I hope that helps!

--
Major Hayden
--
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux