mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-22 21:10:22 +00:00
Wrap error if failed to fetch mon
This will help user to check whats the actual error. if the config file is having issue or the clusterid is not valid. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
parent
cba6115e30
commit
2ca575b99d
@ -114,7 +114,7 @@ func getMonsAndClusterID(options map[string]string) (string, string, error) {
|
||||
|
||||
monitors, err := util.Mons(csiConfigFile, clusterID)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("failed to fetch monitor list using clusterID (%s)", clusterID)
|
||||
err = errors.Wrapf(err, "failed to fetch monitor list using clusterID (%s)", clusterID)
|
||||
return "", "", err
|
||||
}
|
||||
|
||||
|
@ -372,7 +372,7 @@ func getMonsAndClusterID(options map[string]string) (monitors, clusterID string,
|
||||
|
||||
if monitors, err = util.Mons(csiConfigFile, clusterID); err != nil {
|
||||
klog.Errorf("failed getting mons (%s)", err)
|
||||
err = fmt.Errorf("failed to fetch monitor list using clusterID (%s)", clusterID)
|
||||
err = errors.Wrapf(err, "failed to fetch monitor list using clusterID (%s)", clusterID)
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user