uyuni-project/uyuni

After 2024.05 upgrade CentOS 7 venv-salt-minion error/failure during "Update Package List" operation: "Module function appstreams.get_enabled_modules is not available"

gabjef opened this issue · 1 comments

Problem description

CentOS 7 venv-salt-minion error/failure during "Update Package List" operation: "Module function appstreams.get_enabled_modules is not available"

Steps to reproduce

  1. Initiate "Update Package List" operation for a CentOS 7 minion
  2. Observe that it failed in via the "System History" list

Uyuni version

Information for package Uyuni-Server-release:
---------------------------------------------
Repository     : Uyuni Server Stable
Name           : Uyuni-Server-release
Version        : 2024.05-230900.217.1.uyuni3
Arch           : x86_64
Vendor         : obs://build.opensuse.org/systemsmanagement:Uyuni
Support Level  : Level 3
Installed Size : 1.4 KiB
Installed      : Yes
Status         : up-to-date
Source package : Uyuni-Server-release-2024.05-230900.217.1.uyuni3.src
Summary        : Uyuni Server

Uyuni proxy version (if used)

N/A

Useful logs

bash
* venv-salt-minion.service - The venvjailed Salt Minion
   Loaded: loaded (/usr/lib/systemd/system/venv-salt-minion.service; enabled; vendor preset: disabled)
   Active: active (running) since Tue 2024-05-28 18:24:24 EDT; 1min 5s ago
 Main PID: 29233 (python.original)
   CGroup: /system.slice/venv-salt-minion.service
           |-29233 /usr/lib/venv-salt-minion/bin/python.original /usr/lib/venv-salt-minion/bin/salt-minion
           |-29239 /usr/lib/venv-salt-minion/bin/python.original /usr/lib/venv-salt-minion/bin/salt-minion
           |-30205 /usr/lib/venv-salt-minion/bin/python.original /usr/lib/venv-salt-minion/bin/salt-minion
           |-30240 /bin/sh /tmp/__salt.tmp._unlvw3q.sh
           `-30243 systemctl status venv-salt-minion

May 28 18:24:24 some-minion systemd[1]: Started The venvjailed Salt Minion.
May 28 18:25:10 some-minion salt-minion[29233]: /usr/lib/venv-salt-minion/lib/python3.10/site-packages/salt/states/x509.py:212: DeprecationWarning: The x509 modules are deprecated. Please migrate to the replacement modules (x509_v2). They are the default from Salt 3008 (Argon) onwards.
May 28 18:25:10 some-minion salt-minion[29233]: salt.utils.versions.warn_until(
May 28 18:25:10 some-minion salt-minion[29233]: [ERROR   ] Module function appstreams.get_enabled_modules is not available
May 28 18:25:29 some-minion su[30226]: (to root) root on none

Salt minion version

Installed Packages
Name        : venv-salt-minion
Arch        : x86_64
Version     : 3006.0
Release     : 27.1.uyuni
Size        : 108 M
Repo        : installed
From repo   : susemanager:centos7-uyuni-client-tools-x86_64
Summary     : The venvjailed client component for Salt
URL         : http://saltstack.org/
License     : Apache-2.0
Description : Virtual environment jail for Salt minion.
            : Salt minion is queried and controlled from the master.
            : Listens to the salt master and execute the commands.

This was recently fixed with PR #8792 and you can manually patch your Uyuni Server before the next Uyuni version is released.

  1. Download the fixed profileupdate.sls file: https://github.com/uyuni-project/uyuni/blob/134985b46648b1614ca268ebb914c656280d3dc9/susemanager-utils/susemanager-sls/salt/packages/profileupdate.sls
  2. Copy the fixed profileupdate.sls to /usr/share/susemanager/salt/packages/profileupdate.sls on the Uyuni Server
  3. Try to execute/reschedule a package list update on a CentOS 7 system.
    You may have to restart salt-master.service on the Uyuni Server if the old Salt state is still being executed.

This fixed the issue for me with Uyuni 2024.05 and CentOS 7 systems.