|
|
71541a |
From cc373126c53282ff2f266e9f243c5798fca98d37 Mon Sep 17 00:00:00 2001
|
|
|
71541a |
From: Tomas Jelinek <tojeline@redhat.com>
|
|
|
71541a |
Date: Thu, 10 Sep 2015 17:19:00 +0200
|
|
|
71541a |
Subject: [PATCH] Make "port" parameter of fence agents optional
|
|
|
71541a |
|
|
|
71541a |
---
|
|
|
71541a |
pcs/test/test_stonith.py | 12 ++++++++----
|
|
|
71541a |
pcs/utils.py | 18 ++++++++++--------
|
|
|
71541a |
2 files changed, 18 insertions(+), 12 deletions(-)
|
|
|
71541a |
|
|
|
71541a |
diff --git a/pcs/utils.py b/pcs/utils.py
|
|
|
71541a |
index 757c159..0b8d03f 100644
|
|
|
71541a |
--- a/pcs/utils.py
|
|
|
71541a |
+++ b/pcs/utils.py
|
|
|
71541a |
@@ -1791,14 +1791,16 @@ def validInstanceAttributes(res_id, ra_values, resource_type):
|
|
|
71541a |
|
|
|
71541a |
if missing_required_parameters:
|
|
|
71541a |
if resClass == "stonith" and "port" in missing_required_parameters:
|
|
|
71541a |
- if (
|
|
|
71541a |
- "pcmk_host_argument" in ra_values
|
|
|
71541a |
- or
|
|
|
71541a |
- "pcmk_host_map" in ra_values
|
|
|
71541a |
- or
|
|
|
71541a |
- "pcmk_host_list" in ra_values
|
|
|
71541a |
- ):
|
|
|
71541a |
- missing_required_parameters.remove("port")
|
|
|
71541a |
+ # Temporarily make "port" an optional parameter. Once we are
|
|
|
71541a |
+ # getting metadata from pacemaker, this will be reviewed and fixed.
|
|
|
71541a |
+ #if (
|
|
|
71541a |
+ # "pcmk_host_argument" in ra_values
|
|
|
71541a |
+ # or
|
|
|
71541a |
+ # "pcmk_host_map" in ra_values
|
|
|
71541a |
+ # or
|
|
|
71541a |
+ # "pcmk_host_list" in ra_values
|
|
|
71541a |
+ #):
|
|
|
71541a |
+ missing_required_parameters.remove("port")
|
|
|
71541a |
|
|
|
71541a |
return bad_parameters, missing_required_parameters
|
|
|
71541a |
|
|
|
71541a |
--
|
|
|
71541a |
1.9.1
|
|
|
71541a |
|