Jiří Moskovčák has uploaded a new change for review. Change subject: try harder when connecting the storage ......................................................................
try harder when connecting the storage the agent has to wait between attempts to connect the storage to give vdsm some time to initialize Change-Id: I4c512aad490366b0fbd890d156b37243993dc498 Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1093621 Signed-off-by: Jiri Moskovcak <[email protected]> --- M ovirt_hosted_engine_ha/agent/hosted_engine.py 1 file changed, 7 insertions(+), 3 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-hosted-engine-ha refs/changes/62/29862/1 diff --git a/ovirt_hosted_engine_ha/agent/hosted_engine.py b/ovirt_hosted_engine_ha/agent/hosted_engine.py index f1dcf98..42650df 100644 --- a/ovirt_hosted_engine_ha/agent/hosted_engine.py +++ b/ovirt_hosted_engine_ha/agent/hosted_engine.py @@ -466,8 +466,7 @@ self._log.debug("Verifying storage is attached") tries = 0 - while tries < constants.MAX_VDSM_WAIT_SECS: - tries += 1 + for _try in xrange(constants.MAX_VDSM_START_RETRIES): # `hosted-engine --connect-storage` internally calls vdsClient's # connectStorageServer command, which can be executed repeatedly # without issue even if the storage is already connected. Note @@ -485,7 +484,12 @@ self._log.debug("Successfully verified that VDSM" " is attached to storage") break - if tries == constants.MAX_VDSM_WAIT_SECS: + + self._log.warn("Failed to connect storage, waiting '{0}' seconds " + "before the next attempt" + .format(constants.MAX_VDSM_WAIT_SECS)) + time.sleep(constants.MAX_VDSM_WAIT_SECS) + else: self._log.error("Failed trying to connect storage: %s", output[1]) raise Exception("Failed trying to connect storage") -- To view, visit http://gerrit.ovirt.org/29862 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4c512aad490366b0fbd890d156b37243993dc498 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-hosted-engine-ha Gerrit-Branch: master Gerrit-Owner: Jiří Moskovčák <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
