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

complete config ignore upon parse error #6714

Closed
pille opened this issue Aug 15, 2013 · 6 comments
Closed

complete config ignore upon parse error #6714

pille opened this issue Aug 15, 2013 · 6 comments
Assignees
Labels
Bug broken, incorrect, or confusing behavior

Comments

@pille
Copy link
Contributor

pille commented Aug 15, 2013

i made a mistake in /etc/salt/minion by forgetting a blank after the colon of:

append_domain:example.com

salt was not connecting to master.
the message in /var/log/minion was completely unhelpful:

2013-08-15 10:41:18,066 [salt.utils       ][ERROR   ] This master address: 'salt' was previously resolvable but now fails to resolve! The previously resolved ip addr will continue to be used
2013-08-15 10:41:18,066 [salt.minion      ][WARNING ] Master hostname: salt not found. Retrying in 30 seconds

this indiates that the config is ignored completely, as salt is the default master (but not in my setup).

running:

appstack1 cache # salt-call test.ping
Error parsing configuration file: /etc/salt/minion - while scanning a simple key
  in "", line 58, column 1:
    append_domain:example.com
    ^
could not found expected ':'
  in "", line 60, column 1:
    # Custom static grains for this  ... 
    ^
[WARNING ] Error parsing configuration file: /etc/salt/minion - while scanning a simple key
  in "", line 58, column 1:
    append_domain:example.com
    ^
could not found expected ':'
  in "", line 60, column 1:
    # Custom static grains for this  ... 
this message actually was helpful and should go into the log.
salt-minion-0.16.3
@ghost ghost assigned s0undt3ch Aug 15, 2013
@terminalmage
Copy link
Contributor

@s0undt3ch This is happening because of this block of code. I'm not as familiar with the logging system, but it appears that the logging isn't setup yet and therefore it is logging to the console and not the minion log. Is there any way around this?

@s0undt3ch
Copy link
Collaborator

Well, if logging is not yet setup no, no work around, as you state, it's printed to stdout.

I have a branch in my fork, which is not ready yet, that will store any logging messages that should be sent to console and log files while it's not setup and once setup, sends those stored logs messages. That might fix this issue, at lease make it more visible.

@terminalmage
Copy link
Contributor

That should resolve this then, as the issue was opened to try to get this infomation in the log as it was only discovered upon running salt-call.

@s0undt3ch
Copy link
Collaborator

Ok, let's leave it assigned to me and set to be included in 0.17.0

@terminalmage
Copy link
Contributor

Already done. :)

@s0undt3ch
Copy link
Collaborator

This is fixed in #7858 and should be cherry-picked to 0.17 (@basepi)

thatch45 added a commit that referenced this issue Oct 15, 2013
Test for the presence of a yaml parsing log message. Fixes #6714.
s0undt3ch added a commit to s0undt3ch/salt that referenced this issue Oct 16, 2013
…6714.

Additionally, moved the yaml syntax error checking to the proper place.
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
Projects
None yet
Development

No branches or pull requests

3 participants