AIX Open Source

AIX Open Source

Share your experiences and connect with fellow developers to discover how to build and manage open source software for the AIX operating system


#Operatingsystems
#Opensource
#AIX
#AIX Open Source
 View Only
  • 1.  Problems with salt minion after python3 updates

    Posted Tue July 22, 2025 04:46 AM

    Dear team,
    dear community.

    We are planning to update our environment to AIX 7.3 TL3 and all RPM's to the newest level. For this I have a bunch of test systems for trying.
    Unfortunately, after update all RPM's from the toolbox incl. python3.9 and its python crypto modul, we are facing following errors with salt:

    salt-call state.highstate
    [ERROR   ] Failed to import module tls, this is due most likely to a syntax error:
    Traceback (most recent call last):
      File "/opt/freeware/lib/python3.9/site-packages/salt/loader/lazy.py", line 766, in _load_module
        mod = self.run(spec.loader.load_module)
      File "/opt/freeware/lib/python3.9/site-packages/salt/loader/lazy.py", line 1201, in run
        return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
      File "/opt/freeware/lib/python3.9/site-packages/salt/loader/lazy.py", line 1216, in _run_as
        return _func_or_method(*args, **kwargs)
      File "<frozen importlib._bootstrap_external>", line 529, in _check_name_wrapper
      File "<frozen importlib._bootstrap_external>", line 1029, in load_module
      File "<frozen importlib._bootstrap_external>", line 854, in load_module
      File "<frozen importlib._bootstrap>", line 274, in _load_module_shim
      File "<frozen importlib._bootstrap>", line 711, in _load
      File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
      File "<frozen importlib._bootstrap_external>", line 850, in exec_module
      File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
      File "/opt/freeware/lib/python3.9/site-packages/salt/modules/tls.py", line 122, in <module>
        import OpenSSL
      File "/opt/freeware/lib/python3.9/site-packages/OpenSSL/__init__.py", line 8, in <module>
        from OpenSSL import crypto, SSL
      File "/opt/freeware/lib/python3.9/site-packages/OpenSSL/crypto.py", line 1579, in <module>
        class X509StoreFlags(object):
      File "/opt/freeware/lib/python3.9/site-packages/OpenSSL/crypto.py", line 1598, in X509StoreFlags
        NOTIFY_POLICY = _lib.X509_V_FLAG_NOTIFY_POLICY
    AttributeError: module 'lib' has no attribute 'X509_V_FLAG_NOTIFY_POLICY'
    [ERROR   ] Failed to import module travisci, this is due most likely to a syntax error:
    Traceback (most recent call last):
      File "/opt/freeware/lib/python3.9/site-packages/salt/loader/lazy.py", line 766, in _load_module
        mod = self.run(spec.loader.load_module)
      File "/opt/freeware/lib/python3.9/site-packages/salt/loader/lazy.py", line 1201, in run
        return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
      File "/opt/freeware/lib/python3.9/site-packages/salt/loader/lazy.py", line 1216, in _run_as
        return _func_or_method(*args, **kwargs)
      File "<frozen importlib._bootstrap_external>", line 529, in _check_name_wrapper
      File "<frozen importlib._bootstrap_external>", line 1029, in load_module
      File "<frozen importlib._bootstrap_external>", line 854, in load_module
      File "<frozen importlib._bootstrap>", line 274, in _load_module_shim
      File "<frozen importlib._bootstrap>", line 711, in _load
      File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
      File "<frozen importlib._bootstrap_external>", line 850, in exec_module
      File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
      File "/opt/freeware/lib/python3.9/site-packages/salt/modules/travisci.py", line 13, in <module>
        import OpenSSL
      File "/opt/freeware/lib/python3.9/site-packages/OpenSSL/__init__.py", line 8, in <module>
        from OpenSSL import crypto, SSL
      File "/opt/freeware/lib/python3.9/site-packages/OpenSSL/crypto.py", line 1579, in <module>
        class X509StoreFlags(object):
      File "/opt/freeware/lib/python3.9/site-packages/OpenSSL/crypto.py", line 1598, in X509StoreFlags
        NOTIFY_POLICY = _lib.X509_V_FLAG_NOTIFY_POLICY
    AttributeError: module 'lib' has no attribute 'X509_V_FLAG_NOTIFY_POLICY'
    [ERROR   ] Failed to import module x509, this is due most likely to a syntax error:
    Traceback (most recent call last):
      File "/opt/freeware/lib/python3.9/site-packages/salt/loader/lazy.py", line 766, in _load_module
        mod = self.run(spec.loader.load_module)
      File "/opt/freeware/lib/python3.9/site-packages/salt/loader/lazy.py", line 1201, in run
        return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
      File "/opt/freeware/lib/python3.9/site-packages/salt/loader/lazy.py", line 1216, in _run_as
        return _func_or_method(*args, **kwargs)
      File "<frozen importlib._bootstrap_external>", line 529, in _check_name_wrapper
      File "<frozen importlib._bootstrap_external>", line 1029, in load_module
      File "<frozen importlib._bootstrap_external>", line 854, in load_module
      File "<frozen importlib._bootstrap>", line 274, in _load_module_shim
      File "<frozen importlib._bootstrap>", line 711, in _load
      File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
      File "<frozen importlib._bootstrap_external>", line 850, in exec_module
      File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
      File "/opt/freeware/lib/python3.9/site-packages/salt/modules/x509.py", line 38, in <module>
        import OpenSSL
      File "/opt/freeware/lib/python3.9/site-packages/OpenSSL/__init__.py", line 8, in <module>
        from OpenSSL import crypto, SSL
      File "/opt/freeware/lib/python3.9/site-packages/OpenSSL/crypto.py", line 1579, in <module>
        class X509StoreFlags(object):
      File "/opt/freeware/lib/python3.9/site-packages/OpenSSL/crypto.py", line 1598, in X509StoreFlags
        NOTIFY_POLICY = _lib.X509_V_FLAG_NOTIFY_POLICY
    AttributeError: module 'lib' has no attribute 'X509_V_FLAG_NOTIFY_POLICY'
    

    I tried to downgrade salt and the python crypto modul with no success.
    The salt highstate seems to run successfully even with that error, but it would look better without.

    Do you have any idea?

    Thanks for your time in advance.

    kind regards,
    Joerg



    ------------------------------
    Joerg Kauke
    Unix Administrator
    COOP Switzerland
    ------------------------------


  • 2.  RE: Problems with salt minion after python3 updates

    Posted Mon July 28, 2025 03:31 AM
    Edited by Joerg Kauke Mon July 28, 2025 05:02 AM

    Not a single idea?
    So we will try and build venv for Python with the old modules.

    Thanks to all who looked into it.

    Kind regards



    ------------------------------
    Joerg Kauke
    Unix Administrator
    COOP Switzerland
    ------------------------------



  • 3.  RE: Problems with salt minion after python3 updates

    Posted Tue August 05, 2025 02:32 PM
    Edited by Aditya Kamath Tue August 05, 2025 02:32 PM

    @Joerg Kauke

    Hi,

    Can you give me a small code to reproduce?

    Also, what is the outputs of
    # pip3 show pyOpenSSL cryptography??

    And which openssl are you using? 



    ------------------------------
    Aditya Kamath
    https://community.ibm.com/community/user/blogs/aditya-kamath/2025/07/14/monitor-aix-with-elastic-beats-observability-on-ai
    ------------------------------



  • 4.  RE: Problems with salt minion after python3 updates

    Posted 19 days ago

    Hello Aditya,

    sorry for my late response, I was on vacation.
    Here is the output you requested:

    /root#pip3 show pyOpenSSL cryptography??
    WARNING: Package(s) not found: cryptography??
    Name: pyOpenSSL
    Version: 21.0.0
    Summary: Python wrapper module around the OpenSSL library
    Home-page: https://pyopenssl.org/
    Author: The pyOpenSSL developers
    Author-email: cryptography-dev@python.org
    License: Apache License, Version 2.0
    Location: /opt/freeware/lib/python3.9/site-packages
    Requires: cryptography, six
    Required-by:
    

    Thanks for getting into this.

    Hopefully that helps. If you need more, please feel free to contact me.

    Kind regards
    Joerg



    ------------------------------
    Joerg Kauke
    Unix Administrator
    COOP Switzerland
    ------------------------------



  • 5.  RE: Problems with salt minion after python3 updates

    Posted 19 days ago

    pip3.9 show cryptography

    ar -tuv /usr/lib/libcrypto.a

    Can you tell me the outputs of the above two?

    I think this issue has to do with some version mismatch at first glance in terms of what openssl was used to build pyopenssl and cryptography. 



    ------------------------------
    Aditya Kamath
    ------------------------------



  • 6.  RE: Problems with salt minion after python3 updates

    Posted 13 days ago

    Hello Aditya,

    here is the output of the two commands you requested:

    :/root#pip3.9 show cryptography
    Name: cryptography
    Version: 44.0.2
    Summary: cryptography is a package which provides cryptographic recipes and primitives to Python developers.
    Home-page:
    Author: The cryptography developers <cryptography-dev@python.org>
    Author-email: The Python Cryptographic Authority and individual contributors <cryptography-dev@python.org>
    License: Apache-2.0 OR BSD-3-Clause
    Location: /opt/freeware/lib64/python3.9/site-packages
    Requires: cffi
    Required-by: pyOpenSSL
    

    and

    :/root#ar -tuv /usr/lib/libcrypto.a
    rw-r-----     0/0     3081674 Feb 11 11:59 2025 libcrypto.so
    rw-r-----     0/0     2186744 Feb 11 11:59 2025 libcrypto.so.0.9.8
    rw-r-----     0/0     3081674 Feb 11 11:59 2025 libcrypto.so.1.0.0
    rw-r-----     0/0     3081674 Feb 11 11:59 2025 libcrypto.so.1.0.2
    rwxr-xr-x     0/0     4591711 May  5 15:15 2025 libcrypto.so.1.1
    rwxr-xr-x     0/0     7312023 May  5 14:59 2025 libcrypto.so.3
    

    Thanks for your support.

    kind regards,
    Joerg



    ------------------------------
    Joerg Kauke
    Unix Administrator
    COOP Switzerland
    ------------------------------



  • 7.  RE: Problems with salt minion after python3 updates

    Posted 34 minutes ago

    Hello Aditya,

    do you have any findings on that?
    We updated some of the python modules, but without any success.

    Kind regards,



    ------------------------------
    Joerg Kauke
    Unix Administrator
    COOP Switzerland
    ------------------------------