Bug 707801 - Fail to shutdown lxc guest
Summary: Fail to shutdown lxc guest
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-05-26 02:12 UTC by zhanghaiyan
Modified: 2016-04-26 20:52 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-17 14:48:51 UTC


Attachments (Terms of Use)

Description zhanghaiyan 2011-05-26 02:12:52 UTC
Description of problem:
Failed to shutdown lxc guest

Version-Release number of selected component (if applicable):
libvirt-0.9.1-1.el6.x86_64
kernel-2.6.32-131.0.15.el6.x86_64
qemu-kvm-0.12.1.2-2.162.el6.x86_64

How reproducible:
3/3

Steps to Reproduce:
1. virsh # define vm1.xml 
Domain fedora-rawhide defined from vm1.xml
2. virsh # start fedora-rawhide
Domain fedora-rawhide started
virsh # list --all
 Id Name                 State
----------------------------------
28251 fedora-rawhide       running
3. virsh # shutdown fedora-rawhide
error: Failed to shutdown domain fedora-rawhide
error: this function is not supported by the connection driver: virDomainShutdown
virsh # list --all
 Id Name                 State
----------------------------------
28251 fedora-rawhide       running
4. virsh # destroy fedora-rawhide
Domain fedora-rawhide destroyed

virsh # list --all
 Id Name                 State
----------------------------------
  - fedora-rawhide       shut off

Actual results:
In step3, failed to shutdown the guest while can destroy the guest

Expected results:
Should be able to shutdown the lxc guest as before

Additional info:
It is a regression bug

Comment 2 Osier Yang 2011-05-30 09:34:37 UTC
LXC driver has never supported domain shutdown, so this shouldn't be a regression.

Comment 6 Ján Tomko 2015-03-17 14:48:51 UTC
Added upstream by:
commit cbb106f807b32f1f6af22d1e92fe0ff9ba6d73b3
Author:     Daniel P. Berrange <berrange>
AuthorDate: 2012-11-28 13:26:52 +0000
Commit:     Daniel P. Berrange <berrange>
CommitDate: 2012-11-30 19:20:14 +0000

    Add support for shutdown / reboot APIs in LXC driver
    
    Add support for doing controlled shutdown / reboot in the LXC
    driver. The default behaviour is to try talking to /dev/initctl
    inside the container's virtual root (/proc/$INITPID/root). This
    works with sysvinit or systemd. If that file does not exist
    then send SIGTERM (for shutdown) or SIGHUP (for reboot). These
    signals are not any kind of particular standard for shutdown
    or reboot, just something apps can choose to handle. The new
    virDomainSendProcessSignal allows for sending custom signals.
    
    We might allow the choice of SIGTERM/HUP to be configured for
    LXC containers via the XML in the future.
    
    Signed-off-by: Daniel P. Berrange <berrange>

git describe: v1.0.0-204-gcbb106f contains: v1.0.1-rc1~113


Note You need to log in before you can comment on or make changes to this bug.