mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
Merge pull request #1231 from brendandburns/service
Fix a bug where we don't return an error.
This commit is contained in:
commit
1fd12778eb
@ -120,10 +120,12 @@ func (s ConfigSourceEtcd) Run() {
|
||||
func (s ConfigSourceEtcd) GetServices() ([]api.Service, []api.Endpoints, error) {
|
||||
response, err := s.client.Get(registryRoot+"/specs", true, false)
|
||||
if err != nil {
|
||||
glog.V(1).Infof("Failed to get the key %s: %v", registryRoot, err)
|
||||
if tools.IsEtcdNotFound(err) {
|
||||
return []api.Service{}, []api.Endpoints{}, err
|
||||
glog.V(1).Infof("Failed to get the key %s: %v", registryRoot, err)
|
||||
} else {
|
||||
glog.Errorf("Failed to contact etcd for key %s: %v", registryRoot, err)
|
||||
}
|
||||
return []api.Service{}, []api.Endpoints{}, err
|
||||
}
|
||||
if response.Node.Dir == true {
|
||||
retServices := make([]api.Service, len(response.Node.Nodes))
|
||||
|
Loading…
Reference in New Issue
Block a user