[PATCH 1/5] storage: Add debug logs for storage pool config loading

Peter Krempa pkrempa at redhat.com
Thu Jan 20 11:45:54 UTC 2022


Signed-off-by: Peter Krempa <pkrempa at redhat.com>
---
 src/conf/virstorageobj.c     | 4 ++++
 src/storage/storage_driver.c | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/src/conf/virstorageobj.c b/src/conf/virstorageobj.c
index 02903ac487..815ada8584 100644
--- a/src/conf/virstorageobj.c
+++ b/src/conf/virstorageobj.c
@@ -1614,6 +1614,8 @@ virStoragePoolObjLoad(virStoragePoolObjList *pools,
     virStoragePoolObj *obj;
     g_autoptr(virStoragePoolDef) def = NULL;

+    VIR_DEBUG("loading storage pool config XML '%s'", path);
+
     if (!(def = virStoragePoolDefParseFile(path)))
         return NULL;

@@ -1655,6 +1657,8 @@ virStoragePoolObjLoadState(virStoragePoolObjList *pools,
     if (!(stateFile = virFileBuildPath(stateDir, name, ".xml")))
         return NULL;

+    VIR_DEBUG("loading storage pool state XML '%s'", stateFile);
+
     if (!(xml = virXMLParseCtxt(stateFile, NULL, _("(pool state)"), &ctxt)))
         return NULL;

diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c
index 4df2c75a2b..8dfa2497fc 100644
--- a/src/storage/storage_driver.c
+++ b/src/storage/storage_driver.c
@@ -156,6 +156,8 @@ storagePoolUpdateStateCallback(virStoragePoolObj *obj,
         active = false;
     }

+    VIR_DEBUG("updating state of storage pool '%s' active=%d", def->name, active);
+
     /* We can pass NULL as connection, most backends do not use
      * it anyway, but if they do and fail, we want to log error and
      * continue with other pools.
-- 
2.34.1




More information about the libvir-list mailing list