action #178564
openUnit tests in salt pipelines failing due to augeas.change and crypt / bsd_shadow size:S
0%
Description
Observation¶
Current salt pipelines are failing. This wasn't seen as part of alert handling (yet) but very recent individual runs in MR's and re-runs on master.
File "/usr/lib/python3.13/site-packages/salt/modules/bsd_shadow.py", line 22, in <module>
import salt.utils.pycrypto
File "/usr/lib/python3.13/site-packages/salt/utils/pycrypto.py", line 104, in <module>
methods = {m.name.lower(): m for m in crypt.methods}
^^^^^^^^^^^^^
AttributeError: module 'crypt' has no attribute 'methods'
[...]
ID: kdump-conf
Function: augeas.change
Result: False
Comment: State 'augeas.change' was not found in SLS 'kdump'
Reason: 'augeas' __virtual__ returned False: augeas module could not be loaded
Acceptance criteria¶
- AC1: Unit tests in salt pipelines are passing
Suggestions¶
- Take a look at https://gitlab.suse.de/gpathak/salt-states-openqa/-/jobs/3959644 and https://gitlab.suse.de/openqa/salt-states-openqa/-/jobs/3959646 for starters. Should also reproduce on any new MR
- Look at https://github.com/saltstack/salt/issues/67118
- Nick: as a workaround I suggest using python311-setuptools python311-augeas python311-cryptography for now until we find a proper way
Updated by nicksinger 22 days ago
- Status changed from New to In Progress
- Assignee set to nicksinger
while trying to move https://gitlab.suse.de/openqa/salt-states-openqa/-/merge_requests/1404 forward, I found why this fails. podman run --rm -it registry.opensuse.org/home/okurz/container/ca/containers/tumbleweed:salt-minion-git-core-ssh
with:
6bdc1d287a87:/srv/salt # tree .
.
|-- test
| `-- init.sls
`-- top.sls
2 directories, 2 files
6bdc1d287a87:/srv/salt # cat top.sls
base:
'*':
- test
6bdc1d287a87:/srv/salt # cat test/init.sls
kdump-conf:
augeas.change:
- lens: Shellvars.lns
- context: /files/etc/sysconfig/kdump
- changes:
- set KDUMP_SMTP_SERVER '"relay.suse.de"'
- set KDUMP_NOTIFICATION_TO '"osd-admins@suse.de"'
and salt-call --local -l debug state.apply mock=True
was a good, minimal reproducer. Salt complains about the missing cryptography-module which seems unrelated at first (because the x509-module shows other deprecation-warnings as well) but it turns out that zypper in python311-cryptography
already fixes the issue. Checking the container definition at https://build.opensuse.org/projects/home:okurz:container:ca/packages/salt-minion-git-core-ssh/files/Dockerfile?expand=1 I found that python3-setuptools python3-augeas python3-cryptography
are all not available any longer in the repository and seem be replaced by the explicit 311-packages. Not sure how to approach the fix without being too specific.
Updated by openqa_review 22 days ago
- Due date set to 2025-03-26
Setting due date based on mean cycle time of SUSE QE Tools
Updated by nicksinger 21 days ago
So I tried to adjust our container to install salt-minion with zypper -n in --recommends salt-minion
in https://build.opensuse.org/package/rdiff/home:nicksinger:branches:home:okurz:container:ca/salt-minion-git-core-ssh?linkrev=base&rev=2
It took me a while to understand OBS correctly but eventually tried my minimal reproducer (from https://progress.opensuse.org/issues/178564#note-5) locally with podman run --rm -it registry.opensuse.org/home/nicksinger/branches/home/okurz/container/ca/containers/tumbleweed:salt-minion-git-core-ssh
. This fixes the need to explicitly mention python3-setuptools python3-cryptography
(which would pull in the python313 version anyway) but misses out on python3-augeas. I think this is a packaging-bug (as salt-minion
should suggest the correct python311-augeas package). I had a look at https://build.opensuse.org/projects/openSUSE:Factory/packages/salt/files/salt.spec?expand=1 but it is rather complex so I started with asking in #discuss-salt first: https://suse.slack.com/archives/C02JMF41G9E/p1741791334976679
Updated by nicksinger 20 days ago
- Status changed from In Progress to Feedback
https://github.com/openSUSE/salt-packaging/pull/108 might be of help if it gets merged. I created https://build.opensuse.org/request/show/1252771 as workaround which evolved out of https://matrix.to/#/!XpAJOYggtDiIfDZZBr:opensuse.org/$F0EeFgIYN7qVgBRpUKc0ugWggLZGEoPHew--yNrs40k
Updated by nicksinger 20 days ago
- Status changed from Feedback to In Progress
https://gitlab.suse.de/openqa/salt-states-openqa/-/merge_requests/1403 - now the stage "test" fails because the python module "spwd" seems to be outdated: https://github.com/saltstack/salt/issues/64264
Updated by nicksinger 15 days ago
- Status changed from In Progress to Feedback
- Priority changed from High to Normal
https://build.opensuse.org/request/show/1254067 to downgrade even further to 3.11
Updated by okurz 15 days ago
- Status changed from Feedback to Workable
- Priority changed from Normal to High
https://build.opensuse.org/requests/1254067 accepted.
I triggered jobs as part of a new pipeline with jobs which look like they fail probably different now, e.g.
https://gitlab.suse.de/openqa/salt-states-openqa/-/jobs/4001294#L948
says
ModuleNotFoundError: No module named 'cryptography'
but now executed with the python3.11 stack.
@nicksinger you reduced from "High" to "Normal". Did I miss a workaround that mitigates that? I triggered a new pipeline so I assume that the right image and current code is picked up but maybe you expected something different?
Updated by okurz 14 days ago
- Status changed from Workable to In Progress
accepted new SR https://build.opensuse.org/requests/1254365. Not yet published at time of writing.
Updated by okurz 14 days ago
- Due date deleted (
2025-03-26) - Status changed from In Progress to Blocked
- Target version changed from Ready to future
Published and seems to help. We retriggered (and rebased and retriggered) multiple MRs. E.g. https://gitlab.suse.de/openqa/salt-states-openqa/-/pipelines shows stable.
Let's block on https://github.com/openSUSE/salt-packaging/pull/108