Repository navigation
Description
Description of Issue/Question
Using Salt to start a service on a minion running OSX 10.11.6 returns the error
----------
ID: buildbot-slave
Function: service.running
Result: False
Comment: An exception occurred in this state: Traceback (most recent call last):
File "/usr/local/Cellar/saltstack/2016.3.3/libexec/lib/python2.7/site-packages/salt/state.py", line 1733, in call
**cdata['kwargs'])
File "/usr/local/Cellar/saltstack/2016.3.3/libexec/lib/python2.7/site-packages/salt/loader.py", line 1652, in wrapper
return f(*args, **kwargs)
File "/usr/local/Cellar/saltstack/2016.3.3/libexec/lib/python2.7/site-packages/salt/states/service.py", line 343, in running
before_toggle_enable_status = __salt__['service.enabled'](name)
File "/usr/local/Cellar/saltstack/2016.3.3/libexec/lib/python2.7/site-packages/salt/modules/launchctl.py", line 301, in enabled
'/var/db/launchd.db/com.apple.launchd/overrides.plist'
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plistlib.py", line 75, in readPlist
pathOrFile = open(pathOrFile)
IOError: [Errno 2] No such file or directory: '/var/db/launchd.db/com.apple.launchd/overrides.plist'
Started: 14:32:47.239178
Duration: 5745.534 ms
Changes:
----------
Setup
The line on which we attempt to start the service is at https://github.com/servo/saltfs/blob/master/buildbot/slave/init.sls#L61, and the rest of our configs and setup are in that repo. Our initial mac setup song and dance is documented at https://github.com/servo/servo/wiki/SaltStack-Administration#osx
Steps to Reproduce Issue
Attempt to apply, to an OSX 10.11.6 minion, a state including service.running. Specific error is above.
Versions Report
On master:
salt --versions-report
Salt Version:
Salt: 2016.3.3
Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: 2.5.2
gitdb: 0.5.4
gitpython: 0.3.2 RC1
ioflo: Not Installed
Jinja2: 2.7.2
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: 0.21.1
Mako: 0.9.1
msgpack-pure: Not Installed
msgpack-python: 0.4.6
mysql-python: 1.2.3
pycparser: Not Installed
pycrypto: 2.6.1
pygit2: Not Installed
Python: 2.7.6 (default, Oct 26 2016, 20:30:19)
python-gnupg: Not Installed
PyYAML: 3.11
PyZMQ: 14.0.1
RAET: Not Installed
smmap: 0.8.2
timelib: Not Installed
Tornado: 4.2.1
ZMQ: 4.0.4
System Versions:
dist: Ubuntu 14.04 trusty
machine: x86_64
release: 3.13.0-48-generic
system: Linux
version: Ubuntu 14.04 trusty
On the minion in question, including stuff about the OSX version:
$ system_profiler SPSoftwareDataType
Software:
System Software Overview:
System Version: OS X 10.11.6 (15G1004)
Kernel Version: Darwin 15.6.0
Boot Volume: Macintosh HD
Boot Mode: Normal
Computer Name: administrator’s Mac mini
User Name: administrator (administrator)
Secure Virtual Memory: Enabled
System Integrity Protection: Enabled
Time since boot: 382 days 22:06
$ salt --versions-report
Salt Version:
Salt: 2016.3.3
Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: Not Installed
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.8
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.4.8
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: 2.6.1
pygit2: Not Installed
Python: 2.7.10 (default, Oct 23 2015, 19:19:21)
python-gnupg: Not Installed
PyYAML: 3.11
PyZMQ: 15.4.0
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 4.4.1
ZMQ: 4.1.5
System Versions:
dist:
machine: x86_64
release: 15.6.0
system: Darwin
version: 10.11.6 x86_64
Other comments
I see the path to the overrides.plist hardcoded in Salt at
salt/salt/modules/launchctl.py
Line 336 in 413de95
| '/var/db/launchd.db/com.apple.launchd/overrides.plist' |
Activity
weswhet commentedon Apr 17, 2018
@edunham Any chance you can test and see if this is still an issue on salt 2018.3.0. I'm unable to reproduce. I believe this was originally due to a bad os version comparison as macOS 10.11.6 should be using the mac_service module not launchctl.py.
jdm commentedon Jul 31, 2018
This does appear to be an issue in 2018.3.0.
weswhet commentedon Jul 31, 2018
@jdm on macOS 10.11?
jdm commentedon Jul 31, 2018
Correct. I help maintain the infrastructure that was in use in the original issue report.
weswhet commentedon Jul 31, 2018
I'll test this shortly :)
jdm commentedon Jul 31, 2018
Ack, I'm so sorry. I typoed when I meant to say that this does not appear to be an issue in 2018.3.
weswhet commentedon Jul 31, 2018
@Ch3LL @rallytime I guess the issue can be closed then?