diff --git a/lib/update/cluster/builder_test.go b/lib/update/cluster/builder_test.go index 9d7a0c0e16..d8b427595e 100644 --- a/lib/update/cluster/builder_test.go +++ b/lib/update/cluster/builder_test.go @@ -171,7 +171,7 @@ func (s *PlanSuite) TestPlanWithRuntimeAppsUpdate(c *check.C) { params.coreDNS("/bootstrap"), params.masters(leadMaster, updates[0:1], gravityPackage, "id", "/coredns"), params.nodes(updates[2:], leadMaster.Server, gravityPackage, "id", "/masters"), - params.etcd(leadMaster.Server, updates[0:1], updates[2:], *params.targetStep.etcd), + params.etcd(leadMaster.Server, updates[0:1], *params.targetStep.etcd), params.config("/etcd"), params.runtime(runtimeUpdates, "/config"), params.migration("/runtime"), @@ -393,7 +393,6 @@ func (s *PlanSuite) TestPlanWithIntermediateRuntimeUpdate(c *check.C) { params.nodes(intermediateNodes, intermediateLeadMaster.Server, intermediateGravityPackage, "id2", "/masters"), params.etcd(intermediateLeadMaster.Server, intermediateOtherMasters, - intermediateNodes, *params.steps[0].etcd), params.config("/etcd"), params.runtime(intermediateRuntimeUpdates, "/config"), @@ -403,7 +402,7 @@ func (s *PlanSuite) TestPlanWithIntermediateRuntimeUpdate(c *check.C) { params.coreDNS("/bootstrap"), params.masters(leadMaster, otherMasters, gravityPackage, "id", "/coredns"), params.nodes(nodes, leadMaster.Server, gravityPackage, "id", "/masters"), - params.etcd(leadMaster.Server, otherMasters, nodes, *params.targetStep.etcd), + params.etcd(leadMaster.Server, otherMasters, *params.targetStep.etcd), params.config("/etcd"), params.runtime(runtimeUpdates, "/config"), ), @@ -1126,7 +1125,7 @@ func (r *params) bootstrapNodeVersioned(server storage.UpdateServer, version str } } -func (r params) etcd(leadMaster storage.Server, otherMasters, nodes []storage.UpdateServer, etcd etcdVersion) storage.OperationPhase { +func (r params) etcd(leadMaster storage.Server, otherMasters []storage.UpdateServer, etcd etcdVersion) storage.OperationPhase { return storage.OperationPhase{ ID: "/etcd", Description: fmt.Sprintf("Upgrade etcd %v to %v", etcd.installed, etcd.update), @@ -1147,7 +1146,6 @@ func (r params) etcd(leadMaster storage.Server, otherMasters, nodes []storage.Up r.etcdShutdownNode(leadMaster, true), // FIXME: assumes len(otherMasters) == 1 r.etcdShutdownNode(otherMasters[0].Server, false), - r.etcdShutdownWorkerNode(nodes[0].Server), }, }, { @@ -1157,8 +1155,6 @@ func (r params) etcd(leadMaster storage.Server, otherMasters, nodes []storage.Up r.etcdUpgradeNode(leadMaster), // FIXME: assumes len(otherMasters) == 1 r.etcdUpgradeNode(otherMasters[0].Server), - // upgrade regular nodes - r.etcdUpgradeNode(nodes[0].Server), }, }, { @@ -1177,8 +1173,6 @@ func (r params) etcd(leadMaster storage.Server, otherMasters, nodes []storage.Up r.etcdRestartLeaderNode(leadMaster), // FIXME: assumes len(otherMasters) == 1 r.etcdRestartNode(otherMasters[0].Server), - // upgrade regular nodes - r.etcdRestartNode(nodes[0].Server), r.etcdRestartGravity(leadMaster), }, }, diff --git a/lib/update/cluster/steps.go b/lib/update/cluster/steps.go index bafd9956d2..a715218d68 100644 --- a/lib/update/cluster/steps.go +++ b/lib/update/cluster/steps.go @@ -531,8 +531,7 @@ func (r updateStep) addTo(root *builder.Phase, masters, nodes []storage.UpdateSe root.AddParallel(r.etcdPhase( leadMaster.Server, serversToStorage(masters[1:]...), - serversToStorage(nodes...)), - ) + )) } // The "config" phase pulls new teleport master config packages used // by gravity-sites on master nodes: it needs to run *after* system @@ -584,7 +583,7 @@ func (r updateStep) configPhase(nodes []storage.Server) *builder.Phase { return root } -func (r updateStep) etcdPhase(leadMaster storage.Server, otherMasters []storage.Server, workers []storage.Server) *builder.Phase { +func (r updateStep) etcdPhase(leadMaster storage.Server, otherMasters []storage.Server) *builder.Phase { description := fmt.Sprintf("Upgrade etcd %v to %v", r.etcd.installed, r.etcd.update) if r.etcd.installed == "" { description = fmt.Sprintf("Upgrade etcd to %v", r.etcd.update) @@ -623,10 +622,6 @@ func (r updateStep) etcdPhase(leadMaster storage.Server, otherMasters []storage. p := r.etcdShutdownNodePhase(server, false) shutdownEtcd.AddWithDependency(builder.DependencyForServer(backupEtcd, server), p) } - for _, server := range workers { - p := r.etcdShutdownNodePhase(server, false) - shutdownEtcd.AddParallel(p) - } root.AddParallel(shutdownEtcd) @@ -645,10 +640,6 @@ func (r updateStep) etcdPhase(leadMaster storage.Server, otherMasters []storage. p := r.etcdUpgradePhase(server) upgradeServers.AddWithDependency(builder.DependencyForServer(shutdownEtcd, server), p) } - for _, server := range workers { - p := r.etcdUpgradePhase(server) - upgradeServers.AddWithDependency(builder.DependencyForServer(shutdownEtcd, server), p) - } root.AddParallel(upgradeServers) // Restore kubernetes data @@ -676,10 +667,6 @@ func (r updateStep) etcdPhase(leadMaster storage.Server, otherMasters []storage. p := r.etcdRestartPhase(server) restartMasters.AddWithDependency(builder.DependencyForServer(upgradeServers, server), p) } - for _, server := range workers { - p := r.etcdRestartPhase(server) - restartMasters.AddWithDependency(builder.DependencyForServer(upgradeServers, server), p) - } // also restart gravity-site, so that elections get unbroken restartMasters.AddParallelRaw(storage.OperationPhase{