kubesphere / kubesphere/kubekey

etcd health check failed on arm64

Open
#2,147 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
2.9k
Forks
834
Avg merge
1d 5h
Merged PRs (30d)
31

Description

### What is version of KubeKey has the issue?

kk version: &version.Info{Major:"3", Minor:"0", GitVersion:"v3.0.13-dirty", GitCommit:"ac75d3ef3c22e6a9d999dcea201234d6651b3e72", GitTreeState:"dirty", BuildDate:"2023-11-07T08:43:42Z", GoVersion:"go1.19.2", Compiler:"gc", Platform:"linux/arm64"}

### What is your os environment?

macos sonoma 14.2.1 (23C71)

### KubeKey config file

```yaml
etcdctl
NAME:
etcdctl - A simple command line client for etcd3.

USAGE:
etcdctl [flags]

VERSION:
3.4.13

API VERSION:
3.4

COMMANDS:
alarm disarm Disarms all alarms
alarm list Lists all alarms
auth disable Disables authentication
auth enable Enables authentication
check datascale Check the memory usage of holding data for different workloads on a given server endpoint.
check perf Check the performance of the etcd cluster
compaction Compacts the event history in etcd
defrag Defragments the storage of the etcd members with given endpoints
del Removes the specified key or range of keys [key, range_end)
elect Observes and participates in leader election
endpoint hashkv Prints the KV history hash for each endpoint in --endpoints
endpoint health Checks the healthiness of endpoints specified in `--endpoints` flag
endpoint status Prints out the status of endpoints specified in `--endpoints` flag
get Gets the key or a range of keys
help Help about any command
lease grant Creates leases
lease keep-alive Keeps leases alive (renew)
lease list List all active leases
lease revoke Revokes leases
lease timetolive Get lease information
lock Acquires a named lock
make-mirror Makes a mirror at the destination etcd cluster
member add Adds a member into the cluster
member list Lists all members in the cluster
```

### A clear and concise description of what happend.

There is a problem in installing kubekey on arm64 platform.

### Relevant log output

```shell
17:06:56 CST success: [LocalHost]
17:06:56 CST [CertsModule] Synchronize certs file
17:06:58 CST success: [k8s-dev-m0]
17:06:58 CST [CertsModule] Synchronize certs file to master
17:06:58 CST skipped: [k8s-dev-m0]
17:06:58 CST [InstallETCDBinaryModule] Install etcd using binary
17:06:59 CST success: [k8s-dev-m0]
17:06:59 CST [InstallETCDBinaryModule] Generate etcd service
17:06:59 CST success: [k8s-dev-m0]
17:06:59 CST [InstallETCDBinaryModule] Generate access address
17:06:59 CST success: [k8s-dev-m0]
17:06:59 CST [ETCDConfigureModule] Health check on exist etcd
17:06:59 CST message: [k8s-dev-m0]
etcd health check failed: Failed to exec command: sudo -E /bin/bash -c "export ETCDCTL_API=2;export ETCDCTL_CERT_FILE='/etc/ssl/etcd/ssl/admin-k8s-dev-m0.pem';export ETCDCTL_KEY_FILE='/etc/ssl/etcd/ssl/admin-k8s-dev-m0-key.pem';export ETCDCTL_CA_FILE='/etc/ssl/etcd/ssl/ca.pem';/usr/local/bin/etcdctl --endpoints=https://10.211.55.7:2379 cluster-health | grep -q 'cluster is healthy'"
Error: client: etcd cluster is unavailable or misconfigured; error #0: dial tcp 10.211.55.7:2379: connect: connection refused

error #0: dial tcp 10.211.55.7:2379: connect: connection refused: Process exited with status 1
17:06:59 CST retry: [k8s-dev-m0]
17:07:05 CST message: [k8s-dev-m0]
etcd health check failed: Failed to exec command: sudo -E /bin/bash -c "export ETCDCTL_API=2;export ETCDCTL_CERT_FILE='/etc/ssl/etcd/ssl/admin-k8s-dev-m0.pem';export ETCDCTL_KEY_FILE='/etc/ssl/etcd/ssl/admin-k8s-dev-m0-key.pem';export ETCDCTL_CA_FILE='/etc/ssl/etcd/ssl/ca.pem';/usr/local/bin/etcdctl --endpoints=https://10.211.55.7:2379 cluster-health | grep -q 'cluster is healthy'"
Error: client: etcd cluster is unavailable or misconfigured; error #0: dial tcp 10.211.55.7:2379: connect: connection refused
```

### Additional information

dnf info etcd
Last metadata expiration check: 4:04:22 ago on 2024年02月27日 星期二 17时03分45秒.
Installed Packages
Name : etcd
Version : 3.4.14
Release : 5.oe2309
Architecture : aarch64
Size : 40 M
Source : etcd-3.4.14-5.oe2309.src.rpm
Repository : @System
From repo : openEuler-everything
Summary : Distributed reliable key-value store for the most critical data of a distributed system
URL : https://github.com/etcd-io/etcd
License : ASL 2.0 and MIT
Description :
: Distributed reliable key-value store for the most critical data of a distributed
: system.
:
: %gopkg

---------------------

etcdctl
NAME:
etcdctl - A simple command line client for etcd3.

USAGE:
etcdctl [flags]

VERSION:
3.4.13

API VERSION:
3.4

COMMANDS:
alarm disarm Disarms all alarms
alarm list Lists all alarms
auth disable Disables authentication
auth enable Enables authentication
check datascale Check the memory usage of holding data for different workloads on a given server endpoint.
check perf Check the performance of the etcd cluster
compaction Compacts the event history in etcd
defrag Defragments the storage of the etcd members with given endpoints
del Removes the specified key or range of keys [key, range_end)
elect Observes and participates in leader election
endpoint hashkv Prints the KV history hash for each endpoint in --endpoints
endpoint health Checks the healthiness of endpoints specified in `--endpoints` flag
endpoint status Prints out the status of endpoints specified in `--endpoints` flag
get Gets the key or a range of keys
help Help about any command
lease grant Creates leases
lease keep-alive Keeps leases alive (renew)
lease list List all active leases
lease revoke Revokes leases
lease timetolive Get lease information
lock Acquires a named lock
make-mirror Makes a mirror at the destination etcd cluster
member add Adds a member into the cluster
member list Lists all members in the cluster

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the arm64 installation failure and inspect the InstallETCDBinaryModule and ETCDConfigureModule paths that generate and run the etcd health check. Compare the installed etcd/etcdctl versions and the endpoint-health command shown in the log; done means the installation completes successfully and the health check passes on arm64.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
distributed-systems, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.