Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automated cherry pick of #16737: fix bootstrap already exists handling #16738

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions pkg/bootstrap/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ func (v *ChainVerifier) VerifyToken(ctx context.Context, rawRequest *http.Reques
if err == ErrNotThisVerifier {
continue
}
if err == ErrAlreadyExists {
return nil, ErrAlreadyExists
}
klog.Infof("failed to verify token: %v", err)
}
return nil, fmt.Errorf("unable to verify token")
Expand Down
6 changes: 6 additions & 0 deletions pkg/kopscontrollerclient/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,9 @@ func (b *Client) Query(ctx context.Context, req any, resp any) error {

return json.NewDecoder(response.Body).Decode(resp)
}

func (b *Client) Close() {
if b.httpClient != nil {
b.httpClient.CloseIdleConnections()
}
}
1 change: 1 addition & 0 deletions upup/pkg/fi/nodeup/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,7 @@ func getNodeConfigFromServers(ctx context.Context, bootConfig *nodeup.BootConfig
Authenticator: authenticator,
CAs: []byte(bootConfig.ConfigServer.CACertificates),
}
defer client.Close()

var merr error
for _, server := range bootConfig.ConfigServer.Servers {
Expand Down
Loading