Skip to content

Commit

Permalink
Merge pull request kubernetes#51795 from dims/bug-fix-51755
Browse files Browse the repository at this point in the history
Automatic merge from submit-queue (batch tested with PRs 51984, 51351, 51873, 51795, 51634)

Bug Fix - Adding an allowed address pair wipes port security groups

**What this PR does / why we need it**:

Fix for cloud routes enabled instances will have their security groups
removed when the allowed address pair is added to the instance's port.

Upstream bug report is in:
gophercloud/gophercloud#509

Upstream bug fix is in:
gophercloud/gophercloud#510

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

Fixes kubernetes#51755

**Special notes for your reviewer**:

Just an fix in vendored code. minimal changes needed in OpenStack cloud provider

**Release note**:

```release-note
NONE
```
  • Loading branch information
Kubernetes Submit Queue authored Sep 6, 2017
2 parents b6a0bb1 + 74a3d89 commit 9a8cb43
Show file tree
Hide file tree
Showing 101 changed files with 3,094 additions and 1,022 deletions.
62 changes: 31 additions & 31 deletions Godeps/Godeps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,7 @@ func (lbaas *LbaasV2) EnsureLoadBalancer(clusterName string, apiService *v1.Serv
}

portID := loadbalancer.VipPortID
update_opts := neutronports.UpdateOpts{SecurityGroups: []string{lbSecGroup.ID}}
update_opts := neutronports.UpdateOpts{SecurityGroups: &[]string{lbSecGroup.ID}}
res := neutronports.Update(lbaas.network, portID, update_opts)
if res.Err != nil {
glog.Errorf("Error occured updating port: %s", portID)
Expand Down
4 changes: 2 additions & 2 deletions pkg/cloudprovider/providers/openstack/openstack_routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func updateAllowedAddressPairs(network *gophercloud.ServiceClient, port *neutron
origPairs := port.AllowedAddressPairs // shallow copy

_, err := neutronports.Update(network, port.ID, neutronports.UpdateOpts{
AllowedAddressPairs: newPairs,
AllowedAddressPairs: &newPairs,
}).Extract()
if err != nil {
return nil, err
Expand All @@ -130,7 +130,7 @@ func updateAllowedAddressPairs(network *gophercloud.ServiceClient, port *neutron
unwinder := func() {
glog.V(4).Info("Reverting allowed-address-pairs change to port ", port.ID)
_, err := neutronports.Update(network, port.ID, neutronports.UpdateOpts{
AllowedAddressPairs: origPairs,
AllowedAddressPairs: &origPairs,
}).Extract()
if err != nil {
glog.Warning("Unable to reset allowed-address-pairs during error unwind: ", err)
Expand Down
14 changes: 7 additions & 7 deletions staging/src/k8s.io/apiserver/Godeps/Godeps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions staging/src/k8s.io/client-go/Godeps/Godeps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 33 additions & 6 deletions vendor/github.com/gophercloud/gophercloud/auth_options.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 29 additions & 5 deletions vendor/github.com/gophercloud/gophercloud/doc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9a8cb43

Please sign in to comment.