StorminStanley / st2workroom

Vagrant environment used to play with StackStorm, develop StackStorm for your environment, or develop on StackStorm itself!
Apache License 2.0
23 stars 21 forks source link

Make sure nginx is actually restarted on refresh events #331

Closed Kami closed 8 years ago

Kami commented 8 years ago

I noticed this bug while testing installer changes - it looked like installer branch / revision was correctly checked out but the installer still used incorrect revision.

I believe the issue is related to initial puppet run not restarting nginx, but I could be wrong.

The reason why I suspect this is because when I manually test the changes (manually cloned / checked out branch, restarted nginx and st2installer uwsgi process) it works fine.

Kami commented 8 years ago

I'm closing this since this would probably break the installer.

One of the potential solutions might be adding /etc/init.d/nginx restart to the end of the bootstrap script (or similar)? Since installer doesn't use the bootstrap script so it will only affected install.sh runs.

jfryman commented 8 years ago

Well, crap. I think this was meant to squash one :bug:, but introduce another.

If nginx restarts in the middle of a run, the logging stream in st2installer stops as the connection is killed. So, it's nerfed here and restarted in the installer.

Should probably make the service_restart attribute a variable dependent on the state of the installer (https://github.com/StackStorm/st2workroom/blob/ef8f8fde061ebcff117edf8e5ec04e6015635a32/modules/profile/manifests/st2server.pp#L58)

emedvedev commented 8 years ago

Installer refreshes when there's no connection for 5 seconds, so it should remediate itself. If it doesn't happen, it's probably an installer bug.

Kami commented 8 years ago

@emedvedev Yeah, although the problem is that it generates a new cert so if we restarted nginx during installer run user would be prompted to accept self signed cert again so this won't work.