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 cannot do simple state 'test.nop': "'test.nop' is not available." #27636

Closed
brian-bk opened this issue Oct 2, 2015 · 7 comments
Closed
Assignees
Labels
Bug broken, incorrect, or confusing behavior Documentation Relates to Salt documentation P4 Priority 4 RIoT Relates to integration with cloud providers, hypervisors, API-based services, etc. severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around
Milestone

Comments

@brian-bk
Copy link

brian-bk commented Oct 2, 2015

Hello, I was trying to use the archive.extracted state using salt-ssh, when I recieved errors that the state archive.extracted is not available. It turns out I cannot get any state that is not a file.* state. Is this normal behavior?

Here is my state bar.sls:

/opt/bar:
  test.nop:
    - name: /opt/bar

Which after running salt-ssh 'hostname.com' --config-dir=<conf-dir> --priv=<ssh-id> state.sls bar has output:

hostname.com:
----------
          ID: /opt/bar
    Function: test.nop
      Result: False
     Comment: State 'test.nop' was not found in SLS 'bar'
              Reason: 'test.nop' is not available.
     Started:
    Duration:
     Changes:

Summary for hostname.com
------------
Succeeded: 0
Failed:    1
------------
Total states run:     1
Total run time:   0.000 ms

salt-ssh versions output:

Salt Version:
           Salt: 2015.8.0

Dependency Versions:
         Jinja2: 2.8
       M2Crypto: Not Installed
           Mako: Not Installed
         PyYAML: 3.11
          PyZMQ: Not Installed
         Python: 2.7.9 (default, Jul  1 2015, 15:28:56)
           RAET: Not Installed
        Tornado: 4.2.1
            ZMQ: Not Installed
           cffi: Not Installed
       cherrypy: Not Installed
       dateutil: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
        libnacl: Not Installed
   msgpack-pure: 0.1.3
 msgpack-python: 0.4.6
   mysql-python: Not Installed
      pycparser: Not Installed
       pycrypto: Not Installed
         pygit2: Not Installed
   python-gnupg: Not Installed
          smmap: Not Installed
        timelib: Not Installed

System Versions:
           dist: redhat 6.5 Santiago
        machine: x86_64
        release: 2.6.32-431.23.3.el6.x86_64
         system: Red Hat Enterprise Linux Server 6.5 Santiago
@anlutro
Copy link
Contributor

anlutro commented Oct 6, 2015

Have you tried removing the local cache (/var/cache/salt by default) as well as the remote cache (/tmp/.root_*_salt)?

@jfindlay jfindlay added the info-needed waiting for more info label Oct 6, 2015
@jfindlay jfindlay added this to the Blocked milestone Oct 6, 2015
@jfindlay
Copy link
Contributor

jfindlay commented Oct 6, 2015

@brian-bk, thanks for the report. Do the recommendations from @anlutro fix the problems?

@rallytime
Copy link
Contributor

I think this is actually "expected behavior", though it is confusing because of the versionadded notation. The docs state that test.nop was added in 2015.5.6, which it was added to the 2015.5 branch before the release of 2015.5.6, and is indeed available in that version (or will be when it is officially released). However, 2015.8.0 had already been tagged and released when this function was added to 2015.5, so that function didn't make it into 2015.8.0.

If you check the salt/states/test.py file at the v2015.8.0 tag, the function is indeed not available. It will be available in 2015.8.1, however.

I was wondering when we would run into something like this in the docs with our merge-forward strategy. I'm not sure what the best way is to inidcate these discrepancies in the docs or not. Thoughts @jacobhammons or @basepi?

@basepi
Copy link
Contributor

basepi commented Oct 6, 2015

Yes, I thought about this very problem when I wrote that versionadded. I probably should have just put 2015.8.1, and if people discovered it in 2015.5.6 it would just be a happy surprise for them. I think that's what we should do in the future -- only include the latest stable version.

@basepi
Copy link
Contributor

basepi commented Oct 6, 2015

(If someone wants to change it to 2015.8.1, I would be on board. I'll do it tomorrow if nobody else grabs it)

@brian-bk
Copy link
Author

brian-bk commented Oct 7, 2015

Removing the /tmp/.<salt_user>_*_salt cache worked, at least for my archive.extracted state. Still not for the test.nop, but sounds like that is expected for the version. Thanks for the help. The archive.extracted was much more important anyway.

rallytime pushed a commit to rallytime/salt that referenced this issue Oct 7, 2015
@rallytime rallytime added Documentation Relates to Salt documentation Bug broken, incorrect, or confusing behavior severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around P4 Priority 4 and removed info-needed waiting for more info labels Oct 7, 2015
@rallytime rallytime modified the milestones: B 11, Blocked Oct 7, 2015
@rallytime rallytime self-assigned this Oct 7, 2015
@rallytime
Copy link
Contributor

@brian-bk Excellent! Glad you got the archive.extracted working as needed. I've fixed the version added directive in #27754 for the 2015.8 branch so it is clear that the test.nop state isn't available until 2015.8.1. As such, I'll go ahead and close this. Thanks!

@meggiebot meggiebot added the RIoT Relates to integration with cloud providers, hypervisors, API-based services, etc. label Oct 12, 2015
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 Documentation Relates to Salt documentation P4 Priority 4 RIoT Relates to integration with cloud providers, hypervisors, API-based services, etc. severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around
Projects
None yet
Development

No branches or pull requests

6 participants