[libvirt] [PATCH] Don't check if the path exists for LVM

Eric Benner ebenner at vultr.com
Fri Jan 17 21:57:27 UTC 2020

My mistake I sent it with a mail client and had thought I had all the
issues worked out, guess not.
I resubmitted it with when I could SMTP. Was going to post the patch
here again, but my last email
didn't thread properly so I'm just going to post the link so I'm not
posting all over
the mailing list.


On 1/10/20 7:38 AM, Michal Privoznik wrote:

On 1/6/20 12:51 AM, ebenner wrote:

I'm not entirely sure why Libvirt is checking to see if the target file
exists for LVM but it is a problem. Empty volume groups do not appear in
/dev. When libvirt starts these pools then fail to autostart because their
path does not exist. This is not useful, this is the patch we are running
to resolve this issue.

  src/storage/storage_backend_logical.c | 8 +++-----
  1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/storage/storage_backend_logical.c
index 42dec05ba0..2c60719b8c 100644
--- a/src/storage/storage_backend_logical.c
+++ b/src/storage/storage_backend_logical.c
@@ -641,11 +641,9 @@ virStorageBackendLogicalCheckPool(virStoragePoolObjPtr
      virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool);

-    /* If we can find the target.path as well as ensure that the
-     * pool's def source
-     */
-    *isActive = virFileExists(def->target.path) &&
-                virStorageBackendLogicalMatchPoolSource(pool);
+    /* Ensure that the pool's def source is correct */
+    *isActive = virStorageBackendLogicalMatchPoolSource(pool);
      return 0;

The patch makes sense, but it's missing SoB line which is required per
https://libvirt.org/hacking.html#patches point 6. I can polish the commit
message a bit and add your SoB if you reply to this e-mail with it.

BTW: how did you send the patch? It's base64 encoded and git-am can't apply

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20200117/24e82bda/attachment-0001.htm>

More information about the libvir-list mailing list