Re: lxc container stopped not each time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 3/5/19 5:01 PM, mxs kolo wrote:
>  Hi all.
> 
> I download  ftp://libvirt.org/libvirt/libvirt-5.1.0.tar.xz and build
> rpms with lxc support.
> LXC containers can be started, but time to time  can't be stopped.
> With option --mode initctl containers always stopped, but virsh reported error:
> "Container does not provide an initctl pipe"
> Inside container present /dev/initctl:
> # ls -la /dev/initctl
> lrwxrwxrwx 1 root root 25 Mar  5 18:40 /dev/initctl -> /run/systemd/initctl/fifo
> 
> With option --mode signal, centos 7.5/7.6  systemd not stopped and
> rebooted, in containers log:
> systemd: Received SIGTERM.
> systemd: Reexecuting.
> systemd: systemd 219 running in system mode. (+PAM +AUDIT +SELINUX
> +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS
> +ACL +XZ +LZ4 -SECCOMP +BLKID +ELFUTILS +KMOD +IDN)
> systemd: Detected virtualization lxc-libvirt.
> systemd: Detected architecture x86-64.
> Runlevel inside container  before and after  - is 5.
> 
> Without option --mode container can stop, mostly when you in gdb
> step-by-step debug.
> But most often not, with simptoms as with --mode signal. Patch in
> attachment fix problem for my environment. Tested only with host
> centos 7.6 and guests centos 7.5/7.6
> 
> Short comments on patch.
> lxcDomainShutdownFlags() return rc 0  and container begin  stopped.
> We not go to endjob label, but later we pass check:
>   if (rc == 0 &&
>         (flags == 0 ||
>          (flags & VIR_DOMAIN_SHUTDOWN_SIGNAL))) {
> and  trying next shutdown method with sigterm to pid1.
> If container heavy loaded (or waiting in gdb for input), it not
> stopped.  But if container small, first method with initctl stop
> container before second method would be call
> 

The patch looks sane, can you please post it as regular patch so that I
can review it?

Thanks,
Michal

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux