Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(vmware): Support network events #6063

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

akutz
Copy link
Contributor

@akutz akutz commented Feb 28, 2025

Proposed Commit Message

feat(vmware): Support network events

This patch updates the DataSource for VMware to support network
reconfiguration when the BOOT, BOOT_LEGACY, BOOT_NEW_INSTANCE,
and HOTPLUG events are received.

Previously the datasource could only reconfigure the network if
a new instance ID was detected. However, due to features like
backup/restore, migrating VMs, etc., it was determined that it is
valuable to support reconfiguring the network without changing the
instance ID. This is because changing the instance ID also means
running the per-instance configuration modules, such as regenerating
the system's SSH host keys, which could lock out automation.

This patch also indicates the datasource supports network reconfig
for HOTPLUG events, such as when a new NIC is added to a VM. Please
note that HOTPLUG is only supported when the transport type is not
IMC.

Additional Context

NA

Test Steps

$ make clean_pyc && PYTHONPATH="$(pwd)" python3 -m pytest -v tests/unittests/sources/test_vmware.py >/dev/null 2>&1 && echo "success"
success

Merge type

  • Squash merge using "Proposed Commit Message"
  • Rebase and merge unique commits. Requires commit messages per-commit each referencing the pull request number (#<PR_NUM>)

Fixes #5729

@akutz
Copy link
Contributor Author

akutz commented Feb 28, 2025

cc @PengpengSun

@akutz akutz force-pushed the feature/ds-vmw-reconfig-net branch 7 times, most recently from ae2d751 to 429877d Compare February 28, 2025 18:08
@github-actions github-actions bot added the documentation This Pull Request changes documentation label Feb 28, 2025
@akutz akutz force-pushed the feature/ds-vmw-reconfig-net branch from 429877d to e9917c1 Compare February 28, 2025 22:06
@PengpengSun
Copy link
Contributor

PengpengSun commented Mar 3, 2025

Hi @akutz
I think this will address this cloud-init issue #5729, we are good when transport is guestinfo, metadata can be updated before HotPlug. But with imc transport, I need figure out how HotPlug work with live customization, usually a hardware change is before guest customization.

@akutz
Copy link
Contributor Author

akutz commented Mar 3, 2025

Hi @akutz I think this will address this cloud-init issue #5729, we are good when transport is guestinfo, metadata can be updated before HotPlug. But with imc transport, I need figure out how HotPlug work with live customization, usually a hardware change is before guest customization.

Do you think I should remove HOTPLUG if the transport is IMC then?

@akutz akutz force-pushed the feature/ds-vmw-reconfig-net branch from e9917c1 to 7351b91 Compare March 3, 2025 13:55
@akutz
Copy link
Contributor Author

akutz commented Mar 3, 2025

Hi @akutz I think this will address this cloud-init issue #5729, we are good when transport is guestinfo, metadata can be updated before HotPlug. But with imc transport, I need figure out how HotPlug work with live customization, usually a hardware change is before guest customization.

Do you think I should remove HOTPLUG if the transport is IMC then?

@PengpengSun I updated the PR so that HOTPLUG is only supported if the datasource is not using the IMC transport.

@akutz akutz force-pushed the feature/ds-vmw-reconfig-net branch from 7351b91 to d35e4a3 Compare March 3, 2025 13:56
This patch updates the DataSource for VMware to support network
reconfiguration when the BOOT, BOOT_LEGACY, BOOT_NEW_INSTANCE,
and HOTPLUG events are received.

Previously the datasource could only reconfigure the network if
a new instance ID was detected. However, due to features like
backup/restore, migrating VMs, etc., it was determined that it is
valuable to support reconfiguring the network without changing the
instance ID. This is because changing the instance ID also means
running the per-instance configuration modules, such as regenerating
the system's SSH host keys, which could lock out automation.

This patch also indicates the datasource supports network reconfig
for HOTPLUG events, such as when a new NIC is added to a VM. Please
note that HOTPLUG is only supported when the transport type is not
IMC.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation This Pull Request changes documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[enhancement]: hotplug in VMWare datasource
2 participants