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

nqirod

Member
Jul 27, 2021
3
0
6
33
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.
 

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!