[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-8506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14557193#comment-14557193
 ] 

ASF GitHub Bot commented on CLOUDSTACK-8506:
--------------------------------------------

GitHub user wilderrodrigues opened a pull request:

    https://github.com/apache/cloudstack/pull/292

    CLOUDSTACK-8506 - Make ACS compliant with the RFC 3021

    Hi @bhaisaab and @DaanHoogland
    
    Could you please have a look at this PR and also at the RFC 3021?
    
    It allows us to have something like this:
    
            // RFC 3021 - 31-Bit Prefixes on IPv4 Point-to-Point Links
            //     GW              Netmask         Stat IP        End IP
            // 192.168.24.0 - 255.255.255.254 - 192.168.24.0 - 192.168.24.1
            // https://tools.ietf.org/html/rfc3021
    
    Email thread: 
https://www.mail-archive.com/[email protected]/msg45035.html
    
    Manual tests:
    
    I created the following public networks successfully:
    
    GW                 - Netmask             - Start IP          - End IP
    192.168.24.0 - 255.255.255.254 - 192.168.24.0 - 192.168.24.1
    192.168.10.0 - 255.255.255.254 - 192.168.10.0 - 192.168.10.1
    
    
![image](https://cloud.githubusercontent.com/assets/5129209/7782894/6510f674-012d-11e5-9476-7fb61cc427a7.png)
    
    Automated tests:
    
    Environments:
    
    Centos7 + KVM + Qemu
    MySQL/MariaDB 5.5.41
    Management Server running CentOS 7
    Component/Smoke tests: https://github.com/apache/cloudstack 
(test/integration/component and smoke)
    Storage type: NFS shared
    Isolation method: VLAN
    Agent: 4.6.0
    
    XenServer 62
    MySQL/MariaDB 5.5.41
    Management Server running CentOS 7
    Component/Smoke tests: https://github.com/apache/cloudstack 
(test/integration/component and smoke)
    Storage type: NFS shared
    Isolation method: VLAN
    
    ================== KVM tests ==================
    
    Test advanced zone virtual router ... === TestName: 
test_advZoneVirtualRouter | Status : SUCCESS ===
    ok
    Test Deploy Virtual Machine ... === TestName: test_deploy_vm | Status : 
SUCCESS ===
    ok
    Test Multiple Deploy Virtual Machine ... === TestName: 
test_deploy_vm_multiple | Status : SUCCESS ===
    ok
    Test Stop Virtual Machine ... === TestName: test_01_stop_vm | Status : 
SUCCESS ===
    ok
    Test Start Virtual Machine ... === TestName: test_02_start_vm | Status : 
SUCCESS ===
    ok
    Test Reboot Virtual Machine ... === TestName: test_03_reboot_vm | Status : 
SUCCESS ===
    ok
    Test destroy Virtual Machine ... === TestName: test_06_destroy_vm | Status 
: SUCCESS ===
    ok
    Test recover Virtual Machine ... === TestName: test_07_restore_vm | Status 
: SUCCESS ===
    ok
    Test migrate VM ... SKIP: At least two hosts should be present in the zone 
for migration
    Test destroy(expunge) Virtual Machine ... === TestName: test_09_expunge_vm 
| Status : SUCCESS ===
    ok
    
    ----------------------------------------------------------------------
    Ran 10 tests in 2672.003s
    
    OK (SKIP=1)
    /tmp//MarvinLogs/test_vm_life_cycle_CBBMBX/results.txt (END)
    
    
    Test router internal advanced zone ... === TestName: 
test_02_router_internal_adv | Status : SUCCESS ===
    ok
    Test restart network ... === TestName: test_03_restart_network_cleanup | 
Status : SUCCESS ===
    ok
    Test router basic setup ... === TestName: test_05_router_basic | Status : 
SUCCESS ===
    ok
    Test router advanced setup ... === TestName: test_06_router_advanced | 
Status : SUCCESS ===
    ok
    Test stop router ... === TestName: test_07_stop_router | Status : SUCCESS 
===
    ok
    Test start router ... === TestName: test_08_start_router | Status : SUCCESS 
===
    ok
    Test reboot router ... === TestName: test_09_reboot_router | Status : 
SUCCESS ===
    ok
    
    ----------------------------------------------------------------------
    Ran 7 tests in 1738.326s
    
    
    OK
    /tmp//MarvinLogs/test_routers_E9IXI8/results.txt (END)
    
    
    Test to create service offering ... === TestName: 
test_01_create_service_offering | Status : SUCCESS ===
    ok
    Test to update existing service offering ... === TestName: 
test_02_edit_service_offering | Status : SUCCESS ===
    ok
    Test to delete service offering ... === TestName: 
test_03_delete_service_offering | Status : SUCCESS ===
    ok
    
    ----------------------------------------------------------------------
    Ran 3 tests in 716.298s
    
    OK
    /tmp//MarvinLogs/test_service_offerings_TGBROS/results.txt (END)
    
    
    Test reset virtual machine on reboot ... === TestName: 
test_01_reset_vm_on_reboot | Status : SUCCESS ===
    ok
    
    ----------------------------------------------------------------------
    Ran 1 test in 842.055s
    
    OK
    /tmp//MarvinLogs/test_reset_vm_on_reboot_P8SXD8/results.txt (END)
    
    
    ================== XenServer 6.2 tests ==================
    
    
    Test advanced zone router services ... === TestName: 
test_01_AdvancedZoneRouterServices | Status : SUCCESS ===
    ok
    Test network garbage collection ... === TestName: 
test_02_NetworkGarbageCollection | Status : SUCCESS ===
    ok
    Test router start on VM deploy ... === TestName: 
test_03_RouterStartOnVmDeploy | Status : SUCCESS ===
    ok
    
    ----------------------------------------------------------------------
    Ran 3 tests in 584.831s
    
    OK
    /tmp//MarvinLogs/test_routers_6N0F4X/results.txt (END)
    
    
    Test reset virtual machine on reboot ... === TestName: 
test_01_reset_vm_on_reboot | Status : SUCCESS ===
    ok
    
    ----------------------------------------------------------------------
    Ran 1 test in 193.477s
    
    OK
    /tmp//MarvinLogs/test_reset_vm_on_reboot_QP4HWN/results.txt (END)
    
    
    Test to create service offering ... === TestName: 
test_01_create_service_offering | Status : SUCCESS ===
    ok
    Test to update existing service offering ... === TestName: 
test_02_edit_service_offering | Status : SUCCESS ===
    ok
    Test to delete service offering ... === TestName: 
test_03_delete_service_offering | Status : SUCCESS ===
    ok
    
    ----------------------------------------------------------------------
    Ran 3 tests in 208.381s
    
    OK
    /tmp//MarvinLogs/test_service_offerings_TN84C8/results.txt (END)
    
    
    Test advanced zone virtual router ... === TestName: 
test_advZoneVirtualRouter | Status : SUCCESS ===
    ok
    Test Deploy Virtual Machine ... === TestName: test_deploy_vm | Status : 
SUCCESS ===
    ok
    Test Multiple Deploy Virtual Machine ... === TestName: 
test_deploy_vm_multiple | Status : SUCCESS ===
    ok
    Test Stop Virtual Machine ... === TestName: test_01_stop_vm | Status : 
SUCCESS ===
    ok
    Test Start Virtual Machine ... === TestName: test_02_start_vm | Status : 
SUCCESS ===
    ok
    Test Reboot Virtual Machine ... === TestName: test_03_reboot_vm | Status : 
SUCCESS ===
    ok
    Test destroy Virtual Machine ... === TestName: test_06_destroy_vm | Status 
: SUCCESS ===
    ok
    Test recover Virtual Machine ... === TestName: test_07_restore_vm | Status 
: SUCCESS ===
    ok
    Test migrate VM ... SKIP: At least two hosts should be present in the zone 
for migration
    Test destroy(expunge) Virtual Machine ... === TestName: test_09_expunge_vm 
| Status : SUCCESS ===
    ok
    
    ----------------------------------------------------------------------
    Ran 10 tests in 836.488s
    
    OK (SKIP=1)
    /tmp//MarvinLogs/test_vm_life_cycle_AI4BME/results.txt (END)

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/schubergphilis/cloudstack 
improvement/RFC_3021_31_Bit_Prefixes

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cloudstack/pull/292.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #292
    
----
commit 14863bbaffda55bf99bb96915f240db1605ce79c
Author: wilderrodrigues <[email protected]>
Date:   2015-05-22T16:17:16Z

    CLOUDSTACK-8506
      - Added subnetUtils.setInclusiveHostCount(true) to 
NetUtils.isIpWithtInCidrRange() method. It makes the 31-bit prefixes work just 
fine
      - Added 3 unit tests to test valid and invalid ranges.

commit a83f74d83e4d0699ad631d2efa4cd674bc53076b
Author: wilderrodrigues <[email protected]>
Date:   2015-05-22T18:08:09Z

    CLOUDSTACK-8506
    
      - Changing the implementation of the NetUtils.ipRangesOverlap() a little 
bit in order to be compliant with RFC 3021
      - 2 unit tests added
      - ranges from 0 to 255 covered by the tests, which also test the negative 
cases.

----


> Make ACS compliant with the RFC 3021
> ------------------------------------
>
>                 Key: CLOUDSTACK-8506
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8506
>             Project: CloudStack
>          Issue Type: Improvement
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>            Reporter: Wilder Rodrigues
>            Assignee: Wilder Rodrigues
>
> On 21 May 2015, at 10:29, Singh, Devender <[email protected]> wrote:
> Hi Cloudstack Team,
> We had no problems building and using /31 networks on 4.2.0, but after our 
> upgrade to 4.4.2  we are no longer able to add new ones.
> We have a lot of them already in place.  As an example I pasted some output 
> from cloudmonkey on a link that is already established and working.
> Does anyone have a workaround, or can point me in the right direction for a 
> patch?
> (local) > list networks id=e044c442-48f7-4bae-8c5d-530423a249f7
> count = 1
> network:
> id = e044c442-48f7-4bae-8c5d-530423a249f7
> name = VLAN180
> acltype = Domain
> broadcastdomaintype = Vlan
> broadcasturi = vlan://180
> canusefordeploy = False
> cidr = 202.90.43.0/31
> displaynetwork = True
> displaytext = VM-UTILITY-2
> dns1 = 4.2.2.1
> domain = ROOT
> domainid = 8acf0368-e5b1-11e2-b5cf-2ef4cf18a6ae
> gateway = 202.90.43.0
> ispersistent = False
> issystem = False
> netmask = 255.255.255.254
> networkofferingavailability = Optional
> networkofferingconservemode = False
> networkofferingdisplaytext = private-guest1_switch
> networkofferingid = 0b63d457-5f5e-426f-a81e-8797e522eb8c
> networkofferingname = private-guest1_switch
> physicalnetworkid = cf4c2846-2418-4ba4-b307-6a6405860799
> related = e044c442-48f7-4bae-8c5d-530423a249f7
> restartrequired = False
> service:
> specifyipranges = True
> state = Setup
> strechedl2subnet = False
> subdomainaccess = True
> tags:
> traffictype = Guest
> type = Shared
> vlan = 180
> zoneid = 88066cb4-64ab-4c54-83a9-3279a1e030cb
> zonename = UTILITY-ZONE-1



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to