Report notification successor from target action
This commit is contained in:
@@ -494,9 +494,23 @@ def notify_target(config, runtime_state, request_parameters):
|
||||
operation = notification.get("operation")
|
||||
|
||||
if operation == "demote":
|
||||
target_node = notification.get("demote_uname", "").strip().lower()
|
||||
target_node = notification.get(
|
||||
"demote_uname",
|
||||
"",
|
||||
).strip().lower()
|
||||
successor_node = notification.get(
|
||||
"promote_uname",
|
||||
"",
|
||||
).strip().lower()
|
||||
elif operation == "promote":
|
||||
target_node = notification.get("promote_uname", "").strip().lower()
|
||||
target_node = notification.get(
|
||||
"promote_uname",
|
||||
"",
|
||||
).strip().lower()
|
||||
successor_node = notification.get(
|
||||
"demote_uname",
|
||||
"",
|
||||
).strip().lower()
|
||||
else:
|
||||
return {
|
||||
"ocf_rc": 1,
|
||||
@@ -511,6 +525,7 @@ def notify_target(config, runtime_state, request_parameters):
|
||||
"target": target_node == node_name,
|
||||
"operation": operation,
|
||||
"target_node": target_node,
|
||||
"successor_node": successor_node,
|
||||
"node": node_name,
|
||||
"age_seconds": age,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user