Skip to content

Commit

Permalink
Merge pull request #13769 from ahrtr/fix_typo_downgrade
Browse files Browse the repository at this point in the history
Fix some typos related to downgrade
  • Loading branch information
serathius authored Mar 9, 2022
2 parents 85d4567 + 1ae5aa5 commit b8be237
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions etcdctl/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1094,8 +1094,8 @@ After initial bootstrap, cluster members agree on the cluster version. Every 5 s
New members will refuse joining cluster with cluster version newer than theirs, thus preventing cluster from downgrading.
Downgrade commands allow cluster administrator to force cluster version to be lowered to previous minor version, thus allowing to downgrade the cluster.

Downgrade should be is executed in stages:
1. Verify that cluster is ready be downgraded by running `etcdctl downgrade validate <TARGET_VERSION>`
Downgrade should be executed in stages:
1. Verify that cluster is ready to be downgraded by running `etcdctl downgrade validate <TARGET_VERSION>`
2. Start the downgrade process by running `etcdctl downgrade enable <TARGET_VERSION>`
3. For each cluster member:
1. Ensure that member is ready for downgrade by confirming that it wrote `The server is ready to downgrade` log.
Expand Down
4 changes: 2 additions & 2 deletions server/etcdserver/version/monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@ func (m *Monitor) UpdateStorageVersionIfNeeded() {

if sv == nil || sv.Major != cv.Major || sv.Minor != cv.Minor {
if sv != nil {
m.lg.Info("storage version differs from storage version.", zap.String("cluster-version", cv.String()), zap.String("storage-version", sv.String()))
m.lg.Info("cluster version differs from storage version.", zap.String("cluster-version", cv.String()), zap.String("storage-version", sv.String()))
}
err := m.s.UpdateStorageVersion(semver.Version{Major: cv.Major, Minor: cv.Minor})
if err != nil {
m.lg.Error("failed update storage version", zap.String("cluster-version", cv.String()), zap.Error(err))
m.lg.Error("failed to update storage version", zap.String("cluster-version", cv.String()), zap.Error(err))
return
}
d := m.s.GetDowngradeInfo()
Expand Down
2 changes: 1 addition & 1 deletion server/storage/schema/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func UnsafeMigrate(lg *zap.Logger, tx backend.BatchTx, w WALVersion, target semv
}
plan, err := newPlan(lg, current, target)
if err != nil {
return fmt.Errorf("cannot create migration plan: %w", err)
return fmt.Errorf("cannot create migration plan: %v", err)
}
if target.LessThan(current) {
minVersion := w.MinimalEtcdVersion()
Expand Down

0 comments on commit b8be237

Please sign in to comment.