Cluster pcs commands fail with python exception: "ModuleNotFoundError: No module named 'cryptography"
Issue
Many commands ran against the cluster using the pcs
command set, fail and report a python exception: ModuleNotFoundError: No module named 'cryptography'
.
The stack observed with the error may change depending on the pcs
command ran, but reach fail with the same exception:
$ pcs status --full
-----------------------------------------8<-----------------------------------------
Traceback (most recent call last):
File "/usr/sbin/pcs", line 11, in <module>
load_entry_point('pcs==0.10.15', 'console_scripts', 'pcs')()
File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 476, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2700, in load_entry_point
return ep.load()
File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2318, in load
return self.resolve()
File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2324, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/lib/python3.6/site-packages/pcs/entry_points/cli.py", line 9, in <module>
from pcs.app import main
File "/usr/lib/python3.6/site-packages/pcs/app.py", line 6, in <module>
from pcs import (
File "/usr/lib/python3.6/site-packages/pcs/utils.py", line 38, in <module>
from pcs.cli.common.lib_wrapper import Library
File "/usr/lib/python3.6/site-packages/pcs/cli/common/lib_wrapper.py", line 10, in <module>
from pcs.lib.commands import (
File "/usr/lib/python3.6/site-packages/pcs/lib/commands/cluster.py", line 16, in <module>
from pcs.common import (
File "/usr/lib/python3.6/site-packages/pcs/common/ssl.py", line 5, in <module>
from cryptography import x509
ModuleNotFoundError: No module named 'cryptography' <---
$ pcs quorum status
-----------------------------------------8<-----------------------------------------
Traceback (most recent call last):
File "/usr/sbin/pcs", line 11, in <module>
load_entry_point('pcs==0.10.15', 'console_scripts', 'pcs')()
File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 476, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2700, in load_entry_point
return ep.load()
File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2318, in load
return self.resolve()
File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2324, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/lib/python3.6/site-packages/pcs/entry_points/cli.py", line 9, in <module>
from pcs.app import main
File "/usr/lib/python3.6/site-packages/pcs/app.py", line 6, in <module>
from pcs import (
File "/usr/lib/python3.6/site-packages/pcs/utils.py", line 38, in <module>
from pcs.cli.common.lib_wrapper import Library
File "/usr/lib/python3.6/site-packages/pcs/cli/common/lib_wrapper.py", line 10, in <module>
from pcs.lib.commands import (
File "/usr/lib/python3.6/site-packages/pcs/lib/commands/cluster.py", line 16, in <module>
from pcs.common import (
File "/usr/lib/python3.6/site-packages/pcs/common/ssl.py", line 5, in <module>
from cryptography import x509
ModuleNotFoundError: No module named 'cryptography' <---
Environment
- Red Hat Enterprise Linux 7, 8 and 9 with the High Availability Add-On
- Pacemaker
pcs
- python
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.