From 117f71325f9bbc4a490a5c7002ad66ffa501ad2e Mon Sep 17 00:00:00 2001 From: Tim Gross Date: Thu, 1 Dec 2022 10:44:33 -0500 Subject: [PATCH] fix enterprise endpoint registration (#15446) In #15430 we refactored the RPC endpoint configuration to make adding the RPC context easier. But when implementing the change on the Enterprise side, I discovered that the registration of enterprise endpoints was being done incorrectly -- this doesn't show up on OSS because the registration is always a no-op here. --- nomad/server.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nomad/server.go b/nomad/server.go index cea051601..bf897080a 100644 --- a/nomad/server.go +++ b/nomad/server.go @@ -1282,7 +1282,8 @@ func (s *Server) setupRpcServer(server *rpc.Server, ctx *RPCContext) error { _ = server.Register(NewSystemEndpoint(s, ctx)) _ = server.Register(NewVariablesEndpoint(s, ctx, s.encrypter)) - _ = server.Register(NewEnterpriseEndpoints(s, ctx)) + ent := NewEnterpriseEndpoints(s, ctx) + ent.Register(server) return nil }