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

SLS error (An exception occurred in this state: Traceback) #50989

Closed
mpx8701 opened this issue Dec 27, 2018 · 7 comments

Comments

Projects
None yet
2 participants
@mpx8701
Copy link

commented Dec 27, 2018

Description of Issue/Question

when I run the following "state.apply" cmd from my master

salt 'mysrxdevice' state.apply testtwo

I see the following error:

mysrxdevice

      ID: show_system_uptime
Function: junos.cli
    Name: show system uptime
  Result: False
 Comment: An exception occurred in this state: Traceback (most recent call last):
            File "/usr/lib/python2.7/site-packages/salt/state.py", line 1913, in call
              **cdata['kwargs'])
            File "/usr/lib/python2.7/site-packages/salt/loader.py", line 1898, in wrapper
              return f(*args, **kwargs)
            File "/usr/lib/python2.7/site-packages/salt/states/junos.py", line 233, in cli
              ret['changes'] = __salt__['junos.cli'](name, format, **kwargs)
          TypeError: cli() takes at most 1 argument (2 given)
 Started: 09:05:32.481469
Duration: 2.482 ms
 Changes:

Summary for mysrxdevice

Succeeded: 0
Failed: 1

Total states run: 1
Total run time: 2.482 ms

I am able to see the same error in my proxy process, when placed in debug

Setup

(Please provide relevant configs and/or SLS files (Be sure to remove sensitive info).)

cat testtwo.sls

show_system_uptime:
    junos.cli:
        - name: show system uptime
        - format: text

Steps to Reproduce Issue

(Include debug logs if possible and relevant.)

No sls files work.
but if I run the command via junos.cli (show version) it works fine

Versions Report

(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)

Master:
Salt Version:
Salt: 2018.3.3

Dependency Versions:
cffi: 1.6.0
cherrypy: unknown
dateutil: Not Installed
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.7.2
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: 0.21.1
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.4.6
mysql-python: Not Installed
pycparser: 2.14
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: Not Installed
Python: 2.7.5 (default, Jul 3 2018, 06:28:28)
python-gnupg: Not Installed
PyYAML: 3.10
PyZMQ: 15.3.0
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 4.2.1
ZMQ: 4.1.4

System Versions:
dist: oracle 7.5
locale: UTF-8
machine: x86_64
release: 3.10.0-862.11.6.el7.x86_64
system: Linux
version: Oracle Linux Server 7.5

Minion:
Salt Version:
Salt: 2018.3.3

Dependency Versions:
cffi: 1.6.0
cherrypy: Not Installed
dateutil: Not Installed
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.7.2
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: 0.21.1
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.4.6
mysql-python: Not Installed
pycparser: 2.14
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: Not Installed
Python: 2.7.5 (default, Jul 3 2018, 06:28:28)
python-gnupg: Not Installed
PyYAML: 3.10
PyZMQ: 15.3.0
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 4.2.1
ZMQ: 4.1.4

System Versions:
dist: oracle 7.5
locale: UTF-8
machine: x86_64
release: 3.10.0-862.11.6.el7.x86_64
system: Linux
version: Oracle Linux Server 7.5

@mpx8701

This comment has been minimized.

Copy link
Author

commented Dec 27, 2018

Note, I tried updatin my PyYAML to 3.11 and I am running junos-eznc 2.2.0

@mpx8701

This comment has been minimized.

Copy link
Author

commented Dec 27, 2018

also tried updating pycparser from 2.14 to 2.19

No change

@mpx8701

This comment has been minimized.

Copy link
Author

commented Dec 28, 2018

As a test, I had a second cluster setup with
[xxxxx~]# salt-minion --version
salt-minion 2018.3.2 (Oxygen)

and I am not seeing this issue....hmmmmmm bug with 2018.3.3?

@garethgreenaway

This comment has been minimized.

Copy link
Member

commented Dec 28, 2018

@mpx8701 thanks for the report. I see the issue. In 2018.3.3 the handling of the arguments changed so that the format argument was expected to be included in kwargs, but kwargs is passed in as well. So the number of parameters is incorrect. We'll get this fixed up for 2018.3.4. Thanks!

@mpx8701

This comment has been minimized.

Copy link
Author

commented Dec 30, 2018

thanks for the quickness in finding the issue!

@mpx8701

This comment has been minimized.

Copy link
Author

commented Dec 30, 2018

Do you have a ETA on when 2018.3.4 will be released?

@garethgreenaway

This comment has been minimized.

Copy link
Member

commented Jan 9, 2019

@mpx8701 Our focus right now is getting the fluorine release (2019.2.0) out. Once that is out then we'll provide new releases both 2017.7 and 2018.3. Since this has been merged and will be in upcoming releases I'm going to close this out, if the problem persists please comment & we'll re-open the issue or feel free to open a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.