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

Add warning messages to logs if StackStorm running with python 2 #5043

Merged
merged 6 commits into from
Sep 18, 2020

Conversation

amanda11
Copy link
Contributor

@amanda11 amanda11 commented Sep 17, 2020

Add warning messages in log files if StackStorm service is using python2

Warning message appears in log file, and also systemctl status (until journal will get wrapped).

Addresses part of #5041 and #4938

Does not cover the reporting from st2ctl

@pull-request-size pull-request-size bot added the size/S PR that changes 10-29 lines. Very easy to review. label Sep 17, 2020
@amanda11
Copy link
Contributor Author

Output from systemctl status on one of the stackstorm services just after starting:

Sep 17 14:14:13 testsyslog st2workflowengine[14015]: 2020-09-17 14:14:13,852 WARNING [-] DEPRECATION WARNING. Support for python 2 will be removed in future StackStorm release(s). Please ensure that all packs used are python 3 compatible. Python 3 will already be used if you upgrade to a newer OS release

Output from a log file on startup:
2020-09-17 14:14:06,917 139703825615920 WARNING service_setup [-] DEPRECATION WARNING. Support for python 2 will be removed in future StackStorm release(s). Please ensure that all packs used are python 3 compatible. Python 3 will already be used if you upgrade to a newer OS release.

Warning appeared in following log files:

  • st2actionrunner..log
  • st2api.log
  • st2auth.log
  • st2garbagecollector.log
  • st2notifier.log
  • st2resultstracker.log
  • st2rulesengine.log
  • st2scheduler.log
  • st2sensorcontainer.log
  • st2stream.log
  • st2timersengine.log
  • st2workflowengine.log

Placement in the service_setup.py ensures that it goes to the log file as well as to systemctl status.

Does not cover the changes for reporting via st2ctl, will need to be covered in separate PR. Not added as would be in a different area of code.

Copy link
Member

@arm4b arm4b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Also it's nice to see that implementation for this is actually so easy & clean.

@arm4b arm4b added this to the 3.3.0 milestone Sep 17, 2020
@arm4b arm4b added the feature label Sep 17, 2020
@amanda11 amanda11 merged commit cb3c9be into master Sep 18, 2020
@amanda11 amanda11 deleted the py2_warning_logs branch September 18, 2020 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature size/S PR that changes 10-29 lines. Very easy to review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants