[PATCH 1/4] daemon: Register secret driver before storage driver

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

 



The order in which drivers are registered is important because
their stateInitialize and stateAutoStart callback are called in
that order. Well, stateAutoStart is going away and therefore if
there is some dependency between two drivers (e.g. when
initializing storage driver expects secret driver to be available
already), the registration of such drivers must happen in correct
order.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 src/remote/remote_daemon.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/remote/remote_daemon.c b/src/remote/remote_daemon.c
index 54ddfc42a0..61eabe03be 100644
--- a/src/remote/remote_daemon.c
+++ b/src/remote/remote_daemon.c
@@ -312,6 +312,10 @@ static int daemonInitialize(void)
     if (virDriverLoadModule("interface", "interfaceRegister", false) < 0)
         return -1;
 #endif
+#ifdef WITH_SECRETS
+    if (virDriverLoadModule("secret", "secretRegister", false) < 0)
+        return -1;
+#endif
 #ifdef WITH_STORAGE
     if (virDriverLoadModule("storage", "storageRegister", false) < 0)
         return -1;
@@ -320,10 +324,6 @@ static int daemonInitialize(void)
     if (virDriverLoadModule("nodedev", "nodedevRegister", false) < 0)
         return -1;
 #endif
-#ifdef WITH_SECRETS
-    if (virDriverLoadModule("secret", "secretRegister", false) < 0)
-        return -1;
-#endif
 #ifdef WITH_NWFILTER
     if (virDriverLoadModule("nwfilter", "nwfilterRegister", false) < 0)
         return -1;
-- 
2.19.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux