[BUG] service.dead fails on system services on macOS
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
Description
When unloading some services, launchd prints "Operation in progress." to stderr before
the unload completes. Salt interprets output on stderr as a failure even if return code is 0.
This is new behavior on macOS 10.15 and is not exhibited on 10.14 or previous versions.
Setup
Grab a mac with macOS 10.15 or newer.
Steps to Reproduce the behavior
Put below stanza into a state and run the state:
watchdog_service:
service.dead:
- name: /System/Library/LaunchDaemons/com.apple.watchdogd.plist
Expected behavior
Service is unloaded, state is successful.
Screenshots
If applicable, add screenshots to help explain your problem.
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)Salt Version:
Salt: 3000.2
Dependency Versions:
cffi: 1.12.2
cherrypy: unknown
dateutil: 2.8.0
docker-py: Not Installed
gitdb: 2.0.6
gitpython: 2.1.15
Jinja2: 2.10.1
libgit2: Not Installed
M2Crypto: Not Installed
Mako: 1.0.7
msgpack-pure: Not Installed
msgpack-python: 0.5.6
mysql-python: Not Installed
pycparser: 2.19
pycrypto: 3.8.1
pycryptodome: Not Installed
pygit2: Not Installed
Python: 3.5.4 (default, Apr 16 2020, 20:07:06)
python-gnupg: 0.4.4
PyYAML: 5.1.2
PyZMQ: 18.0.1
smmap: 3.0.2
timelib: 0.2.4
Tornado: 4.5.3
ZMQ: 4.3.1
System Versions:
dist:
locale: US-ASCII
machine: x86_64
release: 19.6.0
system: Darwin
version: 10.15.6 x86_64
Additional context
Even though the state correctly unloads the service, dependent states fail to execute because salt state is a failure.
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 at Salt's service.dead handling for macOS launchd services and trace how stderr and the command return code determine state success. Reproduce with the com.apple.watchdogd.plist example on macOS 10.15 or newer; done means the service unloads successfully and dependent states continue executing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, python
- Domain
- devops, operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100