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

admin: skip CSDS on failure instead of aborting #4486

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 5 additions & 3 deletions xds/xds.go
Expand Up @@ -33,8 +33,6 @@
package xds

import (
"fmt"

v3statusgrpc "github.com/envoyproxy/go-control-plane/envoy/service/status/v3"
"google.golang.org/grpc"
internaladmin "google.golang.org/grpc/internal/admin"
Expand Down Expand Up @@ -70,7 +68,11 @@ func init() {

csdss, err := csds.NewClientStatusDiscoveryServer()
if err != nil {
return nil, fmt.Errorf("failed to create csds server: %v", err)
// This can happen if the xds package is imported (by a dependency)
// but is not used. This will fail due to missing xDS bootstrap
// config. But we don't want to fail the top level admin package.
logger.Warningf("failed to create csds server, CSDS will not be registered: %v")
return nil, nil
}
v3statusgrpc.RegisterClientStatusDiscoveryServiceServer(grpcServer, csdss)
return csdss.Close, nil
Expand Down