Closed gaborigloi closed 7 years ago
I've tested it, and now it does not fail during startup:
Sep 29 14:45:27 localhost xapi-nbd[2434]: main: Starting xapi-nbd: port = '10809'; certfile = '/etc/xensource/xapi-ssl.pem'; ciphersuites = '!EXPORT:RSA+AES128-SHA256' no_tls = 'false'
Sep 29 14:45:27 localhost xapi-nbd[2434]: main: Trying to log in via xapi's Unix domain socket for 120.000000 seconds
Sep 29 14:45:27 localhost xapi-nbd[2434]: Caught: Unix.Unix_error(Unix.ECONNREFUSED, "connect", "")
Sep 29 14:45:27 localhost xapi-nbd[2434]: main: Failed to log in via xapi's Unix domain socket: Unix.Unix_error(Unix.ECONNREFUSED, "connect", ""); retrying in 4.000000 seconds
Sep 29 14:45:31 localhost xapi-nbd[2434]: Caught: Unix.Unix_error(Unix.ECONNREFUSED, "connect", "")
Sep 29 14:45:31 localhost xapi-nbd[2434]: main: Failed to log in via xapi's Unix domain socket: Unix.Unix_error(Unix.ECONNREFUSED, "connect", ""); retrying in 4.000000 seconds
Sep 29 14:45:35 localhost xapi-nbd[2434]: main: Checking if there are any VBDs to clean up that leaked during the previous run
Sep 29 14:45:35 localhost xapi-nbd[2434]: main: Initialising TLS
Sep 29 14:45:35 localhost xapi-nbd[2434]: main: Setting up server socket
Sep 29 14:45:35 localhost xapi-nbd[2434]: main: Listening for incoming connections
Thanks a lot for the review! :smile: Merging as I've built it locally.
Previously when the server tried to login at startup, it failed immediately because xapi wasn't ready yet, even though systemd starts xapi-nbd after xapi. The proper long term fix will be for xapi to notify systemd when its startup sequence has completed, and when that is done, this temporary fix can be removed.
Waiting for xapi's Unix domain socket to be up does not work, there would still be transient failures because apparently xapi is not completely ready when the Unix domain socket is created.
Signed-off-by: Gabor Igloi gabor.igloi@citrix.com
Fixes #19