cron.rm_job and cron.rm_special do nothing (state cron.absent also broken)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
Description of Issue
The cron module's features for removing cron jobs appears to be broken in salt 2019.2.1
Neither cron.rm_job nor cron.rm_special seems to do anything at all. They don't report any failure, but the don't remove the matching job either.
the cron.absent state also fails, always acting as if the cron job doesn't exist, when actually it does.
Setup
Plain default out-of-the-box salt 2019.2.1 on Debian 10
Steps to Reproduce Issue
Create a new cron job, this part will work...
``
`sudo salt "debian-salt-minion" cron.set_special jamesp '@hourly' 'date >> ~/crontest.log' identifier="TESTJOB"
Now try to delete it, this part will do nothing
sudo salt "debian-salt-minion" cron.rm_special jamesp '@hourly' 'date >> ~/crontest.log' identifier="TESTJOB"
The job will not be removed. You can verify with
sudo salt "debian-salt-minion" cron.ls jamesp
It doesn't matter if you use rm_job or rm_special
It doesn't matter if the job is for root or for some other user
It doesn't matter if you set an identifier or not
I have not been able to find any combination of arguments that can successfully remove any cron job
### Versions Report
Salt Version:
Salt: 2019.2.1
Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: 2.7.3
docker-py: Not Installed
gitdb: 2.0.5
gitpython: 2.1.11
ioflo: Not Installed
Jinja2: 2.10
libgit2: 0.27.7
libnacl: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.5.6
mysql-python: Not Installed
pycparser: 2.19
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: 0.27.4
Python: 3.7.3 (default, Apr 3 2019, 05:39:12)
python-gnupg: Not Installed
PyYAML: 3.13
PyZMQ: 17.1.2
RAET: Not Installed
smmap: 2.0.5
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.3.1
System Versions:
dist: debian 10.1
locale: UTF-8
machine: x86_64
release: 4.19.0-6-amd64
system: Linux
version: debian 10.1
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 documented cron.set_special, cron.rm_special, cron.rm_job, cron.absent, and cron.ls commands on Debian 10. Inspect the cron module entry points and their related tests, then verify that removal actually deletes the matching job and that cron.absent recognizes it before removal.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100