[SOLVED] Issue with post-stop phase in hookscripts on Debian Bookworm / Proxmox 8

nqirod

Member
Jul 27, 2021
3
0
6
35
Hello,

I've installed Proxmox 8 on a new Host in Debian bookworm (6.2.16-3-pve) and i noticed that the phase "post-stop" in my hookscript is not executed. It seems that the "post-stop" argument is not passed, i tried with a simple bash script and all the phases are ran but the post-stop one. Am i alone with this issue ?

Thanks if you could help me.

Best Regards.
 
This hookscipt (that deletes the VM!) definitely works but you won't see the post-stop output in the Task in the Proxmox web GUI.
Bash:
#!/bin/bash
if [ "$2" == "pre-start" ]
then
    echo "VM $1 will self-destruct after shutdown!"
elif [ "$2" == "post-stop" ]
then
    nohup /usr/sbin/qm destroy "$1" &>/dev/null &
fi
How do you check that the other phases are run and that post-stop is not? What does your script look like?

EDIT: I forgot this system is not yet over to PVE 8, so maybe it is indeed a regression.
 
Last edited:
Hello, thanks for replying.

Yup, i know the output is not in the task log.
For testing, I write files at each step to check if they work.

Bash:
#!/bin/bash
if [ "$2" == "pre-start" ]; then
    echo 1 >> /tmp/1
elif [ "$2" == "post-start" ]; then
    echo 1 >> /tmp/2
elif [ "$2" == "pre-stop" ]; then
    echo 1 >> /tmp/3
elif [ "$2" == "post-stop" ]; then
    echo 1 >> /tmp/4
fi

The four files are written on Proxmox 7/Bullseye but not the "4" file on Proxmox 8/Bookworm.

Where can i go to check what is happening ?
 
Oh, i saw i had conflict with firmware-linux-free, after i mark hold this package and dist-upgrade, it works fine, even if I don't know why, haha. I mak this thread as solved.
 
Oh, i saw i had conflict with firmware-linux-free, after i mark hold this package and dist-upgrade, it works fine, even if I don't know why, haha. I mak this thread as solved.

My post-stop isn't running either. How did you detect the conflict you mention?
 
EDIT: I forgot this system is not yet over to PVE 8, so maybe it is indeed a regression.
My script runs post-stop fine (also on PVE 8.x). Note that using qm commands need to be done in parallel (using &) because the VM configuration file is locked while the script runs.