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

commenting a section breaks salt without a proper error message #6544

Closed
FlorianLudwig opened this issue Aug 6, 2013 · 8 comments
Closed
Assignees
Labels
Bug broken, incorrect, or confusing behavior severity-low 4th level, cosemtic problems, work around exists
Milestone

Comments

@FlorianLudwig
Copy link
Contributor

Adding:

  'something':
# nothing

to your top.sls will break salt. Running salt commands will give you no output (not even warnings or errors!). Running the minion with -l debug will bring up:

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/salt/minion.py", line 635, in _thread_return
    ret['return'] = func(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/salt/modules/state.py", line 201, in highstate
    cache_name=kwargs.get('cache_name', 'highstate')
  File "/usr/lib/python2.7/site-packages/salt/state.py", line 2173, in call_highstate
    err += self.verify_tops(top)
  File "/usr/lib/python2.7/site-packages/salt/state.py", line 1789, in verify_tops
    for slsmod in slsmods:
TypeError: 'NoneType' object is not iterable
@UtahDave
Copy link
Contributor

UtahDave commented Aug 6, 2013

I think this may have been fixed by this commit: #6525

@FlorianLudwig can you test against git develop?

@basepi
Copy link
Contributor

basepi commented Aug 6, 2013

I think this is just the fault of an improper top.sls. Can you paste your whole top.sls?

I'm seeing a dictionary key that is set to None. Then when we iterate through, we expect a list there, and try to iterate over it.

@FlorianLudwig
Copy link
Contributor Author

@basepi you are correct it is "just" a faulty top.sls. As said you can produce it with any top.sls by addign those to lines:

  'something':
# nothing

In my humble opinion this should not break salt without any error message.

@UtahDave sems still broken to me

@basepi
Copy link
Contributor

basepi commented Aug 7, 2013

But.....it did have an error message, right? You would just like an error message that was more informative?

(Not trying to be difficult, just trying to ascertain exactly what you're looking for)

@FlorianLudwig
Copy link
Contributor Author

@basepi no, i mean there is no error message. There is a traceback on the minion - but running salt highstate does return exactly nothing.

@basepi
Copy link
Contributor

basepi commented Aug 7, 2013

Oh, well, that changes everything. I assumed we were returning that traceback or at least reporting that state compilation failed on the CLI.

Should be an easy fix. Thanks, and sorry I misunderstood.

@ghost ghost assigned basepi Aug 7, 2013
@basepi basepi closed this as completed in 130bab8 Aug 8, 2013
thatch45 added a commit that referenced this issue Aug 8, 2013
Handle state declarations not formed as a list, Fix #6544
@FlorianLudwig
Copy link
Contributor Author

@basepi Maybe that is a bug worth on its own? So that tracebacks get send back to the master in case something went wrong.

@basepi
Copy link
Contributor

basepi commented Aug 8, 2013

Well the key is that we don't want to do a global try-except. We have a list of errors which we send back to the master (which is what I used to fix this issue). We just need to be vigilant for further holes in our error-checking.

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 severity-low 4th level, cosemtic problems, work around exists
Projects
None yet
Development

No branches or pull requests

3 participants