Re: [libvirt] [PATCH] virtinst: refresh pools status before fetch_pools

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11.12.2014 03:27, Chun Yan Liu wrote:


On 12/5/2014 at 09:54 PM, in message <5481B907.4040507@xxxxxxxxxx>, Cole
Robinson <crobinso@xxxxxxxxxx> wrote:
On 12/05/2014 03:40 AM, Chunyan Liu wrote:
>>> <snip/>
+        # Refresh pools before poll_helper. For those
+        # 'active' but target path not exist (or other reasons
+        # causing the pool not working), but libvirtd not
+        # refresh the status, this will make it refreshed
+        # and mark that pool as 'inactive'.
+        objs = backend.listAllStoragePools()
+        for obj in objs:
+            try:
+                obj.refresh(0)
+            except Exception, e:
+                pass
+
           return _new_poll_helper(origmap, name,
                                   backend.listAllStoragePools, build_func)
       else:


This is a very heavy hammer, refresh is a potentially long running operation

so this could cause decent slowdown in some scenarios.

IMO this is essentially a libvirt bug, for pools with target directories
(dir,
fs, netfs), libvirt should be periodically checking the directory ctime and
doing the pool refresh for us. And if the target has disappeared, it shuts
down the pool (like shutting down a VM if it crashes).


Makes sense to me. Although, refreshing a dir can again be a long running job (consider dir pool built in a NFS mount). I wonder if we should use {d,i,fa}notify or if checking ctime is enough.

Michal

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list




[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux