-
-
Notifications
You must be signed in to change notification settings - Fork 747
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
Adding st2scheduler #4382
Adding st2scheduler #4382
Conversation
12f0bd2
to
a87c11e
Compare
9020a01
to
e2c5a37
Compare
conf/logrotate.conf
Outdated
@@ -110,6 +110,15 @@ notifempty | |||
endscript | |||
} | |||
|
|||
## Scheduler | |||
/var/log/st2/scheduler*.log { |
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.
/var/log/st2scheduler
instead of /var/log/scheduler
16a74fb
to
434e273
Compare
conf/st2.package.conf
Outdated
@@ -83,3 +83,7 @@ remote_dir = /tmp | |||
|
|||
[workflow_engine] | |||
logging = /etc/st2/logging.workflowengine.conf | |||
|
|||
[scheduler] | |||
logging = /etc/st2/logging.st2scheduler.conf |
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.
logging.scheduler.conf
instead of logging.st2scheduler.conf
conf/st2.prod.conf
Outdated
@@ -79,3 +79,6 @@ logging = /etc/st2timersengine/logging.st2timersengine.conf | |||
|
|||
[workflow_engine] | |||
logging = /etc/st2actions/logging.workflowengine.conf | |||
|
|||
[scheduler] | |||
logging = /etc/st2actions/logging.st2scheduler.conf |
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.
Same typo
ec73857
to
cee60e0
Compare
scheduler_opts = [ | ||
cfg.StrOpt( | ||
'logging', | ||
default='conf/logging.scheduler.conf', |
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.
From https://stackstorm.slack.com/archives/C029K4CBU/p1539194738000100
One of the things we discussed in Slack if there is a chance to use safe defaults that will let the packaged service start up when respective st2.conf
logging setting is absent.
Curious if it's possible to set the default to
Lines 87 to 88 in 494f71f
[scheduler] | |
logging = /etc/st2/logging.scheduler.conf |
because currently
conf/logging.scheduler.conf
can't be found if setting is set via st2.conf
.
Not sure if that could break any Unit tests and which logging config path/st2.conf is used there.
|
||
components = [ | ||
scheduler.get_scheduler(), | ||
] |
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.
Please follow https://github.com/StackStorm/st2/blob/master/st2actions/st2actions/cmd/workflow_engine.py to rewrite the service. The use of components
in the previous action runner workers was done to accommodate multiple threads. Now that action runner worker and scheduler are independent, we don't need to use components
.
@@ -42,7 +42,6 @@ def _run_worker(): | |||
LOG.info('(PID=%s) Worker started.', os.getpid()) | |||
|
|||
components = [ | |||
scheduler.get_scheduler(), | |||
worker.get_worker() | |||
] |
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.
Please follow https://github.com/StackStorm/st2/blob/master/st2actions/st2actions/cmd/workflow_engine.py to refactor the service. The use of components in the previous action runner workers was done to accommodate multiple threads. Now that action runner worker and scheduler are independent, we don't need to use components.
screen -d -m -S st2-scheduler ./virtualenv/bin/python \ | ||
./st2actions/bin/st2scheduler \ | ||
--config-file $ST2_CONF | ||
|
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 also need to add an entry for st2-scheduler under https://github.com/StackStorm/st2/blob/master/tools/launchdev.sh#L354.
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.
LGTM
We also need to update documentation for how - describe the new component, update service diagram, etc. |
This PR adds the initial break out of the scheduler. This PR will only encompass breaking out the service. Further enhancements will happen in subsequent PRs.