salopensource / sal-scripts

Apache License 2.0
23 stars 31 forks source link

Old, non-working, puppet in path breaks sal-submit #41

Closed jby closed 5 years ago

jby commented 5 years ago

As requested by @grahamgilbert in #sal in the macadmins slack

sudo /usr/local/sal/bin/sal-submit 
Traceback (most recent call last):
  File "/usr/local/sal/bin/sal-submit", line 670, in <module>
    main()
  File "/usr/local/sal/bin/sal-submit", line 66, in main
    puppet_version = puppet_vers()
  File "/usr/local/sal/bin/sal-submit", line 276, in puppet_vers
    puppet_version = subprocess.check_output(command).strip()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 566, in check_output
    process = Popen(stdout=PIPE, *popenargs, **kwargs)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

This was apparently caused by having an old, non-working, puppet in $PATH:

puppet --version
zsh: /usr/local/bin/puppet: bad interpreter: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby: no such file or directory

rm /usr/local/bin/puppet resulted in:

sudo /usr/local/sal/bin/sal-submit 
Could not load Puppet: cannot load such file -- puppet
sheagcraig commented 5 years ago

FWIW, Puppet won't be called with the V4 checkin scripts.