[Bug]: onchange example: recursive requisite found
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
What happened?
Just executing the example state from https://docs.saltproject.io/en/latest/ref/states/requisites.html#onchanges:
myservice:
file.managed:
- name: /etc/myservice/myservice.conf
- source: salt://myservice/files/myservice.conf
cmd.run:
- name: /usr/local/sbin/run-build
- onchanges:
- file: /etc/myservice/myservice.conf
leads to:
----------
ID: myservice
Function: file.managed
Name: /etc/myservice/myservice.conf
Result: None
Comment: The file /etc/myservice/myservice.conf is set to be changed
Note: No changes made, actual changes may
be different due to other states.
Started: 13:06:55.736364
Duration: 16.109 ms
Changes:
----------
newfile:
/etc/myservice/myservice.conf
----------
ID: myservice
Function: cmd.run
Name: /usr/local/sbin/run-build
Result: False
Comment: Recursive requisite found
Changes:
I ran into that while debugging a similar case with our own config. Originally, the minion used 3006.17, then 3006.18 and now 3007.10. All versions show the issue.
Type of salt install
Official deb
Major version
3006.x, 3007.x
What supported OS are you seeing the problem on? Can select multiple. (If bug appears on an unsupported OS, please open a GitHub Discussion instead)
ubuntu-24.04
salt --versions-report output
Salt Version:
Salt: 3007.10
Python Version:
Python: 3.10.19 (main, Dec 16 2025, 10:12:17) [GCC 11.2.0]
Dependency Versions:
cffi: 2.0.0
cherrypy: unknown
cryptography: 42.0.5
dateutil: 2.8.2
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
Jinja2: 3.1.6
libgit2: Not Installed
looseversion: 1.3.0
M2Crypto: Not Installed
Mako: Not Installed
msgpack: 1.0.7
msgpack-pure: Not Installed
mysql-python: Not Installed
packaging: 24.0
pycparser: 2.21
pycrypto: Not Installed
pycryptodome: 3.19.1
pygit2: Not Installed
python-gnupg: 0.5.2
PyYAML: 6.0.1
PyZMQ: 25.1.2
relenv: 0.22.1
smmap: Not Installed
timelib: 0.3.0
Tornado: 6.5.2
ZMQ: 4.3.4
Salt Package Information:
Package Type: onedir
System Versions:
dist: ubuntu 24.04.3 noble
locale: utf-8
machine: x86_64
release: 6.8.0-90-generic
system: Linux
version: Ubuntu 24.04.3 noble
root@saltmaster:/srv/salt# salt --versions-report
Salt Version:
Salt: 3007.10
Python Version:
Python: 3.10.19 (main, Dec 16 2025, 10:12:17) [GCC 11.2.0]
Dependency Versions:
cffi: 2.0.0
cherrypy: unknown
cryptography: 42.0.5
dateutil: 2.8.2
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
Jinja2: 3.1.6
libgit2: Not Installed
looseversion: 1.3.0
M2Crypto: Not Installed
Mako: Not Installed
msgpack: 1.0.7
msgpack-pure: Not Installed
mysql-python: Not Installed
packaging: 24.0
pycparser: 2.21
pycrypto: Not Installed
pycryptodome: 3.19.1
pygit2: Not Installed
python-gnupg: 0.5.2
PyYAML: 6.0.1
PyZMQ: 25.1.2
relenv: 0.22.1
smmap: Not Installed
timelib: 0.3.0
Tornado: 6.5.2
ZMQ: 4.3.4
Salt Package Information:
Package Type: onedir
System Versions:
dist: ubuntu 24.04.3 noble
locale: utf-8
machine: x86_64
release: 6.8.0-90-generic
system: Linux
version: Ubuntu 24.04.3 noble
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the state from the onchanges documentation example on Ubuntu 24.04 with Salt 3007.10, then trace the requisite handling that reports “Recursive requisite found.” Confirm the behavior across the reported 3006.x and 3007.x versions, and consider the issue resolved when the documented example no longer produces the recursive-requisite error and the command runs as intended.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, ubuntu
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100