Proxmox 4.0 CT deploy doesn't report error on error

lince

Member
Apr 10, 2015
78
3
8
Hello,

I think you may wanna check this. I tried deploying a CT using the default debian template and as you can see I wasn't able to do it because I don't have enough disk space. The problem is that proxmox reports the task as "OK" when I believe it should be reporting it as "ERROR". Status is also saved as "stopped: OK".

Here are the last few lines from the output.

tar: ./var/local: Cannot mkdir: No space left on device

tar: ./var/opt: Cannot mkdir: No space left on device
tar: ./var/backups: Cannot mkdir: No space left on device
tar: ./var/mail: Cannot mkdir: No space left on device
Total bytes read: 533012480 (509MiB, 2.5MiB/s)
tar: Exiting with failure status due to previous errors
command 'tar xpf /var/lib/vz/template/cache/debian-8.0-standard_8.0-1_amd64.tar.gz --numeric-owner --totals --sparse -C /var/lib/lxc/100/rootfs --anchored --exclude './dev/*'' failed: exit code 2
TASK OK
 
Yes that's a "bug". There are some errors that you might genuinely want to ignore. Eg. for a permission denied error on mknod() for an unprivileged container you might really want to ignore it, but the default should be to error. Going to have to change this and maybe add an 'ignore-unpack-errors' option...
 
Thanks for your reply. I thought it could be a bug and I wanted to report it.

I guess you could get the return code from the tar command to know if it was successful or not and then report this to the user as error. In bash it could be done checking the variable $? but not sure if you are using something else instead of bash in the background.

Regards.
 
The problem is rather identifying which error it is exactly and deciding which of them are fatal. It makes more sense to let the user decide this, so with the next upgrades it'll by default be a fatal error unless explicitly ignored.
 
Sounds good wbumiller, I knew there was probably something I was missing hehe.

Regards.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!