[libvirt] [PATCH REPOST] Revert "lxc: Try harder to stop/reboot containers"

Michal Privoznik mprivozn at redhat.com
Thu Aug 29 14:48:52 UTC 2019


On 8/29/19 1:26 PM, Daniel P. Berrangé wrote:
> This reverts commit 14b6a1854fb4c02c5fb2f51679f8ff099f28f53c.
> 
> If virLXCDomainSetRunlevel returns -1 this indicates a serious
> error / failure that must be propagated to the caller. We must
> not carry on with other shutdown methods in this case.
> 
> If virLXCDomainSetRunlevel return 0, this indicates that no
> initctl was found and it is thus reasonable to fallback to
> sending SIGTERM.
> 
> The commit being reverted is broken because it would fallback
> to SIGTERM when virLXCDomainSetRunlevel returns -1, and would
> not fallback when virLXCDomainSetRunlevel returns 0. ie it
> did the exact opposite of what was required.
> 
> Signed-off-by: Daniel P. Berrangé <berrange at redhat.com>
> ---
>   src/lxc/lxc_driver.c | 40 ++++++++++++++++++++++------------------
>   1 file changed, 22 insertions(+), 18 deletions(-)

Reviewed-by: Michal Privoznik <mprivozn at redhat.com>

Michal




More information about the libvir-list mailing list