From dfb5bfd9f117b3cc702b12802ba3a324d6edc0c5 Mon Sep 17 00:00:00 2001 From: Tom Wieczorek Date: Fri, 23 Feb 2024 12:43:53 +0100 Subject: [PATCH] Display etcd member ID in hex This is usually the way etcdctl displays member IDs. This makes it more intuitive and easier to correlate with etcdctl's output. Signed-off-by: Tom Wieczorek (cherry picked from commit a8ce70bd157a6edc9d7525c48125978c2c4980ca) --- cmd/etcd/leave.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/etcd/leave.go b/cmd/etcd/leave.go index cba84d480d0d..9c9381b47bd6 100644 --- a/cmd/etcd/leave.go +++ b/cmd/etcd/leave.go @@ -64,13 +64,13 @@ func etcdLeaveCmd() *cobra.Command { if err := etcdClient.DeleteMember(ctx, peerID); err != nil { logrus. WithField("peerURL", peerURL). - WithField("peerID", peerID). + WithField("peerID", fmt.Sprintf("%x", peerID)). Errorf("Failed to delete node from cluster") return err } logrus. - WithField("peerID", peerID). + WithField("peerID", fmt.Sprintf("%x", peerID)). Info("Successfully deleted") return nil },