mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
upgrade: Swap postfix_localmail for local_mailserver.
This commit is contained in:
committed by
Tim Abbott
parent
1f0cfd4662
commit
7a62a9b509
@@ -7,6 +7,7 @@
|
||||
import argparse
|
||||
import logging
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
import time
|
||||
@@ -179,6 +180,30 @@ subprocess.check_call(
|
||||
[os.path.join(deploy_path, "scripts", "setup", "generate_secrets.py"), "--production"]
|
||||
)
|
||||
|
||||
# TODO/compatibility: Puppet class names for the manifest renames in
|
||||
# the 11.0 release. Can be removed when we can no longer directly
|
||||
# upgrade from 10.x.
|
||||
class_renames = {
|
||||
"zulip::postfix_localmail": "zulip::local_mailserver",
|
||||
}
|
||||
classes = re.split(r"\s*,\s*", get_config(config_file, "machine", "puppet_classes", ""))
|
||||
new_classes = [class_renames.get(c, c) for c in classes]
|
||||
if classes != new_classes:
|
||||
if args.skip_restart:
|
||||
logging.error("Would need to adjust puppet classes -- aborting!")
|
||||
sys.exit(1)
|
||||
logging.info("Adjusting Puppet classes for renames...")
|
||||
subprocess.check_call(
|
||||
[
|
||||
"crudini",
|
||||
"--set",
|
||||
"/etc/zulip/zulip.conf",
|
||||
"machine",
|
||||
"puppet_classes",
|
||||
", ".join(new_classes),
|
||||
]
|
||||
)
|
||||
|
||||
# And then, building/installing the static assets.
|
||||
if args.ignore_static_assets:
|
||||
# For the OS version upgrade use case, the static assets are
|
||||
|
Reference in New Issue
Block a user