Repository navigation
Conversation
NetworkConfigPlugin creates a team NIC for a VLAN link and sets its static
address right away. Windows creates the new adapter's IP interface a
moment later, so _fix_network_adapter_dhcp can find no MSFT_NetIPInterface
and the plugin fails, leaving the adapter without its address:
Creating bond network adapter "net1.1010" on team "bond_net1-team"
with VLAN: 1010
plugin 'NetworkConfigPlugin' failed with error 'Network interface
with name "net1.1010" not found'
Seen on Windows Server 2025 with a VLAN on a one-card LBFO team, half a
second after the team NIC was created; a run with 2.3 seconds in between
worked with the same names.
Retry the lookup on ItemNotFoundException, as set_network_adapter_mtu
already does, for up to about 40 seconds.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Ilia Baikov <ilia.baikov@ib.systems>
frct1
added a commit
to ib-systems/packer-openstack-images
that referenced
this pull request
Nov 18, 2026
NetworkConfigPlugin sets a static address on a VLAN team NIC before Windows has created its IP interface and fails with 'Network interface with name "net1.1010" not found', leaving the server without its management address (seen in a QEMU dry run, intermittent). cloudbase/cloudbase-init#225 retries the lookup. Until a released MSI has it, 03-cloudbase-init-pr225.ps1 replaces the 1.1.8 osutils\windows.py with the one from the PR's commit: windows.py is the same in 1.1.8 and in the PR's base, so the result is 1.1.8 plus the retry. Both files are pinned by SHA-256 (line endings aside); the build fails if the MSI brings another windows.py. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
NetworkConfigPlugincreates a team NIC for a VLAN link and sets its static address right away. Windows creates the new adapter's IP interface a moment later, so_fix_network_adapter_dhcpfinds noMSFT_NetIPInterface, raisesItemNotFoundException, and the plugin fails. The adapter is left on DHCP without its address, so the machine is unreachable on that network.From a Windows Server 2025 VM, cloudbase-init 1.1.8, a VLAN on a one-card LBFO team:
It is intermittent: another run of the same image and config, with 2.3 seconds between creating the adapter and setting the address, worked.
Fix
Retry
_fix_network_adapter_dhcponItemNotFoundException, the same wayset_network_adapter_mtualready retries its adapter lookup: up to 10 retries, 1 to 5 seconds apart (about 40 seconds in total).Tests
test_fix_network_adapter_dhcp_network_adapter_late: the interface appears on the third lookup and DHCP is set.tox -e py3 -- cloudbaseinit.tests.osutils.test_windowsandtox -e pep8pass; without the fix, the two new checks fail.Related: #47 (the same class of error for the adapter lookup by MAC address).
🤖 Generated with Claude Code