You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2021/09/16 06:12:27 UTC

[GitHub] [cloudstack] sureshanaparti opened a new pull request #5458: New API endpoint to update pod management network IP range

sureshanaparti opened a new pull request #5458:
URL: https://github.com/apache/cloudstack/pull/5458


   ### Description
   
   This PR introduces a new API endpoint to update pod management network IP range.
   
   Currently, pod management IP range can only be expanded under the same subnet. Editing the current pod IP management range is a challenge, especially as the list of IP ranges is greater than one. The purpose of this feature is to allow ADMINS to be able to update size of IP range of management pod, upwards or downwards.
   
   This PR extends from #4010
   
   - Updatepodmanagementnetworkiprange will update already existing IP ranges. Will not create a new IP range.
   - Will increase/reduce available IPs within the range.
   - PodID/Currentstartip/CurrentendIp are mandatory fields. Newstartip and Newendip are optional fields and one of them should be specified. When anyone is left blank, Newstartip will be set to Currentstartip and Newendip will be set to Currentendip.
   - API only available to root admin and does not have any sensitive information passed.
   - Will output success response -true/false
   - Does not alter structure of DB, but will update contents.
   
   
   **When to use**
   
   - Reducing size of existing IP range
   - Increasing size of existing IP range
   
   **How to use**
   
   Run `list pods` command to see existing IP ranges
   ```
   > list pods
   {
     "count": 1,
     "pod": [
       {
         "allocationstate": "Enabled",
         "endip": [
           "172.16.15.210",
           "172.16.15.204"
         ],
         "forsystemvms": [
           "0",
           "0"
         ],
         "gateway": "172.16.15.1",
         "id": "1407da22-a131-4dbd-86a3-45210a26897e",
         "name": "POD0",
         "netmask": "255.255.255.0",
         "startip": [
           "172.16.15.205",
           "172.16.15.2"
         ],
         "vlanid": [
           "vlan://untagged",
           "vlan://untagged"
         ],
         "zoneid": "3ab731d6-efd5-418c-ab2b-cacbfc4b88f0",
         "zonename": "Sandbox-simulator"
       }
     ]
   }
   ```
   2. Update the IP range you'd like to change. In our case, we want to increase the range `172.16.15.205-172.16.15.210` to `172.16.15.205-172.16.15.215`. Use the command `update podmanagementnetworkiprange`
   
   ```
   > update podmanagementnetworkiprange podid=1407da22-a131-4dbd-86a3-45210a26897e currentstartip=172.16.15.205 currentendip=172.16.15.210 newendip=172.16.15.215
   {
     "success": true
   }
   ```
   To reduce size of range to `172.16.15.205-172.16.15.207`
   ```
   > update podmanagementnetworkiprange podid=1407da22-a131-4dbd-86a3-45210a26897e currentstartip=172.16.15.205 currentendip=172.16.15.215 newendip=172.16.15.207
   {
     "success": true
   }
   ```
   Confirm by running `list pods` again
   ```
   > list pods 
   {
     "count": 1,
     "pod": [
       {
         "allocationstate": "Enabled",
         "endip": [
           "172.16.15.207",
           "172.16.15.204"
         ],
         "forsystemvms": [
           "0",
           "0"
         ],
         "gateway": "172.16.15.1",
         "id": "1407da22-a131-4dbd-86a3-45210a26897e",
         "name": "POD0",
         "netmask": "255.255.255.0",
         "startip": [
           "172.16.15.205",
           "172.16.15.2"
         ],
         "vlanid": [
           "vlan://untagged",
           "vlan://untagged"
         ],
         "zoneid": "3ab731d6-efd5-418c-ab2b-cacbfc4b88f0",
         "zonename": "Sandbox-simulator"
       }
     ]
   }
   ```
   
   <!--- Describe your changes in DETAIL - And how has behaviour functionally changed. -->
   
   <!-- For new features, provide link to FS, dev ML discussion etc. -->
   <!-- In case of bug fix, the expected and actual behaviours, steps to reproduce. -->
   
   <!-- When "Fixes: #<id>" is specified, the issue/PR will automatically be closed when this PR gets merged -->
   <!-- For addressing multiple issues/PRs, use multiple "Fixes: #<id>" -->
   <!-- Fixes: # -->
   
   <!--- ********************************************************************************* -->
   <!--- NOTE: AUTOMATATION USES THE DESCRIPTIONS TO SET LABELS AND PRODUCE DOCUMENTATION. -->
   <!--- PLEASE PUT AN 'X' in only **ONE** box -->
   <!--- ********************************************************************************* -->
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing functionality to change)
   - [x] 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)
   
   ### Feature/Enhancement Scale or Bug Severity
   
   #### Feature/Enhancement Scale
   
   - [ ] Major
   - [ ] Minor
   
   #### Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [ ] Major
   - [ ] Minor
   - [ ] Trivial
   
   
   ### Screenshots (if appropriate):
   
   
   ### How Has This Been Tested?
   <!-- Please describe in detail how you tested your changes. -->
   <!-- Include details of your testing environment, and the tests you ran to -->
   <!-- see how your change affects other areas of the code, etc. -->
   
   **Manual Tests** (with PR# 4010)
   - Test for invalid parameters for Currentstartip/Currentendip/Newstartip/Newendip
   - Test for invalid current IP range
   - Test for overlapping IP range extensions
   - Test for non-existent IP range
   - Test for Newstartip>Newendip
   - Test for duplicate IP range
   - Test for invalid Pod ID
   - Test to reduce existing IP range to not include already allocated IPs
   
   <!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md) document -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #5458: New API endpoint to update pod management network IP range

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5458:
URL: https://github.com/apache/cloudstack/pull/5458#issuecomment-921528255


   <b>Trillian test result (tid-2097)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 34689 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5458-t2097-kvm-centos7.zip
   Smoke tests completed. 89 look OK, 0 have errors
   Only failed tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] sureshanaparti commented on pull request #5458: New API endpoint to update pod management network IP range

Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on pull request #5458:
URL: https://github.com/apache/cloudstack/pull/5458#issuecomment-921204365


   @blueorangutan test


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] sureshanaparti commented on pull request #5458: New API endpoint to update pod management network IP range

Posted by GitBox <gi...@apache.org>.
sureshanaparti commented on pull request #5458:
URL: https://github.com/apache/cloudstack/pull/5458#issuecomment-920610888


   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #5458: New API endpoint to update pod management network IP range

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5458:
URL: https://github.com/apache/cloudstack/pull/5458#issuecomment-920623281


   Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 1286


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] nvazquez merged pull request #5458: New API endpoint to update pod management network IP range

Posted by GitBox <gi...@apache.org>.
nvazquez merged pull request #5458:
URL: https://github.com/apache/cloudstack/pull/5458


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #5458: New API endpoint to update pod management network IP range

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5458:
URL: https://github.com/apache/cloudstack/pull/5458#issuecomment-920611024


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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #5458: New API endpoint to update pod management network IP range

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5458:
URL: https://github.com/apache/cloudstack/pull/5458#issuecomment-921204644


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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org