Package: fence-agents
Version: 4.12.0-1
Severity: important

Hi,

the 4.12.0 release includes a broken python library,
caused by an incomplete change in PR
https://github.com/ClusterLabs/fence-agents/pull/514

This causes major problems for any fence users of the python library,
due to:

| def fence_action(connection, options, set_power_fn, get_power_fn, 
get_outlet_list=None, reboot_cycle_fn=None, sync_set_power_fn=None):
|         result = 0
|
|         try:
|                 if "--plug" in options:
|                         options["--plugs"] = 
options["--plug"].split(options["--plug-separator"])

… resulting in:

| pacemaker-fenced    [39541] (log_op_output)     […] error output [ Traceback 
(most recent call last): ]
| pacemaker-fenced    [39541] (log_op_output)     […] error output [   File 
"/usr/sbin/fence_ngcp", line 56, in <module> ]
| pacemaker-fenced    [39541] (log_op_output)     […] error output [     main() 
]
| pacemaker-fenced    [39541] (log_op_output)     […] error output [   File 
"/usr/sbin/fence_ngcp", line 49, in main ]
| pacemaker-fenced    [39541] (log_op_output)     […] error output [     result 
= fence_action( ]
| pacemaker-fenced    [39541] (log_op_output)     […] error output [   File 
"/usr/share/fence/fencing.py", line 944, in fence_action ]
| pacemaker-fenced    [39541] (log_op_output)     […] error output [     
options["--plugs"] = options["--plug"].split(options["--plug-separator"]) ]
| pacemaker-fenced    [39541] (log_op_output)     […] error output [ KeyError: 
'--plug-separator' ]

The new v4.12.1 release includes the corresponding fix for this:

|   commit 0f280ea4a299037a7d4e99d80b0193fd6fcdbd79
|   Author: Oyvind Albrigtsen <oalbr...@redhat.com>
|   Date:   Tue Jan 24 12:19:41 2023 +0100
|
|         fencing: add plug_separator to default DEPENDENCY_OPT
|
|   diff --git lib/fencing.py.py lib/fencing.py.py
|   index cf1c48e7..c5b5e94a 100644
|   --- lib/fencing.py.py
|   +++ lib/fencing.py.py
|   @@ -494,7 +494,7 @@ DEPENDENCY_OPT = {
|                                                  "version", "action", 
"agent", "power_timeout",
|                                                  "shell_timeout", 
"login_timeout", "disable_timeout",
|                                                  "power_wait", 
"stonith_status_sleep", "retry_on", "delay",
|   -                        "quiet"],
|   +                        "plug_separator", "quiet"],
|                                 "passwd" : ["passwd_script"],
|                                 "sudo" : ["sudo_path"],
|                                 "secure" : ["identity_file", "ssh_options", 
"ssh_path", "inet4_only", "inet6_only"],
|   [...]

Please let's make sure that v4.12.1 ends up in bookworm. :)

regards
-mika-

Reply via email to