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

Custom grains errors not logging #8690

Closed
sebw opened this issue Nov 20, 2013 · 3 comments
Closed

Custom grains errors not logging #8690

sebw opened this issue Nov 20, 2013 · 3 comments
Assignees
Labels
Bug broken, incorrect, or confusing behavior fixed-pls-verify fix is linked, bug author to confirm fix severity-low 4th level, cosemtic problems, work around exists

Comments

@sebw
Copy link
Contributor

sebw commented Nov 20, 2013

I scratched my head for 15 minutes on this one:

I have a couple of custom grains defined under /etc/salt/grains

They wouldn't load for some reason

It occurs I had a typo in the file.. something like this:

COMPANY_GRAIN1: blah
COMPANY_GRAIN2:bleh
COMPANY_GRAIN3: lolz

Notice the missing space on COMPANY_GRAIN2?

The whole file was discarded silently even when running salt-minion -l debug. I would expect logs to report the syntax error.

@basepi
Copy link
Contributor

basepi commented Nov 20, 2013

Hrm, interesting. We must be catching the YAML error somewhere in there and aren't logging it properly. Thanks for the report

@basepi
Copy link
Contributor

basepi commented Nov 20, 2013

(I updated the title to be more in line with what the problem is.)

@cachedout
Copy link
Contributor

Above PR should log what you want it to. I'm going to go ahead and close this. Feel free to re-open if this fix isn't sufficient. Thanks!

thatch45 added a commit that referenced this issue Nov 25, 2013
Log warning if grains file contains errors.
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 fixed-pls-verify fix is linked, bug author to confirm fix severity-low 4th level, cosemtic problems, work around exists
Projects
None yet
Development

No branches or pull requests

3 participants