Commit 401b773e authored by Klaus Aehlig's avatar Klaus Aehlig

upgrade: start daemons after ensure-dirs

On upgrading a cluster, we only can rely on daemons starting
up cleanly, if all needed directories are generated first. So
ensure-dirs needs to be run first.
Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
Reviewed-by: default avatarPetr Pudlak <pudlak@google.com>
parent 5ac19ed3
...@@ -1924,12 +1924,6 @@ def _UpgradeAfterConfigurationChange(oldversion): ...@@ -1924,12 +1924,6 @@ def _UpgradeAfterConfigurationChange(oldversion):
""" """
returnvalue = 0 returnvalue = 0
ToStdout("Starting daemons everywhere.")
badnodes = _VerifyCommand([pathutils.DAEMON_UTIL, "start-all"])
if badnodes:
ToStderr("Warning: failed to start daemons on %s." % (", ".join(badnodes),))
returnvalue = 1
ToStdout("Ensuring directories everywhere.") ToStdout("Ensuring directories everywhere.")
badnodes = _VerifyCommand([pathutils.ENSURE_DIRS]) badnodes = _VerifyCommand([pathutils.ENSURE_DIRS])
if badnodes: if badnodes:
...@@ -1937,6 +1931,12 @@ def _UpgradeAfterConfigurationChange(oldversion): ...@@ -1937,6 +1931,12 @@ def _UpgradeAfterConfigurationChange(oldversion):
(", ".join(badnodes))) (", ".join(badnodes)))
returnvalue = 1 returnvalue = 1
ToStdout("Starting daemons everywhere.")
badnodes = _VerifyCommand([pathutils.DAEMON_UTIL, "start-all"])
if badnodes:
ToStderr("Warning: failed to start daemons on %s." % (", ".join(badnodes),))
returnvalue = 1
ToStdout("Redistributing the configuration.") ToStdout("Redistributing the configuration.")
if not _RunCommandAndReport(["gnt-cluster", "redist-conf", "--yes-do-it"]): if not _RunCommandAndReport(["gnt-cluster", "redist-conf", "--yes-do-it"]):
returnvalue = 1 returnvalue = 1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment