Skip to content

server: fix public IP association/disassociation to new network#3489

Merged
yadvr merged 2 commits into
apache:masterfrom
shapeblue:fix-public-ip-new-isolated-nw-3321
Jul 14, 2019
Merged

server: fix public IP association/disassociation to new network#3489
yadvr merged 2 commits into
apache:masterfrom
shapeblue:fix-public-ip-new-isolated-nw-3321

Conversation

@shwstppr
Copy link
Copy Markdown
Contributor

Description

Fixes #3321

This changes removes exception throwing while associating an IP address to a new isolated network which is in Allocated state. And it allows disassociating an IP address when it is used for source NAT purpose but network is in allocated state.
Refer, #3321 (comment)

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)

Screenshots (if appropriate):

How Has This Been Tested?

Using cmk,

(localcloud) 🐱 > list networks filter=id,name,state
{
  "count": 1,
  "network": [
    {
      "id": "6838a64f-2f55-4097-af9f-c0cdff805737",
      "name": "Test",
      "state": "Allocated"
    }
  ]
}
(localcloud) 🐱 > associate ipaddress networkid=6838a64f-2f55-4097-af9f-c0cdff805737 
{
  "ipaddress": {
    "account": "admin",
    "allocated": "2019-07-12T15:29:07+0530",
    "associatednetworkid": "6838a64f-2f55-4097-af9f-c0cdff805737",
    "associatednetworkname": "Test",
    "domain": "ROOT",
    "domainid": "5b4d6fd0-a486-11e9-a980-645d8651f45a",
    "fordisplay": true,
    "forvirtualnetwork": true,
    "id": "8e8593dd-b38c-4272-8748-bdd87de5997f",
    "ipaddress": "192.168.2.4",
    "isportable": false,
    "issourcenat": true,
    "isstaticnat": false,
    "issystem": false,
    "networkid": "09e7940c-a642-41c1-9bad-47d9d97fb1d5",
    "physicalnetworkid": "e964a192-5883-4e07-afdb-a30ef5ea69fe",
    "state": "Allocating",
    "tags": [],
    "vlanid": "3421057d-5a58-45cd-b451-e26de05f7417",
    "vlanname": "vlan://50",
    "zoneid": "c9db52ce-6425-4460-aed4-cb00b67b02e8",
    "zonename": "Sandbox-simulator"
  }
}
(localcloud) 🐱 > disassociate ipaddress id=8e8593dd-b38c-4272-8748-bdd87de5997f
{
  "success": true
}

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
@shwstppr
Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@shwstppr a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan
Copy link
Copy Markdown

Packaging result: ✖centos6 ✖centos7 ✖debian. JID-124

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
@shwstppr
Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@shwstppr a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan
Copy link
Copy Markdown

Packaging result: ✔centos6 ✔centos7 ✔debian. JID-125

@shwstppr
Copy link
Copy Markdown
Contributor Author

ping for review @rhtyd @anuragaw @borisroman @nvazquez @DaanHoogland

@yadvr yadvr added this to the 4.13.0.0 milestone Jul 12, 2019
@yadvr
Copy link
Copy Markdown
Member

yadvr commented Jul 12, 2019

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan
Copy link
Copy Markdown

Trillian test result (tid-155)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 31033 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr3489-t155-kvm-centos7.zip
Smoke tests completed. 72 look OK, 0 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File

@yadvr
Copy link
Copy Markdown
Member

yadvr commented Jul 13, 2019

Tests lgtm

@yadvr yadvr closed this Jul 13, 2019
@yadvr yadvr reopened this Jul 13, 2019
@yadvr yadvr requested a review from DaanHoogland July 13, 2019 07:17
@yadvr
Copy link
Copy Markdown
Member

yadvr commented Jul 13, 2019

cc @svanharmelen @DaanHoogland

Copy link
Copy Markdown
Member

@yadvr yadvr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests LGTM

@svanharmelen
Copy link
Copy Markdown

Looks like this should fix the issues we had earlier, so LGTM!

@yadvr yadvr merged commit 98e84e3 into apache:master Jul 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot associate a public IP to a new isolated network (4.12.0.0)

4 participants