Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Alexander_Naumov:SLE12
cobbler
fix-powermanagement-status.dif
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File fix-powermanagement-status.dif of Package cobbler
Index: cobbler-2.2.2/cobbler/action_power.py =================================================================== --- cobbler-2.2.2.orig/cobbler/action_power.py +++ cobbler-2.2.2/cobbler/action_power.py @@ -105,17 +105,15 @@ class PowerTool: if rc == 0: # If the desired state is actually a query for the status # return different information than command return code + # fence-agents have the following return codes on status + # 0 == on + # 2 == off + # else == Error / Unknown if desired_state == 'status': - match = re.match('(^Status:\s)(on|off)', output, re.IGNORECASE) - if match: - power_status = match.groups()[1] - if power_status.lower() == 'on': - return True - else: - return False - utils.die(self.logger,"command succeeded (rc=%s), but output ('%s') was not understood" % (rc, output)) - return None + return True break + elif rc == 2 and desired_state == 'status': + return False else: time.sleep(2)
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