From 5af6a0b4de938df1b6ce2c8ac65f33152a502ddf Mon Sep 17 00:00:00 2001 From: FengyunPan Date: Wed, 11 Oct 2017 19:20:36 +0800 Subject: [PATCH] The Securty Group name should be unique Currently the service's name is not unique, and the Securty Group name is not unique too. openstack cloud provider will delete the Securty Group of other loadbalancer service when do a deletion. --- pkg/cloudprovider/providers/openstack/openstack_loadbalancer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/cloudprovider/providers/openstack/openstack_loadbalancer.go b/pkg/cloudprovider/providers/openstack/openstack_loadbalancer.go index 82270dee140ad..e2b8026e775be 100644 --- a/pkg/cloudprovider/providers/openstack/openstack_loadbalancer.go +++ b/pkg/cloudprovider/providers/openstack/openstack_loadbalancer.go @@ -372,7 +372,7 @@ func popMember(members []v2pools.Member, addr string, port int) []v2pools.Member } func getSecurityGroupName(clusterName string, service *v1.Service) string { - return fmt.Sprintf("lb-sg-%s-%v", clusterName, service.Name) + return fmt.Sprintf("lb-sg-%s-%s-%s", clusterName, service.Namespace, service.Name) } func getSecurityGroupRules(client *gophercloud.ServiceClient, opts rules.ListOpts) ([]rules.SecGroupRule, error) {