Bug 916052

Summary: several guest life cycle results are not expect
Product: Red Hat Enterprise Linux 6 Reporter: zhpeng
Component: libvirtAssignee: John Ferlan <jferlan>
Status: CLOSED WONTFIX QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.4CC: acathrow, cwei, dyuan, mzhan
Target Milestone: rcKeywords: Upstream
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-04-04 20:58:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
libvirtd log when on_poweroff is restart none

Description zhpeng 2013-02-27 06:10:50 UTC
Description of problem:
several guest life cycle results are not expect

Version-Release number of selected component (if applicable):
libvirt-0.10.2-18.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
This comes from Jiri's reply:
> 
> Hi, Jiri
> 
> I have a question about guest lifecycle control and want your help.
> Many content of element not works, i don't know if i use it in a wrong way.

Well, not all life cycle controls are applicable to all hypervisors.
What works for Xen may not even make sense for qemu. However, I suspect
we failed to document it properly.

> #virsh shutdown aaa
> 
> <on_poweroff>destroy</on_poweroff>
> Domain aaa shut off and not power up again. -----> expect

Good.

> <on_poweroff>restart</on_poweroff>
> should power up again but not.              -----> not expect

This looks like a bug in qemu driver.

> <on_poweroff>preserve</on_poweroff>
> guest poweroff, nothing happend.            ----> how to use it ?

This makes sense for Xen but I doubt it is doable with qemu. However, we
should probably tell that when a user tries to create such domain.

> <on_poweroff>rename-restart</on_poweroff>
> guest poweroff, and should boot up again with newname? but it's only powered off.  --->not expect

Does not make sense for qemu. Again, we should not silently ignore this
option.

> #virsh reboot aaa
> 
> <on_reboot>destroy</on_reboot>
> guest not boot up again. it works.

Good.

> <on_reboot>restart</on_reboot>
> guest boot up again. it works.

Good.

> <on_reboot>preserve</on_reboot>
> guest poweroff, nothing happend.    -----> how to use it ?

Likely not doable but the result is bad anyway. We take it as "destroy",
which is wrong.

> <on_reboot>rename-restart</on_reboot>
> guest poweroff, and should boot up again with newname. but it's only powered off.  --->not expect

The same as with on_poweroff.

Actual results:
As steps

Expected results:
As steps

Additional info:
> should power up again but not.              -----> not expect
This looks like a bug in qemu driver.
I'll attach libvirt debug log for this.

Comment 2 zhpeng 2013-02-27 06:16:08 UTC
Created attachment 703280 [details]
libvirtd log when  on_poweroff is restart

Comment 4 John Ferlan 2013-05-15 10:51:43 UTC
Pushed a change for this today, see:

https://www.redhat.com/archives/libvir-list/2013-April/msg01731.html

Comment 5 Jiri Denemark 2013-06-11 09:56:05 UTC
We decided not to rebase libvirt in RHEL 6.5 to avoid stability issues
we faced in 6.4. This bug has already been fixed upstream but it is
considered unsuitable for backporting to RHEL 6.5 because at least one
of the following conditions is met:

- this bug requires new API(s), which we cannot introduce without
  rebasing libvirt
- the patches required to address this bug are complex or invasive
  causing the backport to be too risky
- this bug is not important enough to justify backporting non-trivial
  patches for it

Thus I'm pushing this bug to RHEL 6.6 (and setting Upstream keyword to
indicate we have patches upstream) for now. If you don't agree with
this resolution, please, give us reasons which you think are strong
enough for us to reevaluate the decision not to backport patches for
this bug.

Comment 9 RHEL Program Management 2014-04-04 20:58:46 UTC
Development Management has reviewed and declined this request.
You may appeal this decision by reopening this request.