Repository navigation
Get default logging level and log file from default opts dict - #37272
Conversation
|
I think is is all likely fine but I believe it should go in develop instead of in a point release. @vutny what do you think about resubmitting this PR on the develop branch? |
|
@cachedout At first look this was a minor issue to me. I've spotted that Salt commands are displaying wrong default log-level settings, instead of real default and documented values. But when I looked at code in The problem here is that the only method which honors such settings is Currently, only the help messages are affected (this is all I've found so far), but it's very easy to forget/miss the fact that different logging settings are defined twice in the code, which may lead to a situation where some parts of the code would use local defaults, but others use "real" ones. TL;DRI believe this should be fixed in earliest branch possible, but it appears that the |
|
@s0undt3ch Any comments on this? |
|
@cachedout I think this is a good idea. I went through the PR and seems like it does the right thing. The only thing is that this should have also unit tests, as it touches released versions and we unlikely want to have an adventures here. So, @vutny, please make a Unit Test for this, or let it be only in Oh, and this can be also done to 2015.8, if @vutny does not mind to back-port that there. We will happily accept the patch to our package! 😄 |
|
Thanks for the feedback @isbm ! @cachedout , I'll try to get my hands on writing some unit test(s) for this particular case. Stay tuned 😄 |
|
@vutny Great! We'll also need this rebased, since it's now conflicting. Thanks. |
|
Thanks for the rebase. Let me know when you have tests ready and we'll get this in. Thanks, @vutny |
|
Hi @vutny No hurry here but just checking with you on the test progress. Thanks! |
|
@cachedout Thanks for the ping back. I'm working on the tests and actually discovering many little inconsistencies in the code during the process 😄 |
|
Thanks, @vutny. Just let me know when you're ready to go. |
|
@cachedout Finally, this day has come! 😄 Please review, now it's ready for merge. |
|
Great work here, @vutny. We really appreciate this one! |
What does this PR do?
It establishes a single source of truth for default logging level and log file path setting for Salt components. In other words, the motivation is to get rid of hard-coded values in
salt/utils/parsers.pywhich are not taken into account in any case, but this could give some side-effects like described below.What issues does this PR fix or reference?
For example, the
salt-callandsalt-cloudcommands are displaying wrong information about default log-level in their online help.I have completely empty
/etc/salt/minionfile and nothing in/etc/salt/minion.d.Help says that default log level is
info:But actually it is not:
Tests written?
No