Salt minion seems to only log WARN and ERROR to /var/log/salt/minion even though log_level is set to info in /etc/salt/minion. INFO logs show up in /var/log/syslog instead.
Salt-minion on Ubuntu 16.04 LTS
Install Salt-minion on Ubuntu 16.04 LTS and set log_level to info.
Salt Version:
Salt: 2016.11.1
Dependency Versions:
cffi: 0.8.6
cherrypy: Not Installed
dateutil: 1.5
gitdb: 0.5.4
gitpython: 0.3.2 RC1
ioflo: Not Installed
Jinja2: 2.7.2
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: Not Installed
Mako: 0.9.1
msgpack-pure: Not Installed
msgpack-python: 0.4.6
mysql-python: 1.2.3
pycparser: 2.10
pycrypto: 2.6.1
pygit2: Not Installed
Python: 2.7.6 (default, Jun 22 2015, 17:58:13)
python-gnupg: Not Installed
PyYAML: 3.10
PyZMQ: 14.5.0
RAET: Not Installed
smmap: 0.8.2
timelib: Not Installed
Tornado: 4.2.1
ZMQ: 4.0.5
System Versions:
dist: Ubuntu 14.04 trusty
machine: x86_64
release: 3.13.0-68-generic
system: Linux
version: Ubuntu 14.04 trusty
@johje349 i am able to replicate this. git bisect shows: 3c60e2388ef5bd54e71f29fe09c996d06b5bc633 which is in this pr: https://github.com/saltstack/salt/pull/37272
Here is a docker container for someone to quicly replicate this:
docker run -it -v /home/ch3ll/git/salt/:/testing ch3ll/issues:38388
(where /home/ch3ll/git/salt is a local cloned git repo)salt-minion -d
less /var/log/salt/minion
and nothing will be logged.If changed to previous version 2016.3.4 this does work and you will see info logs.
I'm seeing the same thing on the salt-master. I can salt-master -l info and get all the logs, but short of that nothing lower than warning shows up in /var/log/salt/master regardless of what the logging level is set to.
setting log_level_logfile works, setting that to info will get the right logs into the log file.
@vutny Since you spent some time in this area somewhat recently, you might be interested in looking at this one.
Yeah, this is something really weird. Indeed setting the log_level_logfile
option takes precedence over log_level
if set in config or via CLI, but otherwise it will inherit the level set by log_level
configuration option, as Salt docs say.
I was sure I had this case covered in unit tests... I will definitely take a look on this.
@rallytime This also affects the future 2016.3.5
release. Should be easy to fix, but I need to check the tests more carefully.
@vutny Sounds good. We're hoping to tag 2016.3.5 soon, and I don't know if this fix will make it in time. Looks like you've started a fix, but I don't see a PR yet. I put the 2016.3.6 label on here so we know this should certainly be fixed before tagging 2016.3.6.
Of course, if your fix gets in before we're able to tag 2016.3.5, then that's great!
Thank you very much for taking a look at this. It is very much appreciated.
@rallytime I did it. Let's wait for build to be finished.
Awesome! Thank you very much!
@johje349 This is fixed with the change in PR #38808, which will be in the 2016.3.5
and 2016.11.2
releases. Thanks all!