ClusterLabs / fence-agents

Fence agents
104 stars 160 forks source link

fence_wti attribute plug is not working #508

Closed Drynn41 closed 1 year ago

Drynn41 commented 2 years ago

Hello,

Trying during long hours to deploy a cluster with pacemaker and wti fence boxes, i get an issue when calling the fence with the pacemaker layer.

When trying to create a new fence ressource with the following command:

pcs stonith create fence_xxx fence_wti ip="192.168.168.168" plug="1,5" pcmk_off_action="reboot" pcmk_host_list="xxxx" pcmk_host_check="static-list" inet4_only=true username=xxxx password=xxx ssh=true pcmk_monitor_retries=6 pcmk_monitor_timeout=180s op monitor interval=60

This generate this issue:

[PROD:root@xxx:~]# pcs stonith fence xxx.local.net
Error: unable to fence 'xxx.local.net'
stonith_admin: Couldn't fence xxx.local.net: No data available

After a very long debug session i found that replacing the 'plug' directive by the old one 'port' is working really better. A warning advice us to use the new syntax 'plug' but it can be ignored as the ressource is created with the 'port' attribute.

I'm actually working with a packaged version on the fence agent, on redhat 8 fence-agents-wti-4.2.1-89.el8_6.3.noarch

[PROD:root@xxx:~]# fence_wti --version
4.2.1

Regards,

oalbrigt commented 2 years ago

Seems like this is caused by the fencing library splitting the plug parameter by comma-delimiter to make it able to fence multiple plugs at the same time: https://github.com/ClusterLabs/fence-agents/blob/main/lib/fencing.py.py#L937

oalbrigt commented 1 year ago

I've added a plug_separator parameter you can set to e.g. ; to avoid this issue: https://github.com/ClusterLabs/fence-agents/pull/514