Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1036603

Summary: 'dir' type pool always autostart
Product: Red Hat Enterprise Linux 7 Reporter: yanbing du <ydu>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: high    
Version: 7.0CC: acathrow, berrange, dyuan, mzhan, zhwang, zpeng, zsong
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: virsh cmd
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1037456 (view as bug list) Environment:
Last Closed: 2013-12-03 09:18:35 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:
Bug Depends On:    
Bug Blocks: 1037456    

Description yanbing du 2013-12-02 10:44:07 UTC
Description of problem:
Disabel autostart of a pool, then restart libvirtd, dir' type pool always autostart.

Version-Release number of selected component (if applicable):
libvirt-1.1.1-13.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.# virsh pool-list --all
Name                 State      Autostart 
-----------------------------------------
default              inactive   no
#

# service libvirtd restart
Redirecting to /bin/systemctl restart  libvirtd.service
 
# virsh pool-list --all
Name                 State      Autostart 
----------------------------------------- 
default              active     no   

# virsh pool-autostart default --disable
Pool default unmarked as autostarted

# virsh pool-destroy default
Pool default destroyed
      

# service libvirtd restart
Redirecting to /bin/systemctl restart  libvirtd.service
 
# virsh pool-list --all
Name                 State      Autostart 
----------------------------------------- 
default              active     no   

If define a 'netfs' type pool and disable autostart, it will not start when restart libvritd.

2.
3.

Actual results:
dir' type pool always autostart when restart libvirtd

Expected results:
dir' type pool not autostart if disable autostart.

Additional info:

Comment 2 Daniel Berrangé 2013-12-03 09:18:35 UTC
When libvirtd starts up it probes all storage pools to identify if they are already active on the host. If the filesystem that the directory is located on is mounted, then the directory based pool is trivially active. This is unrelated to autostart, which aims to start pools from scratch.

Comment 3 yanbing du 2013-12-03 09:28:07 UTC
(In reply to Daniel Berrange from comment #2)
> When libvirtd starts up it probes all storage pools to identify if they are
> already active on the host. If the filesystem that the directory is located
> on is mounted, then the directory based pool is trivially active. This is
> unrelated to autostart, which aims to start pools from scratch.

So the 'pool-autostart --disable' command will not effect for this kind of pool, no matter the pool marked autostart or not, restart libvritd always start the poo? Is this make sense?

Comment 4 Daniel Berrangé 2013-12-03 09:45:18 UTC
As I said, if the filesystem containing the directory is mountd, then the directory will show as running.

Comment 5 yanbing du 2013-12-03 10:34:33 UTC
(In reply to Daniel Berrange from comment #4)
> As I said, if the filesystem containing the directory is mountd, then the
> directory will show as running.

Thanks, i got your meaning. What i'm considering is if user use the directory in local filesystem, the pool may mark as "Autostart: no", but this property will make the user very confused.
Maybe there's some way to fix this or document it somewhere, what do you think?

Comment 6 zhenfeng wang 2015-07-02 05:21:03 UTC
hi
The dir pool will always autostart while restart libvirtd, even we disable the autostart flag for the dir pool,  however,the dir pool without autostart flag won't autostart any more while restart libvirtd after libvirt-1.2.15-1.el7.x86_64,
anything change for this part? can you help check it , thanks.

Comment 7 Daniel Berrangé 2015-07-02 08:31:58 UTC
As mentioned, the dir pools should always autostart, if the directory actually exists when libvirtd starts. If this isn't happening anymore it is a regression and you should file a new bug for that.