Files
salt-formula/test/salt/pillar/salt.sls
T
Paul TobiasandClaude 5c894b9753 test: fix failing kitchen suites by pinning salt to the image version
On the *-3006* / *-3007* suites, kitchen fails on every platform while
applying the salt states:

    'salt' changed from '3006.17-0' to '3008.1-0'
    [ERROR ] ModuleNotFoundError: spec not found for the module 'site'
    >>>>>> Converge failed on <default-oraclelinux-9-3006-17>

The images ship salt 3006.17/3007.9, but salt.pkgrepo adds the
salt-repo-latest repo (saltproject-rpm/, currently 3008.1) and the unpinned
pkg.installed upgrades salt in place; swapping the running onedir under
salt-call breaks the post-install module refresh, so the run dies.

The per-version pins in test/salt/pillar/ only cover 3002/3003/3004 and set
salt:release, which is no longer read by any state. Pin salt:version to the
image's running version instead, so the formula keeps the installed salt.

Co-authored-by: Claude <noreply@anthropic.com>
2026-06-25 22:09:27 +07:00

46 lines
1.2 KiB
YAML+Jinja

# -*- coding: utf-8 -*-
# vim: ft=yaml
---
salt:
py_ver: 'py3'
# Pin to the salt version baked into the kitchen image so salt.minion/salt.master
# don't upgrade it to the repo's "latest" in place mid-converge — swapping the
# running onedir breaks the post-install module refresh, which raises:
# ModuleNotFoundError: spec not found for the module 'site'
version: "{{ salt['grains.get']('saltversion') }}"
# Override used for FreeBSD minion service
retry_options:
attempts: 5
master:
fileserver_backend:
- rootfs
file_roots:
base:
- /srv/salt
pillar_roots:
base:
- /srv/pillar
ext_pillar:
- cmd_yaml: cat /etc/salt/yaml
- stack:
- /path/to/stack1.cfg
- /path/to/stack2.cfg
- reclass:
inventory_base_uri: /etc/reclass
- saltclass:
- path: /srv/saltclass
minion:
master: localhost
fileserver_backend:
- rootfs
file_roots:
base:
- /srv/salt
pillar_roots:
base:
- /srv/pillar
# Gentoo-specific, improves performance for subsequent test runs within the same day
portage:
sync_wait_one_day: true