Fix proxmox driver raising IP error before VM is created (#68353)#69385
Merged
Conversation
The salt-cloud proxmox driver determined the deployment IP before calling wait_for_created/start/wait_for_state, and inspected the parsed UPID dict for public_ips/private_ips keys it never contains. When a profile did not set a top-level ip_address and did not opt into agent_get_ip, create() raised "Could not determine an IP address to use" before the VM was even cloned, even though Proxmox could report the running VM's address afterwards. Run the IP lookup after wait_for_state(vmid, "running"), drop the dead data[public_ips|private_ips] branches, and fall back to the IP that list_nodes() reports for the running guest. Fixes saltstack#68353
twangboy
approved these changes
Jun 8, 2026
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.
What does this PR do?
The salt-cloud proxmox driver determined the deployment IP before
cloning/starting the VM and inspected the parsed UPID dict for
public_ips/private_ipskeys that_parse_proxmox_upidneverpopulates. When a profile did not set a top-level
ip_addressand didnot opt into
agent_get_ip,create()raisedCould not determine an IP address to usebefore the VM was even cloned.This PR runs the IP lookup after
wait_for_state(vmid, "running"),drops the dead
data["public_ips"|"private_ips"]branches, and fallsback to the address
list_nodes()reports for the running guest.What issues does this PR fix or reference?
Fixes #68353
Previous Behavior
The error fired before the VM was created or started, so even profiles
where Proxmox could have reported the IP after start were unusable
without manually setting
agent_get_ipor a staticip_address.New Behavior
create()waits for the VM to be created and reach therunningstate, then determines the IP from (in order): the static
ip_addresson the profile; the address Proxmox reports vialist_nodes()for the running guest; otherwise raises the sameSaltCloudExecutionFailureso the existing error surface for genuinelyunreachable VMs is preserved. The
agent_get_ip=Truecode path isunchanged.
Scope note
salt/cloud/clouds/proxmox.pywas purged from upstream into thecommunity extensions migration on 3008.x/master (commit
dc526dc2b17), so this fix only applies to3006.xand3007.x(via merge-forward). A follow-up against the saltext-proxmox extension
repository will be required to carry the fix forward.
Merge requirements satisfied?
premature failure)
changelog/68353.fixed.md)(
test_create_waits_for_vm_before_determining_ip_68353)Commits signed with GPG?
Yes