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

salt-ssh fails with FreeBSD target and 'unless' requisite #56078

Closed
amendlik opened this issue Feb 6, 2020 · 9 comments
Closed

salt-ssh fails with FreeBSD target and 'unless' requisite #56078

amendlik opened this issue Feb 6, 2020 · 9 comments
Assignees
Labels
fixed-pls-verify fix is linked, bug author to confirm fix v3000.1 vulnerable version
Milestone

Comments

@amendlik
Copy link
Contributor

amendlik commented Feb 6, 2020

Description of Issue

When using salt-ssh, with the target system running FreeBSD, state execution fails if the SLS contains an unless requisite.

Setup

Here is the SLS I'm using to reproduce this issue:

demo:
  test.nop:
    - unless: true

Steps to Reproduce Issue

# salt-ssh <node> state.apply demo
[ERROR   ] JSON Render failed for: 
Traceback (most recent call last):
  File "/var/tmp/.amendlik_e98484_salt/salt-call", line 27, in <module>
    salt_call()
  File "/var/tmp/.amendlik_e98484_salt/pyall/salt/scripts.py", line 431, in salt_call
    client.run()
  File "/var/tmp/.amendlik_e98484_salt/pyall/salt/cli/call.py", line 57, in run
    caller.run()
  File "/var/tmp/.amendlik_e98484_salt/pyall/salt/cli/caller.py", line 138, in run
    ret = self.call()
  File "/var/tmp/.amendlik_e98484_salt/pyall/salt/cli/caller.py", line 237, in call
    ret['return'] = self.minion.executors[fname](self.opts, data, func, args, kwargs)
  File "/var/tmp/.amendlik_e98484_salt/pyall/salt/executors/direct_call.py", line 12, in execute
    return func(*args, **kwargs)
  File "/var/tmp/.amendlik_e98484_salt/pyall/salt/modules/state.py", line 2198, in pkg
    _set_retcode(ret)
  File "/var/tmp/.amendlik_e98484_salt/pyall/salt/modules/state.py", line 107, in _set_retcode
    if not __utils__['state.check_result'](ret, highstate=highstate):
  File "/var/tmp/.amendlik_e98484_salt/pyall/salt/loader.py", line 1208, in __getitem__
    func = super(LazyLoader, self).__getitem__(item)
  File "/var/tmp/.amendlik_e98484_salt/pyall/salt/utils/lazy.py", line 108, in __getitem__
    raise KeyError(key)
KeyError: 'state.check_result'
[ERROR   ] Expecting value: line 1 column 1 (char 0)
demo:

Versions Report

Source:

Salt Version:
           Salt: 2019.2.1rc0
 
Dependency Versions:
           cffi: 1.12.3
       cherrypy: Not Installed
       dateutil: 2.8.0
      docker-py: Not Installed
          gitdb: 2.0.3
      gitpython: 3.0.2
          ioflo: Not Installed
         Jinja2: 2.10.1
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: 0.35.2
           Mako: 1.1.0
   msgpack-pure: Not Installed
 msgpack-python: 0.6.1
   mysql-python: Not Installed
      pycparser: 2.14
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 3.7.6 (default, Dec 19 2019, 22:52:49)
   python-gnupg: Not Installed
         PyYAML: 5.1.2
          PyZMQ: 18.0.2
           RAET: Not Installed
          smmap: 2.0.3
        timelib: Not Installed
        Tornado: 6.0.2
            ZMQ: 4.3.2
 
System Versions:
           dist: fedora 31 Thirty One
         locale: UTF-8
        machine: x86_64
        release: 5.4.13-201.fc31.x86_64
         system: Linux
        version: Fedora 31 Thirty One

Target:

    Salt Version:
               Salt: 2019.2.1rc0
     
    Dependency Versions:
               cffi: 1.13.2
           cherrypy: Not Installed
           dateutil: 2.8.0
          docker-py: Not Installed
              gitdb: Not Installed
          gitpython: Not Installed
              ioflo: Not Installed
             Jinja2: 2.10.1
            libgit2: Not Installed
            libnacl: Not Installed
           M2Crypto: Not Installed
               Mako: Not Installed
       msgpack-pure: Not Installed
     msgpack-python: 0.6.1
       mysql-python: Not Installed
          pycparser: 2.19
           pycrypto: 2.6.1
       pycryptodome: Not Installed
             pygit2: Not Installed
             Python: 3.7.6 (default, Jan  4 2020, 02:40:34)
       python-gnupg: Not Installed
             PyYAML: 5.1.2
              PyZMQ: 18.1.1
               RAET: Not Installed
              smmap: Not Installed
            timelib: Not Installed
            Tornado: 6.0.2
                ZMQ: 4.3.1
     
    System Versions:
               dist:   
             locale: UTF-8
            machine: amd64
            release: 11.2-STABLE
             system: FreeBSD
            version: Not Installed
@max-arnold
Copy link
Contributor

2019.2.1 is exceptionally buggy (example: #54804).

Can you try 2019.2.3?

@amendlik
Copy link
Contributor Author

amendlik commented Feb 6, 2020

I can't reproduce this with 2019.2.3.

How can I obtain a 2019.2.3 build for Fedora?

@sagetherage sagetherage added the fixed-pls-verify fix is linked, bug author to confirm fix label Feb 7, 2020
@sagetherage sagetherage added this to the Approved milestone Feb 7, 2020
@sagetherage
Copy link
Contributor

@dmurphy18 can you help here?

@stale
Copy link

stale bot commented Mar 8, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.

@stale stale bot added the stale label Mar 8, 2020
@amendlik
Copy link
Contributor Author

amendlik commented Mar 9, 2020

@dmurphy18 Any update?

@stale
Copy link

stale bot commented Mar 9, 2020

Thank you for updating this issue. It is no longer marked as stale.

@stale stale bot removed the stale label Mar 9, 2020
@amendlik
Copy link
Contributor Author

I need to rescind my earlier comment. I am able to consistently reproduce this error using v3000.

Salt Version:
           Salt: 3000
 
Dependency Versions:
           cffi: 1.14.0
       cherrypy: Not Installed
       dateutil: Not Installed
      docker-py: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
         Jinja2: 2.10.1
        libgit2: 0.99.0
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.6.1
   mysql-python: Not Installed
      pycparser: 2.20
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: 1.1.1
         Python: 3.7.6 (default, Dec 19 2019, 22:52:49)
   python-gnupg: Not Installed
         PyYAML: 3.13
          PyZMQ: 18.0.1
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.5.3
            ZMQ: 4.3.1
 
System Versions:
           dist: fedora 31 Thirty One
         locale: UTF-8
        machine: x86_64
        release: 5.4.13-201.fc31.x86_64
         system: Linux
        version: Fedora 31 Thirty One

@max-arnold
Copy link
Contributor

That is because the bug reappeared again in 3000: #56131

@sagetherage sagetherage added the v3000.1 vulnerable version label Mar 26, 2020
@sagetherage
Copy link
Contributor

I will wait to close this, looks like it is fixed in the dot release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed-pls-verify fix is linked, bug author to confirm fix v3000.1 vulnerable version
Projects
None yet
Development

No branches or pull requests

4 participants