mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-24 05:25:18 +00:00
rpc: daemon: Fix virtlog/virtlock daemon reload
Trying to reload/SIGUSR1 virtlogd or virtlockd fails with: error : virNetDaemonRun:747 : internal error: Not all servers restored, cannot run server Commit 252610f7 changed the daemon state json to allow tracking multiple servers. However it missed clearing dmn->srvObject after the json is empty, like the previous code paths handled. Later on in virNewDaemonRun, dmn->srvObject is expected to be empty otherwise we throw the above error. https://bugzilla.redhat.com/show_bug.cgi?id=1311013
This commit is contained in:
parent
cbbd74aad5
commit
9b69f02243
@ -293,6 +293,10 @@ virNetDaemonAddServerPostExec(virNetDaemonPtr dmn,
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (virJSONValueObjectKeysNumber(dmn->srvObject) == 0) {
|
||||
virJSONValueFree(dmn->srvObject);
|
||||
dmn->srvObject = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
srv = virNetServerNewPostExecRestart(object,
|
||||
|
Loading…
x
Reference in New Issue
Block a user