c480ed
From 8a9a0815510ef6de1ee34b865a768d0c6fd7b828 Mon Sep 17 00:00:00 2001
c480ed
Message-Id: <8a9a0815510ef6de1ee34b865a768d0c6fd7b828@dist-git>
c480ed
From: Michal Privoznik <mprivozn@redhat.com>
c480ed
Date: Thu, 27 Jun 2019 15:18:14 +0200
c480ed
Subject: [PATCH] daemon: Register secret driver before storage driver
c480ed
MIME-Version: 1.0
c480ed
Content-Type: text/plain; charset=UTF-8
c480ed
Content-Transfer-Encoding: 8bit
c480ed
c480ed
The order in which drivers are registered is important because
c480ed
their stateInitialize and stateAutoStart callback are called in
c480ed
that order. Well, stateAutoStart is going away and therefore if
c480ed
there is some dependency between two drivers (e.g. when
c480ed
initializing storage driver expects secret driver to be available
c480ed
already), the registration of such drivers must happen in correct
c480ed
order.
c480ed
c480ed
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
c480ed
Reviewed-by: Ján Tomko <jtomko@redhat.com>
c480ed
(cherry picked from commit c6266ddb0214512200c5043f3196d3ca3e73919d)
c480ed
c480ed
https://bugzilla.redhat.com/show_bug.cgi?id=1685151
c480ed
c480ed
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
c480ed
Message-Id: <f67abc5158c74a295438b5e2f1b8106e8910bfde.1561641375.git.mprivozn@redhat.com>
c480ed
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
c480ed
---
c480ed
 src/remote/remote_daemon.c | 8 ++++----
c480ed
 1 file changed, 4 insertions(+), 4 deletions(-)
c480ed
c480ed
diff --git a/src/remote/remote_daemon.c b/src/remote/remote_daemon.c
c480ed
index 9f3a5f38ad..4cd6784099 100644
c480ed
--- a/src/remote/remote_daemon.c
c480ed
+++ b/src/remote/remote_daemon.c
c480ed
@@ -314,6 +314,10 @@ static int daemonInitialize(void)
c480ed
     if (virDriverLoadModule("interface", "interfaceRegister", false) < 0)
c480ed
         return -1;
c480ed
 #endif
c480ed
+#ifdef WITH_SECRETS
c480ed
+    if (virDriverLoadModule("secret", "secretRegister", false) < 0)
c480ed
+        return -1;
c480ed
+#endif
c480ed
 #ifdef WITH_STORAGE
c480ed
     if (virDriverLoadModule("storage", "storageRegister", false) < 0)
c480ed
         return -1;
c480ed
@@ -322,10 +326,6 @@ static int daemonInitialize(void)
c480ed
     if (virDriverLoadModule("nodedev", "nodedevRegister", false) < 0)
c480ed
         return -1;
c480ed
 #endif
c480ed
-#ifdef WITH_SECRETS
c480ed
-    if (virDriverLoadModule("secret", "secretRegister", false) < 0)
c480ed
-        return -1;
c480ed
-#endif
c480ed
 #ifdef WITH_NWFILTER
c480ed
     if (virDriverLoadModule("nwfilter", "nwfilterRegister", false) < 0)
c480ed
         return -1;
c480ed
-- 
c480ed
2.22.0
c480ed