
----- Original Message -----
Hi all,
VDSM network provisioning api exposes a validity check to know the newly 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 connectivityTimeOut)
def clientSeen(timeout): start = time.time() while timeout >= 0: if os.stat(constants.P_VDSM_CLIENT_LOG).st_mtime > start: return True time.sleep(1) timeout -= 1 return False
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 http://gerrit.ovirt.org/#change,584 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 http code 100 ? 2. pass in the API a URL which the VDSM will call. could be a health-check servlet or something similar.
Any toughs?
introduce bi-directional communications over qmf.
_______________________________________________ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel