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
Fixes #20626 - Periodic execution plan cleaner #37
Conversation
@adamruzicka, the Redmine ticket used is for a different project than the one associated with this GitHub repository. Please either:
If changing the ticket number used, remember to update the PR title and the commit message (using This message was auto-generated by Foreman's prprocessor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I started testing this change, but then I've noticed that jobs that end up in failure (let's say the host is unreachable or the script's non-zere exit code), the execution plans end up in paused state, and would not get cleaned http://projects.theforeman.org/issues/20647.
I will proceed with testing together with the fixes in the issue above.
config/settings.yml.example
Outdated
@@ -39,3 +39,5 @@ | |||
|
|||
# Log level, one of UNKNOWN, FATAL, ERROR, WARN, INFO, DEBUG | |||
# :log_level: ERROR | |||
|
|||
# :execution_plan_cleaner_age: 86400 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New line missing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, please comment here the value is in seconds and the default is 24 hours :)
@adamruzicka, the Redmine ticket used is for a different project than the one associated with this GitHub repository. Please either:
If changing the ticket number used, remember to update the PR title and the commit message (using This message was auto-generated by Foreman's prprocessor |
@adamruzicka, the Redmine ticket used is for a different project than the one associated with this GitHub repository. Please either:
If changing the ticket number used, remember to update the PR title and the commit message (using This message was auto-generated by Foreman's prprocessor |
One thing that came out of the testing: the cleaner should emit some info log messages about it's activity: it can be very useful |
The log needs to probably go into Dynflow |
@@ -40,6 +40,7 @@ class Settings < OpenStruct | |||
:plugins => {}, | |||
:pid_file => '/var/run/foreman-proxy/smart_proxy_dynflow_core.pid', | |||
:daemonize => false, | |||
:execution_plan_cleaner_age => 60 * 60 * 24, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to add this also to PLUGIN_SETTINGS
for the code to properly load the data from settings
@adamruzicka, the Redmine ticket used is for a different project than the one associated with this GitHub repository. Please either:
If changing the ticket number used, remember to update the PR title and the commit message (using This message was auto-generated by Foreman's prprocessor |
1 similar comment
@adamruzicka, the Redmine ticket used is for a different project than the one associated with this GitHub repository. Please either:
If changing the ticket number used, remember to update the PR title and the commit message (using This message was auto-generated by Foreman's prprocessor |
Tested and works well, after doing some changes mentioned in the review |
Addressed comments, logging is handled in Dynflow/dynflow#248 |
I don't see the code that would address the comments: forgot to push? |
@adamruzicka, the Redmine ticket used is for a different project than the one associated with this GitHub repository. Please either:
If changing the ticket number used, remember to update the PR title and the commit message (using This message was auto-generated by Foreman's prprocessor |
Pushed now... |
settings.d/dynflow.yml.example
Outdated
@@ -2,3 +2,4 @@ | |||
:enabled: true | |||
:database: /var/lib/foreman-proxy/dynflow/dynflow.sqlite | |||
:core_url: 'http://127.0.0.1:8008' | |||
:cleaner_max_age: 86400 # 1 day |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this one?
@adamruzicka, the Redmine ticket used is for a different project than the one associated with this GitHub repository. Please either:
If changing the ticket number used, remember to update the PR title and the commit message (using This message was auto-generated by Foreman's prprocessor |
@adamruzicka, the Redmine ticket used is for a different project than the one associated with this GitHub repository. Please either:
If changing the ticket number used, remember to update the PR title and the commit message (using This message was auto-generated by Foreman's prprocessor |
I've released dynflow 0.8.27, please bump the dependency here. |
@adamruzicka, the Redmine ticket used is for a different project than the one associated with this GitHub repository. Please either:
If changing the ticket number used, remember to update the PR title and the commit message (using This message was auto-generated by Foreman's prprocessor |
@adamruzicka, the Redmine ticket used is for a different project than the one associated with this GitHub repository. Please either:
If changing the ticket number used, remember to update the PR title and the commit message (using This message was auto-generated by Foreman's prprocessor |
Test failures unrelated. Merging |
Tested and works great. Thanks @adamruzicka |
No description provided.