Open Borromini opened 2 years ago
Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey. Please be sure to review our Code of Conduct. Also, check out some of our community resources including:
There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar. If you have additional questions, email us at saltproject@vmware.com. We’re glad you’ve joined our community and look forward to doing awesome things with you!
From the error, it looks like the issue is having two states with the same ID, not two cron jobs with the same command. I.e., I think changing from the first example below to the second should work. (But I haven't tested it, this is just a drive-by comment while I was looking for something else.)
duplicate ID:
duplicate command:
cron.present:
- identifier: duplicate.command.1
duplicate command:
cron.present:
- identifier: duplicate.command.2
no duplicate ID:
duplicate command 1:
cron.present:
- name: duplicate command
- identifier: duplicate.command.1
duplicate command 2:
cron.present:
- name: duplicate command
- identifier: duplicate.command.2
Description Cron state is breaking on multiple identical commands to be executed at different times, despite the identifier being different, which (as per https://github.com/saltstack/salt/issues/7979) should differentiate the commands from one another.
Setup SLS:
- dayweek: '6' - comment: Bi-weekly scrub /usr/local/sbin/zpm report | /usr/bin/logger -t zfs-scrub: cron.present: - identifier: zfs.scrub.report.cron - minute: '30' - hour: '16' - dayweek: '6' - comment: Mail bi-weekly scrub results # Daily restart for Salt client. /bin/systemctl restart salt-minion.service: cron.present: - identifier: salt.restart.daily.cron - minute: '00' - hour: '18' - dayweek: '*' - comment: Daily restart ```
Please be as specific as possible and give set-up details.
Steps to Reproduce the behavior Create cron state file with identical commands, but with different identifiers (and optionally timestamps for execution).
Expected behavior Salt not breaking. This worked on older releases.
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.) ``` Salt Version: Salt: 3002.6 Dependency Versions: cffi: Not Installed cherrypy: Not Installed dateutil: 2.8.1 docker-py: Not Installed gitdb: Not Installed gitpython: Not Installed Jinja2: 2.11.3 libgit2: 1.1.0 M2Crypto: Not Installed Mako: 1.1.3 msgpack: 1.0.0 msgpack-pure: Not Installed mysql-python: Not Installed pycparser: Not Installed pycrypto: 2.6.1 pycryptodome: 3.9.7 pygit2: 1.4.0 Python: 3.9.2 (default, Feb 28 2021, 17:03:44) python-gnupg: Not Installed PyYAML: 5.3.1 PyZMQ: 20.0.0 smmap: Not Installed timelib: Not Installed Tornado: 4.5.3 ZMQ: 4.3.4 System Versions: dist: debian 11 bullseye locale: utf-8 machine: x86_64 release: 5.10.0-9-amd64 system: Linux version: Debian GNU/Linux 11 bullseye ```Additional context Error spit out is this: