Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set ETCD_UNSUPPORTED_ARCH on arm64 #400

Merged
merged 1 commit into from Jul 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions pkg/cmd/render/env.go
Expand Up @@ -2,7 +2,6 @@ package render

import (
"fmt"
"strings"

"github.com/openshift/cluster-etcd-operator/pkg/etcdenvvar"
)
Expand Down Expand Up @@ -82,7 +81,10 @@ func getElectionTimeout(platform, arch string) (map[string]string, error) {
}

func getUnsupportedArch(platform, arch string) (map[string]string, error) {
if !strings.HasPrefix(arch, "s390") {
switch arch {
case "arm64":
case "s390x":
hexfusion marked this conversation as resolved.
Show resolved Hide resolved
default:
// dont set unless it is defined.
return nil, nil
}
Expand Down
1 change: 1 addition & 0 deletions pkg/cmd/render/env_test.go
Expand Up @@ -12,6 +12,7 @@ func TestEtcdEnv(t *testing.T) {
{"Azure", "amd64", "ETCD_ELECTION_TIMEOUT", "2500"},
{"None", "ppc64le", "ETCD_HEARTBEAT_INTERVAL", "100"},
{"Azure", "s390x", "ETCD_UNSUPPORTED_ARCH", "s390x"},
{"None", "arm64", "ETCD_UNSUPPORTED_ARCH", "arm64"},
} {
env, _ := getEtcdEnv(test.platform, test.arch)
if env[test.wantKey] != test.wantValue {
Expand Down
5 changes: 4 additions & 1 deletion pkg/etcdenvvar/etcd_env.go
Expand Up @@ -261,7 +261,10 @@ func envVarSafe(nodeName string) string {

func getUnsupportedArch(envVarContext envVarContext) (map[string]string, error) {
arch := runtime.GOARCH
if !strings.HasPrefix(arch, "s390") {
switch arch {
case "arm64":
case "s390x":
default:
// dont set unless it is defined.
return nil, nil
}
Expand Down