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] Add a check for host in /etc/salt/roster #22332

Closed
rallytime opened this issue Apr 3, 2015 · 2 comments
Closed

[salt-ssh] Add a check for host in /etc/salt/roster #22332

rallytime opened this issue Apr 3, 2015 · 2 comments
Assignees
Labels
Bug broken, incorrect, or confusing behavior Core relates to code central or existential to Salt fixed-pls-verify fix is linked, bug author to confirm fix P3 Priority 3 Salt-SSH severity-low 4th level, cosemtic problems, work around exists
Milestone

Comments

@rallytime
Copy link
Contributor

If you have a syntax error in your roster file for salt-ssh, such as a missing space after host such as host:111.222.333.444 instead of host: 111.222.333.444, you get the following error:

# salt-ssh nt-cent6 test.ping
No hosts found with target nt-cent6 of type glob

YAML is probably treating the whole string as a key, so it's host:111.222.333.444: None or something like that.

There should be a check for host since it's a required member of the roster dictionary, and then provide a more helpful message if host isn't there, or you've mistyped something like this.

ping @basepi

@rallytime rallytime added Bug broken, incorrect, or confusing behavior Low Severity Salt-SSH labels Apr 3, 2015
@rallytime rallytime added this to the Approved milestone Apr 3, 2015
@rallytime
Copy link
Contributor Author

Oh, also, this is on the current HEAD of the 2014.7 branch:

# salt-ssh --versions-report
           Salt: 2014.7.4-50-g1be785e
         Python: 2.7.6 (default, Mar 22 2014, 22:59:56)
         Jinja2: 2.7.3
       M2Crypto: 0.21.1
 msgpack-python: 0.4.4
   msgpack-pure: Not Installed
       pycrypto: 2.6.1
        libnacl: Not Installed
         PyYAML: 3.11
          ioflo: Not Installed
          PyZMQ: 14.0.1
           RAET: Not Installed
            ZMQ: 4.0.4
           Mako: 0.9.1

@basepi
Copy link
Contributor

basepi commented May 14, 2015

Fixed in #23748. The render error was being logged in debug mode, but even there it was a terrible error. Bumped to error loglevel, and let the original yaml error through.

@basepi basepi added the fixed-pls-verify fix is linked, bug author to confirm fix label May 14, 2015
@basepi basepi closed this as completed May 14, 2015
@jfindlay jfindlay added the Core relates to code central or existential to Salt label May 26, 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 Core relates to code central or existential to Salt fixed-pls-verify fix is linked, bug author to confirm fix P3 Priority 3 Salt-SSH severity-low 4th level, cosemtic problems, work around exists
Projects
None yet
Development

No branches or pull requests

3 participants