vm-provision: failed cloud-image download hides the reason and leaves its .tmp behind #3

Open
opened 2026-10-02 04:17:56 +00:00 by christianmanivong · 0 comments
Owner

Failure

VM provisioning on pve-dual failed with:

Command failed (exit 3): wget -q -O /var/lib/vz/template/netork-images/ac88e7c71777-ubuntu-26.04-server-cloudimg-amd64.img.tmp '…' && mv ….tmp ….img

and nothing after it.

  • wget exit 3 is a file I/O error.
  • The actual cause was that pve-dual's root FS (/dev/mapper/pve-root, 6.5 G, which holds /var/lib/vz) was 100 % full.
  • A 227 MB partial .tmp was left behind in the cache dir and kept taking up the space.

Problems in napalm_proxmox/vm_provision_mixin.py _download_cloud_image

  1. The reason is hidden. wget -q prints nothing, so the error carries an empty stderr. -nv (or capturing wget's own message) would surface "No space left on device".
  2. The partial download stays. A failed wget leaves <path>.tmp, so every retry starts by occupying the same space again. Remove it on failure (|| { rm -f <tmp>; exit 1; }).
  3. Optional: check the free space of the cache filesystem against the image's Content-Length before downloading, and fail with a clear message.
  4. Optional: the cache never evicts old builds (1f92ecd3b0ab-ubuntu-24.04…img, 625 MB, from 2026-09-26 is still there).
## Failure VM provisioning on `pve-dual` failed with: ``` Command failed (exit 3): wget -q -O /var/lib/vz/template/netork-images/ac88e7c71777-ubuntu-26.04-server-cloudimg-amd64.img.tmp '…' && mv ….tmp ….img ``` and nothing after it. - wget exit 3 is a file I/O error. - The actual cause was that `pve-dual`'s root FS (`/dev/mapper/pve-root`, 6.5 G, which holds `/var/lib/vz`) was 100 % full. - A 227 MB partial `.tmp` was left behind in the cache dir and kept taking up the space. ## Problems in `napalm_proxmox/vm_provision_mixin.py` `_download_cloud_image` 1. **The reason is hidden.** `wget -q` prints nothing, so the error carries an empty stderr. `-nv` (or capturing wget's own message) would surface "No space left on device". 2. **The partial download stays.** A failed `wget` leaves `<path>.tmp`, so every retry starts by occupying the same space again. Remove it on failure (`|| { rm -f <tmp>; exit 1; }`). 3. Optional: check the free space of the cache filesystem against the image's `Content-Length` before downloading, and fail with a clear message. 4. Optional: the cache never evicts old builds (`1f92ecd3b0ab-ubuntu-24.04…img`, 625 MB, from 2026-09-26 is still there).
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: NAPALM/napalm-proxmox#3