Repository navigation
fix(azure): use primary NIC when iface is None in ephemeral DHCP setup - #6556
Conversation
|
Thanks for the contribution. Please link this to the bug that this is supposed to fix. If none exists, one should be created containing full context (logs where this happened with any other relevant details).
Which conditions? Were those conditions reproducable and was this demonstrated to fix the problem when that occurs? |
Sounds good! I will get a bug made with the relevant context. For a very short overview here, three out of four calls to the Thank you for the guidance 😁 this is my first PR to Cloud-init, so I left this as a draft while I get the required materials compiled for a proper review. |
|
@cadejacobson Thanks for filing the bug. No worries - and welcome! |
|
@holmanb I have gotten this work to its final state. Could I please have you run the pipelines one more time to verify we do not need minor changes? Thanks so much! |
469b20b to
61d1bd6
Compare
|
It looks like this is waiting for updates per the latest review, so I'll hold off on reviewing it for now. |
cjp256
left a comment
There was a problem hiding this comment.
minor changes to test and LGTM!
|
Hi all, when can we expect this to be merged/released? |
holmanb
left a comment
There was a problem hiding this comment.
Thanks for this @cadejacobson. One nit, otherwise this looks good to me.
This is ready for merge on our end! I got the feedback from @holmanb addressed. |
When ephemeral networking is brought up in Azure, the selected interface (`iface`) is `None` under certain conditions. This change introduces a helper function `find_primary_nic()` which uses `net.find_candidate_nics()` to determine and select the system's primary network interface if one is not explicitly set. Additional improvements: - Log the MAC address and driver of the selected NIC for easier debugging. - Ensure the DHCP retry loop updates `iface` to the current primary NIC before retrying to obtain a lease. Fixes #6558
Proposed Commit Message
Updated Output
After these changes, the output for creating a VM reads:
Merge type
Fixes #6558