Bug 688530

Summary: The storage pool status is active after reboot although "Auto start" is not checked
Product: Red Hat Enterprise Linux 6 Reporter: mliu
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1CC: berrange, dallan, dyuan, kxiong, mliu, mzhan, nzhang
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-20 18:52:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description mliu 2011-03-17 10:21:17 UTC
Description of problem:
The storage pool status is active after reboot although "Auto start" is not checked

Version-Release number of selected component (if applicable):
virt-manager: virt-manager-0.8.6-3.el6
kernel: kernel-2.6.32-120.el6.x86_64
qemu-kvm: qemu-kvm-0.12.1.2-2.150.el6.x86_64
libvirt: libvirt-0.8.7-12.el6.x86_64


How reproducible:
Always

Steps to Reproduce:
1.Launch virt-manager
2.Open host details window: Make the connect selected, then click "Edit ->Host Details"), Go to "Storage" tab.
3.Click the Storage pool, uncheck the check box beside "Auto start", click "Apply" if status changed.
4.reboot the host
5.Launch virt-manager and open host detail window after reboot have succeed.
  
Actual results:
The storage is running after reboot

Expected results:
The storage should not have running

Additional info:

Comment 2 RHEL Program Management 2011-04-04 02:01:43 UTC
Since RHEL 6.1 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.

Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.

Comment 3 Cole Robinson 2011-04-07 19:17:07 UTC
Can you test this outside of virt-manager.

Open virt-manager, uncheck the "auto start" option for the pool.
Stop virt-manager
verify that virsh pool-list --all shows autostart 'no'
restart the host
before starting virt-manager, check what virsh pool-list --all reports for running pool and autostart values
start virt-manager, see what virt-manager reports
recheck what virsh is reporting

Comment 4 mliu 2011-04-08 04:52:38 UTC
Hi Cole Robinson,

I test it according your comment, following is the step and result:

1. My pool default status is:
# virsh pool-list --all
Name                 State      Autostart 
-----------------------------------------
default              active     yes        
test                 active     yes

2. Open virt-manager, uncheck the "auto start" option for the pool, stop virt-manager, the pool status is:
# virsh pool-list --all
Name                 State      Autostart 
-----------------------------------------
default              active     no        
test                 active     no

3. Restart the host, before starting virt-manager, the pool status is:
# virsh pool-list --all
Name                 State      Autostart 
-----------------------------------------
default              active     no        
test                 inactive   no

4. Start virt-manager, I can see the 'default' pool is active, and 'test' pool is inactive

5. virsh report is :
# virsh pool-list --all
Name                 State      Autostart 
-----------------------------------------
default              active     no        
test                 inactive   no

Comment 5 Cole Robinson 2011-07-19 17:20:50 UTC
according to this output, at step 3, the default pool is already active. so it doesn't sound like this is virt-manager doing, but I don't know what is causing the problem.

is step 3 output correct here? if so, what's the output of 'ls /etc/libvirt/storage/autostart' after each step?

Reassigning to libvirt

Comment 6 Daniel Berrangé 2011-07-19 17:39:48 UTC
When libvirtd starts up, it'll check to see if any of the storage pools have been activated externally. If this is so, then it'll mark the pool as active. This is independent of autostart.  A directory based storage pool is thus pretty much always active

Comment 7 Dave Allan 2011-07-19 20:07:30 UTC
(In reply to comment #6)
> When libvirtd starts up, it'll check to see if any of the storage pools have
> been activated externally. If this is so, then it'll mark the pool as active.
> This is independent of autostart.  A directory based storage pool is thus
> pretty much always active

Given that, I'd say this is not a bug.  Dan, what do you think?

Comment 8 Daniel Berrangé 2011-07-20 10:01:53 UTC
Well the original reporter didn't give any specific info of what type of storage pool they are using, but assuming they hit the scenario I describe, it is not a bug.

Comment 9 Dave Allan 2011-07-20 18:52:58 UTC
I have seen this behavior with iSCSI pools as well.  The iSCSI initiator logs into the target automatically and libvirt recognizes the pool (correctly) as active.  I'm resolving as NOTABUG.