Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • libvirt libvirt
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 118
    • Issues 118
    • List
    • Boards
    • Service Desk
    • Milestones
    • Requirements
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • libvirtlibvirt
  • libvirtlibvirt
  • Issues
  • #237
Closed
Open
Issue created Nov 08, 2021 by Joachim Falk@Joachim-Falk

libvirt-daemon-driver-lxc: container reboot done from inside or outside container shuts container down

Software environment

  • Operating system: Linux
  • Architecture: AMD64
  • kernel version: 5.14.0-2-amd64
  • libvirt version: 7.6.0
  • Hypervisor and version: LXC

Description of problem

Fix reboot and shutdown command for LXC containers

The virNetDaemonQuit(dmn) command in virLXCControllerSignalChildIO triggers an early close of all clients of lxc_controller. Here, libvirtd itself is a client of this controller, and the client connection is used to notify libvirtd if a reboot of the container is required. However, the client connection was closed before such a status could be sent to libvirtd. To fix this bug, we will immediately send the reboot or shutdown status of the container to libvirtd, and only after client disconnect will we trigger virNetDaemonQuit.

Steps to reproduce

  1. create LXC container ContainerName
  2. virsh start ContainerName
  3. virsh reboot ContainerName

Expected container to reboot. Actual behavior, container does not reboot and remains shut down.

Additional information

See also Debian bug #991773

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=991773

Patch

Fix-LXC-Reboot-and-Shutdown.patch

Edited Nov 08, 2021 by Joachim Falk
Assignee
Assign to
Time tracking