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

[develop] Adding jids in master & minion logs #48660

Merged
merged 17 commits into from Aug 3, 2018

Conversation

@garethgreenaway
Copy link
Member

@garethgreenaway garethgreenaway commented Jul 18, 2018

What does this PR do?

This change adds the optional ability to include the JIDs in the master & minion logs for all entries related to a particular Salt job.

What issues does this PR fix or reference?

#45282

Commits signed with GPG?

Yes

Please review Salt's Contributing Guide for best practices.

See GitHub's page on GPG signing for more information about signing commits with GPG.

@garethgreenaway garethgreenaway requested a review from as a code owner Jul 18, 2018
@ghost ghost self-requested a review Jul 18, 2018
Copy link
Contributor

@isbm isbm left a comment

Unit Tests? 😉

Copy link
Contributor

@gtmanfred gtmanfred left a comment

Nice, well done.

blind-review

Copy link
Contributor

@rallytime rallytime left a comment

I have a very minor change request.

Otherwise, great idea using tornado's StackContext!

@@ -238,6 +238,19 @@ at the ``debug`` level, and sets a custom module to the ``all`` level:
'salt.modules': 'debug'
'salt.loader.saltmaster.ext.module.custom_module': 'all'
.. conf_log:: log_fmt_console
Copy link
Contributor

@rallytime rallytime Jul 20, 2018

This should be log_fmt_jid

@rallytime rallytime requested a review from cachedout Jul 20, 2018
@garethgreenaway garethgreenaway force-pushed the jids_in_logs branch 2 times, most recently from 8ee602b to 96cc656 Jul 27, 2018
@garethgreenaway
Copy link
Member Author

@garethgreenaway garethgreenaway commented Jul 27, 2018

Tests will pass under Python3 if logging is not disabled

➜ python ~/code/salt/tests/runtests.py -n integration.logging.test_jid_logging
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 * Python Version: 3.6.5 (default, Jul 27 2018, 13:22:44) [GCC 7.3.0]
 * Transplanting configuration files to '/tmp/salt-tests-tmpdir/config'
 * Current Directory: /home/gareth/code/salt
 * Test suite is running under PID 18747
 * Logging tests on /tmp/salt-runtests.log
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 * Max open files settings is too low (soft: 1024, hard: 4096) for running the tests
 * Trying to raise the limits to soft: 3072, hard: 4096
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 * Setting up Salt daemons to execute tests
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 * Starting salt-master ... STARTED!                                                                                                                                                                                                          
 * Starting salt-minion ... STARTED!                                                                                                                                                                                                          
 * Starting sub salt-minion ... STARTED!                                                                                                                                                                                                      
 * Starting syndic salt-master ... STARTED!                                                                                                                                                                                                   
 * Starting salt-syndic ... STARTED!                                                                                                                                                                                                          
==============================================================================================================================================================================================================================================
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Starting integration.logging.test_jid_logging Tests
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.
----------------------------------------------------------------------
Ran 1 test in 0.272s

OK

===========================================================================================================  Overall Tests Report  ===========================================================================================================
***  No Problems Found While Running Tests  **************************************************************************************************************************************************************************************************
==============================================================================================================================================================================================================================================
OK (total=1, skipped=0, passed=1, failures=0, errors=0) 
===========================================================================================================  Overall Tests Report  ===========================================================================================================

isbm
isbm approved these changes Jul 31, 2018
Copy link
Contributor

@isbm isbm left a comment

👍

@rallytime
Copy link
Contributor

@rallytime rallytime commented Jul 31, 2018

@garethgreenaway
Copy link
Member Author

@garethgreenaway garethgreenaway commented Aug 1, 2018

re-run all

Copy link
Contributor

@cachedout cachedout left a comment

This is extremely well-done. Hats off, @garethgreenaway

@rallytime rallytime merged commit 8c5b369 into saltstack:develop Aug 3, 2018
4 of 9 checks passed
4 of 9 checks passed
continuous-integration/jenkins/pr-merge This commit cannot be built
Details
codeclimate 1 issue to fix
Details
jenkins/pr/lint The lint job has failed
Details
jenkins/pr/py3-centos-7 The py3-centos-7 job has failed
Details
jenkins/pr/py2-centos-7 running py2-centos-7...
Details
@wip[bot]
WIP ready for review
Details
jenkins/pr/docs The docs job has passed
Details
jenkins/pr/py2-ubuntu-1604 The py2-ubuntu-1604 job has passed
Details
jenkins/pr/py3-ubuntu-1604 The py3-ubuntu-1604 job has passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants