Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception raised when processing __virtual__ function for mac_system - (mac os x installation relies on un-installed 'mac_service_helper.sh') #35102

Closed
TheBigBear opened this issue Aug 1, 2016 · 3 comments
Assignees
Labels
Bug broken, incorrect, or confusing behavior MacOS pertains to the OS of fruit P4 Priority 4 Platform Relates to OS, containers, platform-based utilities like FS, system based apps severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around ZRELEASED - 2016.3.3
Milestone

Comments

@TheBigBear
Copy link
Contributor

TheBigBear commented Aug 1, 2016

Installed the new mac os x pkg 2016.3.1 from repo.saltstack.com when trying to do any pkg.* related cmds it comes up with a few lines of error output that are not really related to salt.

salt-call pkg.list_pkgs
[ERROR   ] Command '/usr/bin/plutil -convert xml1 -o - -- "/Library/LaunchDaemons/.com.bomgar.bomgar-ps-5370CFCC-1399963037.helper/mac_service_helper.sh"' failed with return code: 1
[ERROR   ] output: /Library/LaunchDaemons/.com.bomgar.bomgar-ps-5370CFCC-1399963037.helper/mac_service_helper.sh: Property List error: Unexpected character # at line 1 / JSON error: JSON text did not start with array or object and option to allow fragments not set.
[ERROR   ] Exception raised when processing __virtual__ function for mac_system. Module will not be loaded not well-formed (invalid token): line 1, column 0
[WARNING ] salt.loaded.int.module.mac_system.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'mac_system', please fix this.
local:
    ----------
    ansible:
        2.1.0.0

(Note: it does actually proceed to do the requested pkg. action, but the errors need looking at and removing.)

salt errors and warning:

[ERROR   ] Exception raised when processing __virtual__ function for mac_system. Module will not be loaded not well-formed (invalid token): line 1, column 0
[WARNING ] salt.loaded.int.module.mac_system.__virtual__() is wrongly returning `None`. It should either return `True`, `False` or a new name. If you're the developer of the module 'mac_system', please fix this.

I think "some" helper function somewhere inside of salt tries reading and interpreting a file called 'mac_service_helper.sh' but the current installer pkg does not install a file by that name that I can find.

However our Mac s have a remote support agent installed that has such a file on the disk by default.

As can be seen by:

locate mac_service_helper.sh

/Library/LaunchDaemons/.com.bomgar.bomgar-ps-5478B13B-1466047527.helper/mac_service_helper.sh
/Users/Shared/bomgar-scc-20141128-173035.app/Contents/Resources/mac_service_helper.sh

Versions Report

(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
Master: 2016.3.2
mac os x minion: 2016.3.1
Salt Version:
Salt: 2016.3.1

Dependency Versions:
cffi: 1.5.0
cherrypy: 4.0.0
dateutil: 2.4.2
gitdb: 0.6.4
gitpython: 1.0.1
ioflo: 1.5.0
Jinja2: 2.8
libgit2: Not Installed
libnacl: 1.4.4
M2Crypto: Not Installed
Mako: 1.0.3
msgpack-pure: Not Installed
msgpack-python: 0.4.7
mysql-python: Not Installed
pycparser: 2.14
pycrypto: 2.6.1
pygit2: Not Installed
Python: 2.7.12 (default, Jul 6 2016, 14:58:59)
python-gnupg: 0.3.8
PyYAML: 3.11
PyZMQ: 15.2.0
RAET: 0.6.5
smmap: 0.9.0
timelib: 0.2.4
Tornado: 4.3
ZMQ: 4.1.2

System Versions:
dist:
machine: x86_64
release: 15.6.0
system: Darwin
version: 10.11.6 x86_64

@TheBigBear TheBigBear changed the title mac os x installation relies on un-installed 'mac_service_helper.sh' Exception raised when processing __virtual__ function for mac_system - (mac os x installation relies on un-installed 'mac_service_helper.sh') Aug 1, 2016
@Ch3LL
Copy link
Contributor

Ch3LL commented Aug 3, 2016

hmmm okay looking at this code here I believe is where its attempting to read that file.

It seems from the code that it is trying to read plist files. I am not familiar with macosx so from a quick google search it seems these are just configuration files or preferences files for software. It seems this code is attempting to read those files to gather a list of available services.

ping @twangboy is it maybe a better approach to look for the .plist extension. Seems that might resolve this issue, but not certain.

@Ch3LL Ch3LL added Bug broken, incorrect, or confusing behavior severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around P4 Priority 4 Platform Relates to OS, containers, platform-based utilities like FS, system based apps MacOS pertains to the OS of fruit labels Aug 3, 2016
@Ch3LL Ch3LL added this to the Approved milestone Aug 3, 2016
@cachedout
Copy link
Contributor

@twangboy Can we get this fixed please?

@twangboy
Copy link
Contributor

@TheBigBear Are you using Brew or MacPorts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior MacOS pertains to the OS of fruit P4 Priority 4 Platform Relates to OS, containers, platform-based utilities like FS, system based apps severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around ZRELEASED - 2016.3.3
Projects
None yet
Development

No branches or pull requests

5 participants