Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE
fence-agents.9831
0007-fence_compute-Remove-duplicate-check-for-b...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0007-fence_compute-Remove-duplicate-check-for-binary-name.patch of Package fence-agents.9831
From 3b459c250f4309462d5581e4c1ac324c34de0f6a Mon Sep 17 00:00:00 2001 From: Vincent Untz <vuntz@suse.com> Date: Tue, 18 Oct 2016 16:35:52 +0200 Subject: [PATCH 7/7] fence_compute: Remove duplicate check for binary name We already do the filtering on the server side. --- fence/agents/compute/fence_compute.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/fence/agents/compute/fence_compute.py b/fence/agents/compute/fence_compute.py index 66d332b2..bffddb88 100644 --- a/fence/agents/compute/fence_compute.py +++ b/fence/agents/compute/fence_compute.py @@ -37,14 +37,13 @@ def get_power_status(_, options): services = nova.services.list(host=options["--plug"], binary="nova-compute") for service in services: logging.debug("Status of %s is %s" % (service.binary, service.state)) - if service.binary == "nova-compute": - if service.state == "up": - status = "on" - elif service.state == "down": - status = "off" - else: - logging.debug("Unknown status detected from nova: " + service.state) - break + if service.state == "up": + status = "on" + elif service.state == "down": + status = "off" + else: + logging.debug("Unknown status detected from nova: " + service.state) + break except requests.exception.ConnectionError as err: logging.warning("Nova connection failed: " + str(err)) return status -- 2.13.6
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor