Skip to content
This repository was archived by the owner on Mar 22, 2018. It is now read-only.

Commit 68cecc1

Browse files
author
FengyunPan
committed
[OpenStack] Add more detail error message
I get same simple error messages "Unable to initialize cinder client for region: RegionOne" from controller-manager, but I can not find the reason. We should add more detail message "err" into glog.Errorf.
1 parent fc99c7a commit 68cecc1

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

pkg/cloudprovider/providers/openstack/openstack_client.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func (os *OpenStack) NewNetworkV2() (*gophercloud.ServiceClient, error) {
2828
Region: os.region,
2929
})
3030
if err != nil {
31-
glog.Warningf("Failed to find network v2 endpoint: %v", err)
31+
glog.Warningf("Failed to find network v2 endpoint for region %s: %v", os.region, err)
3232
return nil, err
3333
}
3434
return network, nil
@@ -39,7 +39,7 @@ func (os *OpenStack) NewComputeV2() (*gophercloud.ServiceClient, error) {
3939
Region: os.region,
4040
})
4141
if err != nil {
42-
glog.Warningf("Failed to find compute v2 endpoint: %v", err)
42+
glog.Warningf("Failed to find compute v2 endpoint for region %s: %v", os.region, err)
4343
return nil, err
4444
}
4545
return compute, nil
@@ -50,7 +50,7 @@ func (os *OpenStack) NewBlockStorageV1() (*gophercloud.ServiceClient, error) {
5050
Region: os.region,
5151
})
5252
if err != nil {
53-
glog.Errorf("Unable to initialize cinder v1 client for region: %s", os.region)
53+
glog.Errorf("Unable to initialize cinder v1 client for region %s: %v", os.region, err)
5454
return nil, err
5555
}
5656
return storage, nil
@@ -61,7 +61,7 @@ func (os *OpenStack) NewBlockStorageV2() (*gophercloud.ServiceClient, error) {
6161
Region: os.region,
6262
})
6363
if err != nil {
64-
glog.Errorf("Unable to initialize cinder v2 client for region: %s", os.region)
64+
glog.Errorf("Unable to initialize cinder v2 client for region %s: %v", os.region, err)
6565
return nil, err
6666
}
6767
return storage, nil

0 commit comments

Comments
 (0)