Closed raulillo82 closed 1 year ago
It wasn't a full valid test, but the preliminary ones on 2023.09 were already showing the same error with the venv-salt-minion package from EL8 repo. Same with the ones that was succeeding at the beginning (very long ago), from https://download.opensuse.org/repositories/home:/vzhestkov:/saltstack:/bundle:/next/AlmaLinux_8/ (that's "old" salt 3004 anyway). @vzhestkov maybe it's already ready for you to have a look at it whenever you have time.
The repo is outdated. And it's assigned to my previous account. Could you please try to use the package from this project instead: https://build.opensuse.org/project/show/systemsmanagement:saltstack:bundle:next:AlmaLinux8
The build for some of the packages is failing now (will fix them soon), but one of the previous builds of the salt bundle package is published in the repo.
Same problem, even installing the package manually, outside of the context of Uyuni. It refuses to start, complaining about the same libffi:
[root@vm-panaditas tmp]# rpm -ivh systemd-private-5fa6034adfd9439bbae515dc6a68788c-^C
[root@vm-panaditas tmp]# rpm -ivh venv-salt-minion-3006.0-16.2.uyuni.x86_64.rpm
warning: venv-salt-minion-3006.0-16.2.uyuni.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 0d20833e: NOKEY
Verifying... ################################# [100%]
Preparing... ################################# [100%]
Updating / installing...
1:venv-salt-minion-3006.0-16.2.uyun################################# [100%]
uavc: op=load_policy lsm=selinux seqno=2 res=1[root@vm-panaditas tmp]# systemctl restart venv-salt-minion.service
[root@vm-panaditas tmp]# journalctl --no-pager -u venv-salt-minion.service
-- Journal begins at Mon 2023-10-02 11:42:48 CEST, ends at Mon 2023-10-02 11:58:10 CEST. --
Oct 02 11:58:09 vm-panaditas.hwlab.suse.de systemd[1]: Started The venvjailed Salt Minion.
Oct 02 11:58:09 vm-panaditas.hwlab.suse.de salt-minion[6129]: Traceback (most recent call last):
Oct 02 11:58:09 vm-panaditas.hwlab.suse.de salt-minion[6129]: File "/usr/lib/venv-salt-minion/bin/salt-minion", line 27, in <module>
Oct 02 11:58:09 vm-panaditas.hwlab.suse.de salt-minion[6129]: salt_minion()
Oct 02 11:58:09 vm-panaditas.hwlab.suse.de salt-minion[6129]: File "/usr/lib/venv-salt-minion/lib64/python3.10/site-packages/salt/scripts.py", line 175, in salt_minion
Oct 02 11:58:09 vm-panaditas.hwlab.suse.de salt-minion[6129]: import salt.cli.daemons
Oct 02 11:58:09 vm-panaditas.hwlab.suse.de salt-minion[6129]: File "/usr/lib/venv-salt-minion/lib64/python3.10/site-packages/salt/cli/daemons.py", line 47, in <module>
Oct 02 11:58:09 vm-panaditas.hwlab.suse.de salt-minion[6129]: import salt.utils.parsers
Oct 02 11:58:09 vm-panaditas.hwlab.suse.de salt-minion[6129]: File "/usr/lib/venv-salt-minion/lib64/python3.10/site-packages/salt/utils/parsers.py", line 26, in <module>
Oct 02 11:58:09 vm-panaditas.hwlab.suse.de salt-minion[6129]: import salt.config as config
Oct 02 11:58:09 vm-panaditas.hwlab.suse.de salt-minion[6129]: File "/usr/lib/venv-salt-minion/lib64/python3.10/site-packages/salt/config/__init__.py", line 26, in <module>
Oct 02 11:58:09 vm-panaditas.hwlab.suse.de salt-minion[6129]: import salt.utils.user
Oct 02 11:58:09 vm-panaditas.hwlab.suse.de salt-minion[6129]: File "/usr/lib/venv-salt-minion/lib64/python3.10/site-packages/salt/utils/user.py", line 7, in <module>
Oct 02 11:58:09 vm-panaditas.hwlab.suse.de salt-minion[6129]: import ctypes
Oct 02 11:58:09 vm-panaditas.hwlab.suse.de salt-minion[6129]: File "/usr/lib/venv-salt-minion/lib64/python3.10/ctypes/__init__.py", line 8, in <module>
Oct 02 11:58:09 vm-panaditas.hwlab.suse.de salt-minion[6129]: from _ctypes import Union, Structure, Array
Oct 02 11:58:09 vm-panaditas.hwlab.suse.de salt-minion[6129]: ImportError: libffi.so.6: cannot open shared object file: No such file or directory
Oct 02 11:58:09 vm-panaditas.hwlab.suse.de salt-minion[6129]: [ERROR ] An un-handled exception was caught by Salt's global exception handler:
Oct 02 11:58:09 vm-panaditas.hwlab.suse.de salt-minion[6129]: ImportError: libffi.so.6: cannot open shared object file: No such file or directory
Oct 02 11:58:09 vm-panaditas.hwlab.suse.de salt-minion[6129]: Traceback (most recent call last):
Oct 02 11:58:09 vm-panaditas.hwlab.suse.de salt-minion[6129]: File "/usr/lib/venv-salt-minion/bin/salt-minion", line 27, in <module>
Oct 02 11:58:09 vm-panaditas.hwlab.suse.de salt-minion[6129]: salt_minion()
Oct 02 11:58:09 vm-panaditas.hwlab.suse.de salt-minion[6129]: File "/usr/lib/venv-salt-minion/lib64/python3.10/site-packages/salt/scripts.py", line 175, in salt_minion
Oct 02 11:58:09 vm-panaditas.hwlab.suse.de salt-minion[6129]: import salt.cli.daemons
Oct 02 11:58:09 vm-panaditas.hwlab.suse.de salt-minion[6129]: File "/usr/lib/venv-salt-minion/lib64/python3.10/site-packages/salt/cli/daemons.py", line 47, in <module>
Oct 02 11:58:09 vm-panaditas.hwlab.suse.de salt-minion[6129]: import salt.utils.parsers
Oct 02 11:58:09 vm-panaditas.hwlab.suse.de salt-minion[6129]: File "/usr/lib/venv-salt-minion/lib64/python3.10/site-packages/salt/utils/parsers.py", line 26, in <module>
Oct 02 11:58:09 vm-panaditas.hwlab.suse.de salt-minion[6129]: import salt.config as config
Oct 02 11:58:09 vm-panaditas.hwlab.suse.de salt-minion[6129]: File "/usr/lib/venv-salt-minion/lib64/python3.10/site-packages/salt/config/__init__.py", line 26, in <module>
Oct 02 11:58:09 vm-panaditas.hwlab.suse.de salt-minion[6129]: import salt.utils.user
Oct 02 11:58:09 vm-panaditas.hwlab.suse.de salt-minion[6129]: File "/usr/lib/venv-salt-minion/lib64/python3.10/site-packages/salt/utils/user.py", line 7, in <module>
Oct 02 11:58:09 vm-panaditas.hwlab.suse.de salt-minion[6129]: import ctypes
Oct 02 11:58:09 vm-panaditas.hwlab.suse.de salt-minion[6129]: File "/usr/lib/venv-salt-minion/lib64/python3.10/ctypes/__init__.py", line 8, in <module>
Oct 02 11:58:09 vm-panaditas.hwlab.suse.de salt-minion[6129]: from _ctypes import Union, Structure, Array
Oct 02 11:58:09 vm-panaditas.hwlab.suse.de salt-minion[6129]: ImportError: libffi.so.6: cannot open shared object file: No such file or directory
Oct 02 11:58:10 vm-panaditas.hwlab.suse.de systemd[1]: venv-salt-minion.service: Main process exited, code=exited, status=1/FAILURE
Oct 02 11:58:10 vm-panaditas.hwlab.suse.de systemd[1]: venv-salt-minion.service: Failed with result 'exit-code'.
[root@vm-panaditas tmp]# rpm -qa|grep -i venv
venv-salt-minion-3006.0-16.2.uyuni.x86_64
[root@vm-panaditas tmp]# cat /etc/os-release
NAME="openEuler"
VERSION="22.03 LTS"
ID="openEuler"
VERSION_ID="22.03"
PRETTY_NAME="openEuler 22.03 LTS"
ANSI_COLOR="0;31"
Could you please check which libffi
is present in the standard openEuler repos and which .so
does it countain, actually there could be multiple libffi
versions like libffi6
or libffi8
. For me it's still unclear if we can use the bundle package we build for EL8 or it's better to build openEuler specific package.
As an alternative it could be really easier just to copy into the bundle package from the build worker, but for me this solution looks very hacky and we are loosing the control of what sources was used to build this binary library.
[root@vm-panaditas tmp]# rpm -qa|grep -i libffi
libffi-3.4.2-2.oe2203.x86_64
libffi-devel-3.4.2-2.oe2203.x86_64
[root@vm-panaditas tmp]# rpm -ql libffi
/etc/ima/digest_lists.tlv/0-metadata_list-compact_tlv-libffi-3.4.2-2.oe2203.x86_64
/etc/ima/digest_lists/0-metadata_list-compact-libffi-3.4.2-2.oe2203.x86_64
/usr/lib64/libffi.so.8
/usr/lib64/libffi.so.8.1.0
/usr/share/licenses/libffi
/usr/share/licenses/libffi/LICENSE
[root@vm-panaditas tmp]# rpm -ql libffi-devel
/etc/ima/digest_lists.tlv/0-metadata_list-compact_tlv-libffi-devel-3.4.2-2.oe2203.x86_64
/etc/ima/digest_lists/0-metadata_list-compact-libffi-devel-3.4.2-2.oe2203.x86_64
/usr/include/ffi.h
/usr/include/ffitarget.h
/usr/lib64/libffi.so
/usr/lib64/pkgconfig/libffi.pc
[root@vm-panaditas tmp]# ls -l /usr/lib64/libffi.so /usr/lib64/libffi.so.8 /usr/lib64/libffi.so.8.1.0
lrwxrwxrwx. 1 root root 15 Mar 15 2022 /usr/lib64/libffi.so -> libffi.so.8.1.0
lrwxrwxrwx. 1 root root 15 Mar 15 2022 /usr/lib64/libffi.so.8 -> libffi.so.8.1.0
-rwxr-xr-x. 1 root root 43264 Mar 15 2022 /usr/lib64/libffi.so.8.1.0
The problem that AlmaLinux 8
we are using to build the bundle is using the following:
[root@vz-alma8 ~]# rpm -qa | grep libffi
libffi-3.1-24.el8.x86_64
[root@vz-alma8 ~]# rpm -ql libffi
/usr/lib/.build-id
/usr/lib/.build-id/59
/usr/lib/.build-id/59/860b98f7e57b8388e74dfc44734013bf9c9b99
/usr/lib64/libffi.so.6
/usr/lib64/libffi.so.6.0.2
/usr/share/doc/libffi
/usr/share/doc/libffi/README
/usr/share/licenses/libffi
/usr/share/licenses/libffi/LICENSE
So it's not really compatible with openEuler
on that level. I would suggest to build separate bundle package for openEuler
at least we already have openEuler:22.03
in OBS.
A new salt bundle was built, specifically for openEuler, where the error disappeared. It will be needed to adapt the url's of the uyuni tools to the right paths as soon as they exist (as of today, it can be tested with this one: https://download.opensuse.org/repositories/systemsmanagement:/saltstack:/bundle:/next:/openEuler2203/openEuler_22.03/ ). Special thanks to @vzhestkov for helping close this issue.
Description Salt minion bundle stopped working. All comes from the implementation of openEuler client support for Uyuni, see https://github.com/uyuni-project/uyuni/pull/6623
Setup
Steps to Reproduce the behavior I was using a PoC for the salt bundle from this repo in July, which used to work: https://download.opensuse.org/repositories/home:/vzhestkov:/saltstack:/bundle:/next/AlmaLinux_8/ I can see the package got rebuilt in December, and it is not working any more.
Error in the web-ui:
I tried to fool the system and link libffi:
But obviously it wasn't that easy. The error in the web-ui changed to a non-descriptive "An error has occurred during salt execution: unable to parse json.". The bundle rpm doesn't even get installed (see later for the manual installation). More info can be checked in the salt master api log:
Expected behavior Salt bundle should work just fine. Something wrong with an old version libffi?
Screenshots NA
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.) Master (uyuni): ``` vm-cachitomio:~ # salt --versions-report Salt Version: Salt: 3004 Dependency Versions: cffi: 1.13.2 cherrypy: unknown dateutil: 2.8.1 docker-py: Not Installed gitdb: Not Installed gitpython: Not Installed Jinja2: 2.10.1 libgit2: 1.3.0 M2Crypto: 0.38.0 Mako: Not Installed msgpack: 0.5.6 msgpack-pure: Not Installed mysql-python: Not Installed pycparser: 2.17 pycrypto: 3.9.0 pycryptodome: Not Installed pygit2: 1.7.0 Python: 3.6.15 (default, Sep 23 2021, 15:41:43) [GCC] python-gnupg: Not Installed PyYAML: 5.4.1 PyZMQ: 17.1.2 smmap: Not Installed timelib: Not Installed Tornado: 4.5.3 ZMQ: 4.2.3 System Versions: dist: opensuse-leap 15.4 locale: UTF-8 machine: x86_64 release: 5.14.21-150400.24.41-default system: Linux version: openSUSE Leap 15.4 ``` Minion (after manually installing the package venv-salt-minion-3004-54.7.x86_64): ``` [root@vm-panaditas ~]# venv-salt-minion --versions-report Salt Version: Salt: 3004 Dependency Versions: cffi: Not Installed cherrypy: Not Installed dateutil: Not Installed docker-py: 4.2.0 gitdb: Not Installed gitpython: Not Installed Jinja2: 3.0.3 libgit2: Not Installed M2Crypto: 0.38.0 Mako: Not Installed msgpack: 0.5.6 msgpack-pure: Not Installed mysql-python: Not Installed pycparser: Not Installed pycrypto: Not Installed pycryptodome: Not Installed pygit2: Not Installed Python: 3.10.5 (main, Jul 20 2022, 09:44:52) [GCC] python-gnupg: Not Installed PyYAML: 5.4.1 PyZMQ: 23.2.0 smmap: Not Installed timelib: Not Installed Tornado: 4.5.3 ZMQ: 4.2.3 System Versions: dist: openeuler 22.03 locale: utf-8 machine: x86_64 release: 5.10.0-60.18.0.50.oe2203.x86_64 system: Linux version: openEuler 22.03 ``` ``` PASTE HERE ```Additional context Add any other context about the problem here.