This is effectively a duplicate of #1102751.

The bcrypt import problem can be worked around as shown below. This helps to
get the dashboard running again. I don't know whether it helps or works for
other modules.

Cheers,
sur5r

--- mgr_util.py.orig    2025-04-14 05:01:25.000000000 +0000
+++ mgr_util.py 2025-04-28 08:57:44.246802789 +0000
@@ -3,7 +3,7 @@
 if 'UNITTEST' in os.environ:
     import tests
 
-import bcrypt
+import crypt_r as crypt
 import cephfs
 import contextlib
 import datetime
@@ -880,7 +880,7 @@
     if not password:
         return None
     if not salt_password:
-        salt = bcrypt.gensalt()
+        salt = crypt.mksalt(crypt.METHOD_BLOWFISH)
     else:
-        salt = salt_password.encode('utf8')
-    return bcrypt.hashpw(password.encode('utf8'), salt).decode('utf8')
+        salt = salt_password
+    return crypt.crypt(password,salt)



-- 
ceterum censeo microsoftem esse delendam.

Attachment: pgpr_eBiaLRdG.pgp
Description: OpenPGP digital signature

Reply via email to