瀏覽代碼

Merge pull request #9100 from gyuho/flag

etcdmain: unset ETCD_UNSUPPORTED_ARCH after arch check
Gyuho Lee 8 年之前
父節點
當前提交
2fb9728473
共有 1 個文件被更改,包括 3 次插入 和 0 次删除
  1. 3 0
      etcdmain/etcd.go

+ 3 - 0
etcdmain/etcd.go

@@ -392,6 +392,9 @@ func checkSupportArch() {
 	if runtime.GOARCH == "amd64" || runtime.GOARCH == "ppc64le" {
 		return
 	}
+	// unsupported arch only configured via environment variable
+	// so unset here to not parse through flag
+	defer os.Unsetenv("ETCD_UNSUPPORTED_ARCH")
 	if env, ok := os.LookupEnv("ETCD_UNSUPPORTED_ARCH"); ok && env == runtime.GOARCH {
 		plog.Warningf("running etcd on unsupported architecture %q since ETCD_UNSUPPORTED_ARCH is set", env)
 		return