On Mon, Mar 23, 2015 at 04:46:21PM +0100, 'Klaus Aehlig' via ganeti-devel wrote:
LuxiD locks the job queue during its life time to avoid
two instances running in parallel. When the process dies
(for whatever reason) the advisory lock on the file is gone
so a new daemon can restart. However, the file itself is
not gone, so after cluster destruction a gnt-cluster init
will refuse to create a new cluster. So, after finishing,
remove the file as well.

Signed-off-by: Klaus Aehlig <[email protected]>
---
src/Ganeti/Query/Server.hs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Ganeti/Query/Server.hs b/src/Ganeti/Query/Server.hs
index 0d18ea8..a445b6b 100644
--- a/src/Ganeti/Query/Server.hs
+++ b/src/Ganeti/Query/Server.hs
@@ -495,4 +495,4 @@ main _ _ (server, cref, jq) = do

  finally
    (forever $ U.listener (luxiHandler (qlock, jq, creader)) server)
-    (closeServer server)
+    (closeServer server >> removeFile qlockFile)
--
2.2.0.rc0.207.ga3a616c


LGTM

Reply via email to