From 14d2f08b0fd42d60b2ac7be147ccb50bf94051c2 Mon Sep 17 00:00:00 2001 From: Nick Cabatoff Date: Fri, 10 Dec 2021 09:59:52 -0500 Subject: [PATCH] Remove another use gopsutil/host. (#13390) --- vault/request_forwarding_rpc.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vault/request_forwarding_rpc.go b/vault/request_forwarding_rpc.go index 2cb04cb91955..1c9a5deadd95 100644 --- a/vault/request_forwarding_rpc.go +++ b/vault/request_forwarding_rpc.go @@ -3,6 +3,7 @@ package vault import ( "context" "net/http" + "os" "runtime" "sync/atomic" "time" @@ -12,7 +13,6 @@ import ( "github.com/hashicorp/vault/helper/forwarding" "github.com/hashicorp/vault/physical/raft" "github.com/hashicorp/vault/vault/replication" - "github.com/shirou/gopsutil/host" ) type forwardedRequestRPCServer struct { @@ -117,10 +117,10 @@ type forwardingClient struct { func (c *forwardingClient) startHeartbeat() { go func() { clusterAddr := c.core.ClusterAddr() - h, _ := host.Info() + hostname, _ := os.Hostname() ni := NodeInformation{ ApiAddr: c.core.redirectAddr, - Hostname: h.Hostname, + Hostname: hostname, Mode: "standby", } tick := func() {