Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

upgrade: Mark puppet as having started the server.

Alex Vandiver0af00a3233fc
diff --git a/scripts/lib/upgrade-zulip-stage-2 b/scripts/lib/upgrade-zulip-stage-2
index 94eb7c22043..d578973da90 100755
--- a/scripts/lib/upgrade-zulip-stage-2
+++ b/scripts/lib/upgrade-zulip-stage-2
@@ -363,6 +363,9 @@ if not args.skip_puppet:
logging.info("Applying Puppet changes...")
subprocess.check_call(["./scripts/zulip-puppet-apply", "--force"])
subprocess.check_call(["apt-get", "-y", "--allow-downgrades", "upgrade"])
+ # Puppet may have reloaded supervisor, and in so doing started
+ # services; mark as potentially needing to stop the server.
+ IS_SERVER_UP = True
if migrations_needed:
# Database migrations assume that they run on a database in
@@ -372,10 +375,7 @@ if migrations_needed:
subprocess.check_call(["./manage.py", "migrate", "--noinput"], preexec_fn=su_to_zulip)
logging.info("Restarting Zulip...")
-if IS_SERVER_UP or not args.skip_puppet:
- # Even if the server wasn't up previously, puppet might have
- # started it if there were supervisord configuration changes, so
- # we need to use restart-server if puppet ran.
+if IS_SERVER_UP:
restart_args = ["--fill-cache"]
if args.skip_tornado:
restart_args.append("--skip-tornado")