Make fencing action parameter optional.
We now only add an action parameter for fencing agents when one is
supplied, allowing Pacemaker to make appropriate decisions about the
action, itself.
Change-Id: I67e0a7bb6d8db75e00bd6d1a7db495aadcfc04a6
Partial-Bug: #1670687
(cherry picked from commit 747f73b8a6
)
This commit is contained in:
parent
cc1c3109d8
commit
f7286cd71e
@ -259,7 +259,8 @@ class GenerateFencingParametersAction(base.TripleOAction):
|
||||
if node["pm_type"] == "pxe_ssh":
|
||||
# Ironic fencing driver
|
||||
node_data["agent"] = "fence_ironic"
|
||||
params["action"] = self.fence_action
|
||||
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"]
|
||||
@ -272,7 +273,8 @@ class GenerateFencingParametersAction(base.TripleOAction):
|
||||
elif node["pm_type"].split('_')[1] in ("ipmitool", "ilo", "drac"):
|
||||
# IPMI fencing driver
|
||||
node_data["agent"] = "fence_ipmilan"
|
||||
params["action"] = self.fence_action
|
||||
if self.fence_action:
|
||||
params["action"] = self.fence_action
|
||||
params["ipaddr"] = node["pm_addr"]
|
||||
params["passwd"] = node["pm_password"]
|
||||
params["login"] = node["pm_user"]
|
||||
|
Loading…
Reference in New Issue
Block a user