[pve-devel] [PATCH v5 container 0/4] lxc@ service: fix dependencies

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Oct 11 14:45:34 CEST 2017


On 10/11/2017 02:13 PM, Fabian Grünbichler wrote:
> this series improves the systemd integration of LXC containers by:
> - ensuring PVE LXC container units don't have a (transitive) conflict with shutdown.target, thus preventing races between systemd- and pve-ha-lrm/pve-guest initiated stopping of containers
> - reworking the stop/reboot handling to reduce log spam of failed redundant lxc-stop calls, by only calling lxc-stop in our wrapper if the unit has not already successfully exited
> - installing snippets/unit to the correct location in /lib/systemd/system
> 
> changes since v4:
> - copy and rework lxc-pve-reboot-trigger as pve-container-stop-wrapper
> - use pve-container-stop-wrapper as ExecStop in pve-container@, instead of lxc-stop as ExecStop and lxc-pve-reboot-trigger as ExecStopPost
> 
> tested the following scenarios:
> - shutdown and reboot from within
> - shutdown via pct stop/API
> - shutdown and restart via systemctl stop/restart
> 
> Fabian Grünbichler (4):
>   install lxc@ snippets to correct location
>   add new pve-container units
>   switch to pve-container@ unit
>   build: mark lxc at .service.d for future removal
> 
>  src/Makefile                         | 15 +++++++++++----
>  src/PVE/API2/LXC/Status.pm           |  2 +-
>  src/PVE/VZDump/LXC.pm                |  2 +-
>  src/lxc-pve-poststop-hook            |  7 ++++---
>  src/pve-container-stop-wrapper       | 20 ++++++++++++++++++++
>  src/pve-container at .service           | 18 ++++++++++++++++++
>  "src/system-pve\\x2dcontainer.slice" |  9 +++++++++
>  7 files changed, 64 insertions(+), 9 deletions(-)
>  create mode 100755 src/pve-container-stop-wrapper
>  create mode 100644 src/pve-container at .service
>  create mode 100644 "src/system-pve\\x2dcontainer.slice"
> 

Tested a bit around, seems to work all good here now.





More information about the pve-devel mailing list