Skip to content

Fix proxmox driver raising IP error before VM is created (#68353)#69385

Merged
dwoz merged 1 commit into
saltstack:3006.xfrom
dwoz:fix/issue-68353
Jun 8, 2026
Merged

Fix proxmox driver raising IP error before VM is created (#68353)#69385
dwoz merged 1 commit into
saltstack:3006.xfrom
dwoz:fix/issue-68353

Conversation

@dwoz

@dwoz dwoz commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

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_ips keys that _parse_proxmox_upid never
populates. 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.

This PR runs the IP lookup after wait_for_state(vmid, "running"),
drops the dead data["public_ips"|"private_ips"] branches, and falls
back to the address list_nodes() reports for the running guest.

What issues does this PR fix or reference?

Fixes #68353

Previous Behavior

[ERROR   ] Failed to deploy 'deploy-test-01.domain.local'. Error: Could not determine an IP address to use
  File ".../salt/cloud/clouds/proxmox.py", line 710, in create
    raise SaltCloudExecutionFailure("Could not determine an IP address to use")
salt.exceptions.SaltCloudExecutionFailure: Could not determine an IP address to use

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_ip or a static ip_address.

New Behavior

create() waits for the VM to be created and reach the running
state, then determines the IP from (in order): the static
ip_address on the profile; the address Proxmox reports via
list_nodes() for the running guest; otherwise raises the same
SaltCloudExecutionFailure so the existing error surface for genuinely
unreachable VMs is preserved. The agent_get_ip=True code path is
unchanged.

Scope note

salt/cloud/clouds/proxmox.py was purged from upstream into the
community extensions migration on 3008.x/master (commit
dc526dc2b17), so this fix only applies to 3006.x and 3007.x
(via merge-forward). A follow-up against the saltext-proxmox extension
repository will be required to carry the fix forward.

Merge requirements satisfied?

  • Docs (no doc change required — error path was an undocumented
    premature failure)
  • Changelog (changelog/68353.fixed.md)
  • Tests written/updated
    (test_create_waits_for_vm_before_determining_ip_68353)

Commits signed with GPG?

Yes

@dwoz dwoz requested a review from a team as a code owner June 7, 2026 08:52
@dwoz dwoz added this to the Sulphur v3006.26 milestone Jun 7, 2026
@dwoz dwoz added the test:full Run the full test suite label Jun 7, 2026
@dwoz dwoz force-pushed the fix/issue-68353 branch from c06be63 to a6f1f53 Compare June 8, 2026 00:27
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
@dwoz dwoz merged commit 3406748 into saltstack:3006.x Jun 8, 2026
811 of 818 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:full Run the full test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants