VDSM network provisioning api exposes a validity check to know the
applied changes works. The actual
check is comparing the /var/run/vdsm/client.log modified time to the
time when the check began and repeats
that check after sleeping 1 seconds for X time (where X is
start = time.time()
while timeout >= 0:
if os.stat(constants.P_VDSM_CLIENT_LOG).st_mtime > start:
timeout -= 1
Main issues I spot are:
1. In case the host is in maintenance, the caller of the API must
generate traffic, concurrently to running api call,
and then must join and sync threads to realize when all is done. see
2. locally calling vdsClient also modifies the client.log - we can't
rely on that no one will do that during the call.
3. Failure writing to the client log will fail network provisioning!
All of the above makes it not very reliable as a check and harder to
call, without posing races, as client.
Possible alternate solution:
1. We can try to reach the api caller socket in return, maybe use
code 100 ?
2. pass in the API a URL which the VDSM will call. could be a
health-check servlet or something similar.
Engine-devel mailing list