kubernetes-retired / etcdadm

[EOL] etcdadm is a command-line tool for operating an etcd cluster
Apache License 2.0
765 stars 135 forks source link

Add initial support for Hetzner Cloud #309

Closed hakman closed 2 years ago

hakman commented 2 years ago

This is an initial attempt to make etcd-manager work with Hetzner Cloud.

Sample log:

volumes.go:56] Found ID of the running server: 19820911
volumes.go:73] Found name of the running server: "master-fsn1.masters.test1.k8s.local"
volumes.go:73] Found location of the running server: "fsn1"
volumes.go:78] Found first private net IP of the running server: "10.10.0.3"
main.go:317] Mounting available etcd volumes matching tags [KubernetesCluster=test1.k8s.local]; nameTag=etcdCluster-main
volumes.go:105] Finding attachable etcd volumes
volumes.go:129] Found attachable volume etcd-fsn1.test1.k8s.local(18745085) with status "available"
mounter.go:304] Trying to mount master volume: "18745085"
volumes.go:195] Attaching volume etcd-fsn1.test1.k8s.local(18745085) to the running server
volumes.go:189] Attached volume etcd-fsn1.test1.k8s.local(18745085) to the running server
mounter.go:318] Currently attached volumes: [0xc000445c80]
mounter.go:72] Master volume "18745085" is attached at "/dev/disk/by-id/scsi-0HC_Volume_18745085"
mounter.go:86] Doing safe-format-and-mount of /dev/disk/by-id/scsi-0HC_Volume_18745085 to /mnt/hcloud-18745085
volumes.go:156] Finding mounted volume "/dev/disk/by-id/scsi-0HC_Volume_18745085"
volumes.go:159] Found mounted volume "/dev/disk/by-id/scsi-0HC_Volume_18745085"
mounter.go:125] Found volume "18745085" mounted at device "/dev/disk/by-id/scsi-0HC_Volume_18745085"
mounter.go:171] Creating mount directory "/rootfs/mnt/hcloud-18745085"
mounter.go:176] Mounting device "/dev/disk/by-id/scsi-0HC_Volume_18745085" on "/mnt/hcloud-18745085"
mounter.go:224] mounting inside container: /rootfs/dev/disk/by-id/scsi-0HC_Volume_18745085 -> /rootfs/mnt/hcloud-18745085
mounter.go:94] mounted master volume "18745085" on /mnt/hcloud-18745085
volumes.go:215] Found first private IP of the running server: 10.10.0.3
main.go:332] discovered IP address: 10.10.0.3
main.go:337] Setting data dir to /rootfs/mnt/hcloud-18745085
server.go:87] starting GRPC server using TLS, ServerName="etcd-manager-server-vol-18745085"
main.go:485] peerClientIPs: [10.10.0.3]
etcdserver.go:560] starting etcd with state cluster:<cluster_token:"OTBR-ltoYKXszZC0Nf32yQ" nodes:<name:"vol-18745085" peer_urls:"https://vol-18745085.internal.test1.k8s.local:2380" client_urls:"https://vol-18745085.internal.test1.k8s.local:4001" quarantined_client_urls:"https://vol-18745085.internal.test1.k8s.local:3994" tls_enabled:true > > etcd_version:"3.5.3"
etcdserver.go:569] starting etcd with datadir /rootfs/mnt/hcloud-18745085/data/OTBR-ltoYKXszZC0Nf32yQ
server.go:105] GRPC server listening on "10.10.0.3:3996"
discovery.go:35] Discovering volumes for "etcdCluster-main"
discovery.go:59] Discovered volume etcd-fsn1.test1.k8s.local(18745085) attached to server master-fsn1.masters.test1.k8s.local(19820911)
peers.go:116] found new candidate peer from discovery: vol-18745085 [{10.10.0.3 0}]
peers.go:296] connecting to peer "vol-18745085" with TLS policy, servername="etcd-manager-server-vol-18745085"
hosts.go:84] hosts update: primary=map[], fallbacks=map[vol-18745085.internal.test1.k8s.local:[10.10.0.3]], final=map[10.10.0.3:[vol-18745085.internal.test1.k8s.local]]

/cc @justinsb @olemarkus

k8s-ci-robot commented 2 years ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hakman

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[etcd-manager/OWNERS](https://github.com/kubernetes-sigs/etcdadm/blob/master/etcd-manager/OWNERS)~~ [hakman] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment