Bug 1036603 - 'dir' type pool always autostart
Summary: 'dir' type pool always autostart
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: rc
: ---
Assignee: Libvirt Maintainers
QA Contact: Virtualization Bugs
URL:
Whiteboard: virsh cmd
Depends On:
Blocks: 1037456
TreeView+ depends on / blocked
 
Reported: 2013-12-02 10:44 UTC by yanbing du
Modified: 2015-07-02 08:31 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1037456 (view as bug list)
Environment:
Last Closed: 2013-12-03 09:18:35 UTC
Target Upstream Version:


Attachments (Terms of Use)

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.


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