Skip to content
This repository has been archived by the owner on May 6, 2022. It is now read-only.

Fix the comments of the Name & Fix the msg of the etcd checker. #2601

Merged
merged 1 commit into from
Apr 10, 2019
Merged
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
6 changes: 4 additions & 2 deletions cmd/apiserver/app/server/run_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func runEtcdServer(opts *ServiceCatalogServerOptions, stopCh <-chan struct{}) er
return err
}

// // Set the finalized generic and storage configs
// Set the finalized generic and storage configs
config := apiserver.NewEtcdConfig(genericConfig, 0 /* deleteCollectionWorkers */, storageFactory)

// Fill in defaults not already set in the config
Expand Down Expand Up @@ -126,10 +126,12 @@ type checkEtcdConnectable struct {
ServerList []string
}

// Name is the name of a checkEtcdConnectable.
func (c checkEtcdConnectable) Name() string {
return "etcd"
}

// Check used to check if the etcd server is reachable
func (c checkEtcdConnectable) Check(_ *http.Request) error {
klog.Info("etcd checker called")
serverReachable, err := preflight.EtcdConnection{ServerList: c.ServerList}.CheckEtcdServers()
Expand All @@ -139,7 +141,7 @@ func (c checkEtcdConnectable) Check(_ *http.Request) error {
return err
}
if !serverReachable {
msg := "etcd failed to reach any server"
msg := "etcd checker failed to reach any etcd server"
klog.Error(msg)
return fmt.Errorf(msg)
}
Expand Down