Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE
resource-agents.10370
0022-1245.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0022-1245.patch of Package resource-agents.10370
From 8ec5a7347ff7cd4f98611d5a2d56281786d16bf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristoffer=20Gr=C3=B6nlund?= <krig@koru.se> Date: Wed, 17 Oct 2018 10:11:46 +0200 Subject: [PATCH 1/2] dev: ocf.py: Fix bug in value_for_parameter() --- heartbeat/ocf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/heartbeat/ocf.py b/heartbeat/ocf.py index 72ec90820..295eae92e 100644 --- a/heartbeat/ocf.py +++ b/heartbeat/ocf.py @@ -368,7 +368,7 @@ def call_handler(func): else: params = inspect.getargspec(func).args def value_for_parameter(param): - val = get_parameter(val) + val = get_parameter(param) if val is not None: return val for p in agent.parameters: From e1aa83391bfebfa08c382fae31e06ce9e41eb582 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristoffer=20Gr=C3=B6nlund?= <krig@koru.se> Date: Wed, 17 Oct 2018 10:15:56 +0200 Subject: [PATCH 2/2] dev: ocf.py: Add meta-data action if it wasn't set by user --- heartbeat/ocf.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/heartbeat/ocf.py b/heartbeat/ocf.py index 295eae92e..0404eb4c4 100644 --- a/heartbeat/ocf.py +++ b/heartbeat/ocf.py @@ -387,6 +387,14 @@ def value_for_parameter(param): logger.error(str(err)) return OCF_ERR_GENERIC + meta_data_action = False + for action in agent.actions: + if action.name == "meta-data": + meta_data_action = True + break + if not meta_data_action: + agent.add_action("meta-data", timeout=10) + if len(sys.argv) == 2 and sys.argv[1] in ("-h", "--help"): sys.stdout.write("usage: %s {%s}\n\n" % (sys.argv[0], "|".join(sorted(handlers.keys()))) + "Expects to have a fully populated OCF RA compliant environment set.\n")
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