Skip to content

Optionally wait on VM to get IP address - #99

Merged
justinc1 merged 2 commits into
mainfrom
wait-net
Dec 4, 2025
Merged

justinc1 merged 2 commits into
mainfrom
wait-net

Conversation

@justinc1

@justinc1 justinc1 commented Dec 3, 2025

Copy link
Copy Markdown
Collaborator

PR add optional wait on VM to get IP address. This is enabled by setting wait_for_guest_net_timeout in hypercore_vm_power_state resource. Unit for wait_for_guest_net_timeout are seconds.

Partially fixes #96 - the tests are missing. I tested code manually, using Alma 10 cloud image.

PR also fixes nice ACPI VM shutdown bug. The rest API does return a taskTag if we start VM. But it does not return a taskTag for a nice VM shutdown ("actionType":"SHUTDOWN"). This resulted in provider failure - provider noticed VM is still running after "actionType":"SHUTDOWN", and thought shutdown request was somehow ignored. In fact provider just need to wait a bit. Wait time is limited to 300 sec.

CI failure in TestAccHypercoreVMsDatasource_stopped - the test VM has more disks/nics than our test expects. I think because the same VM name is used in ansible collection tests.

@justinc1
justinc1 requested a review from anazobec December 3, 2025 21:19
Signed-off-by: Justin Cinkelj <justin.cinkelj@xlab.si>
Signed-off-by: Justin Cinkelj <justin.cinkelj@xlab.si>
@anazobec

anazobec commented Dec 4, 2025

Copy link
Copy Markdown
Collaborator

I think this looks good, thanks @justinc1! Approved.

@justinc1
justinc1 merged commit e7041bb into main Dec 4, 2025
3 of 4 checks passed
@justinc1
justinc1 deleted the wait-net branch December 4, 2025 08:23
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jan 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add network waiter to hypercore provider - wait for IP to be retrieved by guest agent

2 participants