`stable 3006` installs 3008.3 when `config-manager` fails (Fedora dnf5, Rocky Linux container images)

未关闭
#2,149 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
53/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
bash, fedora, linux, shell
领域
backend, devops

调研方向

Read bootstrap-salt.sh functions __install_saltstack_fedora_onedir_repository (around lines 4181–4228) and __install_saltstack_rhel_onedir_repository (around 4520–4567), then trace how each selects the repository before installing Salt. Reproduce with the Rocky Linux 9 or Fedora 44 container commands in the issue. Done means stable 3006 and stable 3007 install their matching versions even when config-manager is unavailable or rejects the options.

由索引模型根据 Issue 内容生成。

描述

Description of Issue/Question

For a major-only version (stable 3006, stable 3007) on Fedora and the RHEL family, bootstrap-salt.sh downloads the official salt.repo and relies on config-manager to leave only the matching section enabled:

yum config-manager --set-disable salt-repo-*
yum config-manager --set-enabled salt-repo-3006-lts

(dnf config-manager in the Fedora function.) The exit status isn't checked and the package install is unversioned, so when config-manager fails the file stays as shipped. salt.repo from salt-install-guide v2.4.2 has both [salt-repo-3006-lts] and [salt-repo-3008-lts] set to enabled=1, so 3008.3 is installed.

I've seen config-manager fail in two cases:

  • Fedora 43 and 44: dnf5's config-manager doesn't take the dnf4 options, even with dnf5-plugins installed: Unknown argument "--set-disable" for command "config-manager". stable 3007 on Fedora 44 also gets 3008.3.
  • docker.io/rockylinux/rockylinux:9 and :10: the images don't have python3-dnf-plugins-core, so it's No such command: config-manager. The script still ends with "Salt installed!" and exits 0. yum-utils gets installed (line 4831) only after the repo setup (line 4821). The almalinux:9 and :10 images ship the plugin and get 3006.28.

CI doesn't catch it: there's no Fedora job, and the salt-ci-containers rockylinux-9 image installs dnf-command(config-manager).

Code, line numbers from v2026.10.08 (develop is identical):

  • __install_saltstack_fedora_onedir_repository (4181): 4199-4209 and 4227-4228
  • __install_saltstack_rhel_onedir_repository (4520): 4538-4548 and 4566-4567

The 3006 and 3008+ branches came in with #2120 for #2119.

Possible fixes: install dnf-command(config-manager) before the repo function and fail if config-manager fails. On dnf5 the equivalent is dnf config-manager setopt 'salt-repo-*.enabled=0' followed by a separate dnf config-manager setopt salt-repo-3006-lts.enabled=1 (dnf5 rejects both in one call). Or set enabled= in the downloaded salt.repo directly, which doesn't need the plugin at all.

Setup

No config. Stock container images, x86_64, run with podman.

Steps to Reproduce Issue

In docker.io/rockylinux/rockylinux:9, with bootstrap-salt.sh v2026.10.08 copied in:

sh bootstrap-salt.sh -X -D stable 3006
rpm -q salt-minion                  # salt-minion-3008.3-0.x86_64
dnf repolist --all | grep salt      # salt-repo-3006-lts and salt-repo-3008-lts enabled

The same on registry.fedoraproject.org/fedora:44. There the script exits 1 at install_fedora_check_services() because the container has no systemd, but salt is already installed by then.

Versions and Systems

bootstrap-salt.sh -- Version 2026.10.08 (develop ddddb88 is the same file)
salt.repo from salt-install-guide v2.4.2
Rocky Linux 9.8 (dnf 4.14.0), Rocky Linux 10.2 (dnf 4.20.0), Fedora 43 (dnf5 5.2.18), Fedora 44 (dnf5 5.4.6)

主要语言
Shell
星标
953
派生
541
平均合并
2 天 19 小时
30 天内合并 PR
3

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

saltstack/salt-bootstrap 的其他 Issue

查看 saltstack/salt-bootstrap 的全部 Issue

相似的 Issue

更多 Shell/Bash Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。