Simone Tiraboschi has uploaded a new change for review. Change subject: Avoiding legacy health servlet usage ......................................................................
Avoiding legacy health servlet usage Avoidind legacy health servlet usage to check engine health in favor of REST API. Change-Id: I48225db31b57f70687887f4c06fb923648bfe9f6 Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1026723 Signed-off-by: Simone Tiraboschi <[email protected]> --- M packaging/setup/plugins/ovirt-engine-setup/ovirt-engine/all-in-one/vdsm.py 1 file changed, 6 insertions(+), 8 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/90/26090/1 diff --git a/packaging/setup/plugins/ovirt-engine-setup/ovirt-engine/all-in-one/vdsm.py b/packaging/setup/plugins/ovirt-engine-setup/ovirt-engine/all-in-one/vdsm.py index 7f7dff3..bb83ddc 100644 --- a/packaging/setup/plugins/ovirt-engine-setup/ovirt-engine/all-in-one/vdsm.py +++ b/packaging/setup/plugins/ovirt-engine-setup/ovirt-engine/all-in-one/vdsm.py @@ -47,7 +47,7 @@ ENGINE_DELAY = 3 VDSM_RETRIES = 600 VDSM_DELAY = 1 - DB_UP_RE = re.compile('.*DB Up.*') + PI_RE = re.compile('.*product_info.*') def __init__(self, context): super(Plugin, self).__init__(context=context) @@ -100,8 +100,8 @@ return isUp def _waitEngineUp(self): - self.logger.debug('Waiting for Engine health status') - health_url = 'http://{fqdn}:{port}/OvirtEngineWeb/HealthStatus'.format( + self.logger.debug('Waiting for API to check Engine health status') + api_url = 'http://{fqdn}:{port}/ovirt-engine/api'.format( fqdn=self.environment[osetupcons.ConfigEnv.FQDN], port=self.environment[osetupcons.ConfigEnv.PUBLIC_HTTP_PORT], ) @@ -110,14 +110,12 @@ while not isUp and tries > 0: tries -= 1 try: - with contextlib.closing(urllib2.urlopen(health_url)) as urlObj: + with contextlib.closing(urllib2.urlopen(api_url)) as urlObj: content = urlObj.read() if content: - if self.DB_UP_RE.match(content) is None: + if self.PI_RE.match(content) is None: raise RuntimeError( - _('Engine status: {status}').format( - status=content - ) + _('API status: unable to verify') ) isUp = True except urllib2.URLError: -- To view, visit http://gerrit.ovirt.org/26090 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I48225db31b57f70687887f4c06fb923648bfe9f6 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Simone Tiraboschi <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
