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

Commit 6d99346

Browse files
committed
Better message if we dont find appropriate BlockStorage API
With latest devstack, v1 and v2 are DEPRECATED and v3 is marked as CURRENT. So we fail to attach the disk, the error message is shown when one does "kubectl describe pod" but the operator has to dig into find the problem. So log a better message if we can't find the appropriate version of the API that we support with an explicit error message that the operator can see how to fix the situation. Note support for v3 block storage API is being added to gophercloud and will take a bit of time before we can support it.
1 parent 4246a22 commit 6d99346

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

pkg/cloudprovider/providers/openstack/openstack.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -657,8 +657,10 @@ func (os *OpenStack) volumeService(forceVersion string) (volumeService, error) {
657657
if autodetectedVersion := doBsApiVersionAutodetect(availableApiVersions); autodetectedVersion != "" {
658658
return os.volumeService(autodetectedVersion)
659659
} else {
660-
// Nothing suitable found, failed autodetection
661-
return nil, errors.New("BS API version autodetection failed.")
660+
// Nothing suitable found, failed autodetection, just exit with appropriate message
661+
err_txt := "BlockStorage API version autodetection failed. " +
662+
"Please set it explicitly in cloud.conf in section [BlockStorage] with key `bs-version`"
663+
return nil, errors.New(err_txt)
662664
}
663665

664666
default:

0 commit comments

Comments
 (0)