Dmitry Golubenko
unread,Apr 15, 2013, 11:26:29 PM4/15/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to salt-...@googlegroups.com
hi,
npm.installed implicitly adds --json option which breaks some packages
(karma for example). w/o --json all works fine, can --json be made
optional state module argument? e.g.
npm.installed:
- name karma
- json: False
salt-call --local state.single npm.installed karma
[INFO ] Loaded configuration file: /etc/salt/minion
[WARNING ] Both 'dmidecode' and 'lspci' failed to execute, either
because they do not exist on the system of the user running this
instance does not have the necessary permissions to execute them.
Grains output might not be accurate.
[INFO ] Executing command 'ps -efH' in directory '/root'
[WARNING ] Both 'dmidecode' and 'lspci' failed to execute, either
because they do not exist on the system of the user running this
instance does not have the necessary permissions to execute them.
Grains output might not be accurate.
[INFO ] Loading fresh modules for state activity
[INFO ] Executing state npm.installed for karma
[INFO ] Executing command 'npm list --json --global' in directory
'/root'
[INFO ] Executing command 'npm install --json --global karma' in
directory '/root'
[ERROR ] No changes made for karma
local:
----------
State: - npm
Name: karma
Function: installed
Result: False
Comment: An exception occured in this state: Traceback (most
recent call last):
File "/usr/lib/python2.7/site-packages/salt/state.py", line 1208, in
call
*cdata['args'], **cdata['kwargs'])
File "/usr/lib/python2.7/site-packages/salt/states/npm.py", line 53,
in installed
runas=runas
File "/usr/lib/python2.7/site-packages/salt/modules/npm.py", line
52, in install
return json.loads(''.join(lines))
File "/usr/lib64/python2.7/json/__init__.py", line 326, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python2.7/json/decoder.py", line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/python2.7/json/decoder.py", line 384, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
Changes: