jianz / k8s-reset-terminating-pv

Reset persistent volume status from terminating back to bound.
MIT License
103 stars 27 forks source link

Error when running "resetpv" #1

Open phonic69 opened 3 years ago

phonic69 commented 3 years ago

Hi,

I have downloaded the latest "resetpv" file available (the one with size "24.7 MB") but when trying to execute it, I get the following error:

eccd@director-0-ccd-redes:~/k8s-reset-terminating-pv> ./resetpv -bash: ./resetpv: cannot execute binary file: Exec format error

I'm executing it on the director node of a kubernetes cluster: eccd@director-0-ccd-redes:~/k8s-reset-terminating-pv> uname -a Linux director-0-ccd-redes 4.12.14-197.29-default #1 SMP Fri Dec 6 12:08:50 UTC 2019 (ca25711) x86_64 x86_64 x86_64 GNU/Linux

eccd@director-0-ccd-redes:~/k8s-reset-terminating-pv> file resetpv resetpv: Mach-O 64-bit x86_64 executable

Do you know how to fix this error? Thanks a lot in advance.

jianz commented 3 years ago

@phonic69 Thanks for trying the tool.

The binary you downloaded from the release page is built for macOS, that why you see the "Exec format error" on your linux server.

I have build the tool for linux and uploaded it on the release page, please download resetpv-linux-x86-64 and try again.

Jian

phonic69 commented 3 years ago

@jianz Thanks a lot for providing the executable for linux. Anyway, it seems the etcd is not reachable in our environment since there is no pod related to etcd, just a service:

kubectl get all -A | grep etcd etcd service/etcd ClusterIP None 2379/TCP 75d

kubectl describe svc -n etcd etcd Name: etcd Namespace: etcd Labels: Annotations: kubectl.kubernetes.io/last-applied-configuration: {"apiVersion":"v1","kind":"Service","metadata":{"annotations":{"prometheus.io/scrape":"etcd"},"name":"etcd","namespace":"etcd"},"spec":{"c... prometheus.io/scrape: etcd Selector: Type: ClusterIP IP: None Port: api 2379/TCP TargetPort: 2379/TCP Endpoints: 10.0.10.17:2379,10.0.10.2:2379,10.0.10.6:2379 Session Affinity: None Events:

Does it make any sense to you?

Thanks a lot for the support.

jianz commented 3 years ago

@phonic69 From the description you showed above, the etcd service is a headless service without any selector. So I guess your actual etcd server is outside of the Kubernetes cluster.

Since you find the Endpoints of the etcd service, I suggest you try to locate them by their IP addresses like 10.0.10.17

Good luck.