Merge pull request #43481 from krousey/downgrades

Automatic merge from submit-queue (batch tested with PRs 43481, 43419, 42741, 43480)

Add ETCD env vars for downgrade

This is a partial fix for https://github.com/kubernetes/kubernetes/issues/43470
pull/6/head
Kubernetes Submit Queue 2017-03-21 19:29:23 -07:00 committed by GitHub
commit 5c18475537
1 changed files with 10 additions and 1 deletions

View File

@ -62,8 +62,17 @@ func etcdUpgradeGCE(target_storage, target_version string) error {
}
func masterUpgradeGCE(rawV string) error {
env := os.Environ()
// TODO: Remove these variables when they're no longer needed for downgrades.
if TestContext.EtcdUpgradeVersion != "" && TestContext.EtcdUpgradeStorage != "" {
env = append(env,
"TEST_ETCD_VERSION="+TestContext.EtcdUpgradeVersion,
"STORAGE_BACKEND="+TestContext.EtcdUpgradeStorage,
"TEST_ETCD_IMAGE=3.0.17")
}
v := "v" + rawV
_, _, err := RunCmd(gceUpgradeScript(), "-M", v)
_, _, err := RunCmdEnv(env, gceUpgradeScript(), "-M", v)
return err
}