Remove fence_action parameter from GenerateFencingParametersAction

We no longer accept a fence_action parameter - it was a mistake to add
it in the first place (it overrides all actions used with Pacemaker, so
even simple status requests can reboot/poweroff a node) and has now been
officially deprecated by Pacemaker, which causes deployments to fail.

Change-Id: I45e08964b69552eb5b7954278cfe72a5a59e2f8d
Closes-Bug: #1753728
(cherry picked from commit 69b4962d94)
This commit is contained in:
Chris Jones 2018-03-06 11:55:33 +00:00 committed by Michele Baldessari
parent cf36340c76
commit b49c192707
2 changed files with 1 additions and 10 deletions

View File

@ -336,19 +336,17 @@ class GenerateFencingParametersAction(base.TripleOAction):
:param nodes_json: list of nodes & attributes in json format
:param os_auth: dictionary of OS client auth data (if using pxe_ssh)
:param fence_action: action to take when fencing nodes
:param delay: time to wait before taking fencing action
:param ipmi_level: IPMI user level to use
:param ipmi_cipher: IPMI cipher suite to use
:param ipmi_lanplus: whether to use IPMIv2.0
"""
def __init__(self, nodes_json, os_auth, fence_action, delay,
def __init__(self, nodes_json, os_auth, delay,
ipmi_level, ipmi_cipher, ipmi_lanplus):
super(GenerateFencingParametersAction, self).__init__()
self.nodes_json = nodes_json
self.os_auth = os_auth
self.fence_action = fence_action
self.delay = delay
self.ipmi_level = ipmi_level
self.ipmi_cipher = ipmi_cipher
@ -380,8 +378,6 @@ class GenerateFencingParametersAction(base.TripleOAction):
if node["pm_type"] == "pxe_ssh":
# Ironic fencing driver
node_data["agent"] = "fence_ironic"
if self.fence_action:
params["action"] = self.fence_action
params["auth_url"] = self.os_auth["auth_url"]
params["login"] = self.os_auth["login"]
params["passwd"] = self.os_auth["passwd"]
@ -395,8 +391,6 @@ class GenerateFencingParametersAction(base.TripleOAction):
("ipmitool", "ilo", "drac")):
# IPMI fencing driver
node_data["agent"] = "fence_ipmilan"
if self.fence_action:
params["action"] = self.fence_action
params["ipaddr"] = node["pm_addr"]
params["passwd"] = node["pm_password"]
params["login"] = node["pm_user"]

View File

@ -916,7 +916,6 @@ class GenerateFencingParametersActionTestCase(base.TestCase):
action = parameters.GenerateFencingParametersAction(test_envjson,
test_osauth,
"test_action",
28,
5,
0,
@ -930,7 +929,6 @@ class GenerateFencingParametersActionTestCase(base.TestCase):
"agent": "fence_ipmilan",
"host_mac": "00:11:22:33:44:55",
"params": {
"action": "test_action",
"delay": 28,
"ipaddr": "0.1.2.3",
"ipport": "0123",
@ -947,7 +945,6 @@ class GenerateFencingParametersActionTestCase(base.TestCase):
"params": {
"auth_url": "test://auth.url",
"delay": 28,
"action": "test_action",
"login": "test_os_username",
"passwd": "test_os_password",
"tenant_name": "test_os_tenant_name",