Merge pull request #2554 from xinfengliu/fix-network-not-found
Fix 'failed to get network during CreateEndpoint'
This commit is contained in:
commit
778162ba19
2 changed files with 3 additions and 2 deletions
|
@ -1181,7 +1181,8 @@ func (n *network) createEndpoint(name string, options ...EndpointOption) (Endpoi
|
|||
ep.locator = n.getController().clusterHostID()
|
||||
ep.network, err = ep.getNetworkFromStore()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to get network during CreateEndpoint: %v", err)
|
||||
logrus.Errorf("failed to get network during CreateEndpoint: %v", err)
|
||||
return nil, err
|
||||
}
|
||||
n = ep.network
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@ func (c *controller) getNetworkFromStore(nid string) (*network, error) {
|
|||
return n, nil
|
||||
}
|
||||
}
|
||||
return nil, fmt.Errorf("network %s not found", nid)
|
||||
return nil, ErrNoSuchNetwork(nid)
|
||||
}
|
||||
|
||||
func (c *controller) getNetworksForScope(scope string) ([]*network, error) {
|
||||
|
|
Loading…
Add table
Reference in a new issue