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

Adding st2scheduler #4382

Merged
merged 2 commits into from
Oct 10, 2018
Merged

Adding st2scheduler #4382

merged 2 commits into from
Oct 10, 2018

Conversation

bigmstone
Copy link
Contributor

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.

@@ -110,6 +110,15 @@ notifempty
endscript
}

## Scheduler
/var/log/st2/scheduler*.log {
Copy link
Member

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

@bigmstone bigmstone force-pushed the scheduler branch 2 times, most recently from 16a74fb to 434e273 Compare October 9, 2018 17:01
@@ -83,3 +83,7 @@ remote_dir = /tmp

[workflow_engine]
logging = /etc/st2/logging.workflowengine.conf

[scheduler]
logging = /etc/st2/logging.st2scheduler.conf
Copy link
Member

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

@@ -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
Copy link
Member

Choose a reason for hiding this comment

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

Same typo

@arm4b arm4b added this to the 3.0.0 milestone Oct 9, 2018
@arm4b arm4b added the feature label Oct 9, 2018
@bigmstone bigmstone force-pushed the scheduler branch 2 times, most recently from ec73857 to cee60e0 Compare October 10, 2018 03:04
scheduler_opts = [
cfg.StrOpt(
'logging',
default='conf/logging.scheduler.conf',
Copy link
Member

@arm4b arm4b Oct 10, 2018

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

[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(),
]
Copy link
Contributor

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()
]
Copy link
Contributor

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

Copy link
Contributor

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.

Copy link
Contributor

@m4dcoder m4dcoder left a comment

Choose a reason for hiding this comment

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

LGTM

@bigmstone bigmstone merged commit 29104d7 into master Oct 10, 2018
@bigmstone bigmstone deleted the scheduler branch October 10, 2018 22:05
@Kami
Copy link
Member

Kami commented Oct 17, 2018

We also need to update documentation for how - describe the new component, update service diagram, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants