Package: libvirt-daemon-system Version: 3.0.0-4+deb9u3+infomaniak+1 Severity: important
Hi, After editing the libvirt parameters, it is necessary to restart it. At least, that's what does puppet-openstack. Unfortunately, it is currently impossible to do so, as libvirt doesn't stop. Adding these parameters fixes the issue: PIDFile=/var/run/libvirtd.pid KillSignal=SIGKILL As the .service file is generated by the upstream code, here's a small shell script that I hacked to insert the above at build time: === script start === #!/bin/sh set -e PATH_TO_FILE=`pwd`/debian/libvirt-daemon-system/lib/systemd/system/libvirtd.service #PATH_TO_FILE=/lib/systemd/system/libvirtd.service SERVICE_SECTION_LINE=$(grep -n 'Service' ${PATH_TO_FILE} | cut -d: -f1) TOTAL_NUM_LINE=$(cat ${PATH_TO_FILE} | wc -l) TMP_FILE=$(mktemp) NUM_LINE_UNTIL_END_OF_FILE=$((${TOTAL_NUM_LINE} - ${SERVICE_SECTION_LINE})) head -n ${SERVICE_SECTION_LINE} ${PATH_TO_FILE} >${TMP_FILE} echo "PIDFile=/var/run/libvirtd.pid" >>${TMP_FILE} echo "KillSignal=SIGKILL" >>${TMP_FILE} tail -n ${NUM_LINE_UNTIL_END_OF_FILE} ${PATH_TO_FILE} >>${TMP_FILE} cat ${TMP_FILE} >${PATH_TO_FILE} rm ${TMP_FILE} === script end === Then in debian/rules, I called it just right after this statement: dh_systemd_start -p libvirt-daemon-system --no-restart-on-upgrade $(LIBVIRT_SYSTEM_SERVICES) Please do enable this hack, this is important as otherwise, this simply completely breaks puppet-openstack that thinks it cannot restart libvirt: because it can't turn it off, systemd reports the service isn't started. Cheers, Thomas Goirand (zigo)