Merge pull request #36249 from sjenning/fix-lbaas-openstack-init

Automatic merge from submit-queue

Fix LBaaS version detection in openstack cloudprovider

`lbversion` is the local variable used for version detection when `os.lbOpts.LBVersion` is not specified.

xref https://bugzilla.redhat.com/show_bug.cgi?id=1391837

@ncdc @derekwaynecarr @anguslees
This commit is contained in:
Kubernetes Submit Queue 2016-11-06 19:36:03 -08:00 committed by GitHub
commit f37039b2f5

View File

@ -403,7 +403,7 @@ func (os *OpenStack) LoadBalancer() (cloudprovider.LoadBalancer, bool) {
glog.V(1).Info("Claiming to support LoadBalancer")
if os.lbOpts.LBVersion == "v2" {
if lbversion == "v2" {
return &LbaasV2{LoadBalancer{network, compute, os.lbOpts}}, true
} else if lbversion == "v1" {
return &LbaasV1{LoadBalancer{network, compute, os.lbOpts}}, true