RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 589853 - [LXC] Disable 'autostart' doesn't take effect actually
Summary: [LXC] Disable 'autostart' doesn't take effect actually
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.0
Hardware: i386
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Jiri Denemark
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: Rhel6.1LibvirtTier1
TreeView+ depends on / blocked
 
Reported: 2010-05-07 05:50 UTC by zhanghaiyan
Modified: 2010-12-15 05:15 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-10-11 15:19:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description zhanghaiyan 2010-05-07 05:50:50 UTC
Description of problem:
Disable the 'autostart' for a running guest, it seems take effect when checking dominfo. But after restart libvirtd service, the guest is stilling running as 'autostart' is enabled.

Version-Release number of selected component (if applicable):
- kernel-2.6.32-24.el6.i686
- libvirt-0.8.1-1.el6.i686

How reproducible:
Always

Steps to Reproduce:
1. # cat vm1.xml
<domain type='lxc'>
	<name>vm1</name>
	<memory>500000</memory>
	<os>
		<type>exe</type>
		<init>/bin/sh</init>
	</os>
	<vcpu>1</vcpu>
	<clock offset='utc'/>
	<on_poweroff>destroy</on_poweroff>
	<on_reboot>restart</on_reboot>
	<on_crash>destroy</on_crash>
	<devices>
		<emulator>/usr/libexec/libvirt_lxc</emulator>
		<interface type='network'>
			<source network='default'/>
		</interface>
		<console type='pty' />
	</devices>
</domain>
2. # virsh define vm1.xml

3. # virsh start vm1
Domain vm1 started

4.# virsh list --all
 Id Name                 State
----------------------------------
4584 vm1                  running
  - fedora-rawhide       shut off

5. # virsh dominfo vm1
Id:             4584
Name:           vm1
UUID:           c53ea2c3-8291-b6e0-ee4f-329ef23944b2
OS Type:        exe
State:          running
CPU(s):         1
CPU time:       0.0s
Max memory:     500000 kB
Used memory:    320 kB
Autostart:      disable

6. # service libvirtd restart
Stopping libvirtd daemon:                                  [  OK  ]
Starting libvirtd daemon:                                  [  O

7. # virsh list --all
 Id Name                 State
----------------------------------
4584 vm1                  running
  - fedora-rawhide       shut off

[root@dhcp-66-70-184 Downloads]# virsh dominfo vm1
Id:             4584
Name:           vm1
UUID:           c53ea2c3-8291-b6e0-ee4f-329ef23944b2
OS Type:        exe
State:          running
CPU(s):         1
CPU time:       0.0s
Max memory:     500000 kB
Used memory:    320 kB
Autostart:      disable

  
Actual results:
After restart libvirtd service, the guest is stilling running. (The same behavior like when 'autostart' is enabled)

Expected results:
After restart libvirtd service, the guest should be shut off as the 'autostart' is disabled

Additional info:
When the 'autostart' is enabled, after restart libvirtd service, the guest is running status. This is expected result.

Comment 2 RHEL Program Management 2010-05-07 07:56:11 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 4 Ryota Ozaki 2010-08-05 11:38:52 UTC
(In reply to comment #0)
> Description of problem:
> Disable the 'autostart' for a running guest, it seems take effect when checking
> dominfo. But after restart libvirtd service, the guest is stilling running as
> 'autostart' is enabled.
> 
(snip)
> 
> Actual results:
> After restart libvirtd service, the guest is stilling running. (The same
> behavior like when 'autostart' is enabled)
> 
> Expected results:
> After restart libvirtd service, the guest should be shut off as the 'autostart'
> is disabled

This is NOTABUG because 'autostart' doesn't guarantee anything about shutdown of domains. The result is expected as the API definition.

> 
> Additional info:
> When the 'autostart' is enabled, after restart libvirtd service, the guest is
> running status. This is expected result.

Comment 5 Daniel Veillard 2010-10-11 15:19:11 UTC
As comment #4 rightly pointed out, when libvirtd stops it doesn't stop the
guests so in this scenario the behaviour is just fine,

Daniel


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