Pacemaker "pcs cluster config" or "pcs config show" fail or report warnings reporting missing node names
Issue
Executing the pcs cluster config command returns the below python exception, reflecting an issue with the node list generated from the corosync.conf file:
$ pcs cluster config
Traceback (most recent call last):
File "/usr/sbin/pcs", line 11, in <module>
load_entry_point('pcs==0.10.8', 'console_scripts', 'pcs')()
File "/usr/lib/python3.6/site-packages/pcs/app.py", line 277, in main
utils.get_library_wrapper(), argv, utils.get_input_modifiers()
File "/usr/lib/python3.6/site-packages/pcs/cli/common/routing.py", line 33, in _router
return cmd_map[sub_cmd](lib, argv_next, modifiers)
File "/usr/lib/python3.6/site-packages/pcs/cli/common/routing.py", line 33, in _router
return cmd_map[sub_cmd](lib, argv_next, modifiers)
File "/usr/lib/python3.6/site-packages/pcs/cli/common/routing.py", line 33, in _router
return cmd_map[sub_cmd](lib, argv_next, modifiers)
File "/usr/lib/python3.6/site-packages/pcs/cluster.py", line 1919, in config_show
output = "\n".join(_config_get_text(corosync_conf_dto))
File "/usr/lib/python3.6/site-packages/pcs/cluster.py", line 1928, in _config_get_text
lines.extend(_format_nodes(corosync_conf.nodes))
File "/usr/lib/python3.6/site-packages/pcs/cluster.py", line 1879, in _format_nodes
for node in sorted(nodes, key=lambda node: node.name):
TypeError: '<' not supported between instances of 'NoneType' and 'NoneType'
Commands like pcs config show may additionally report a warning message:
$ pcs config show
Cluster Name: cluster-rhel8
Warning: Some nodes are missing names in corosync.conf, those nodes were omitted <---
Environment
- Red Hat Enterprise Linux (RHEL) 8+ with the High Availability Add On
- Pacemaker
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.