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

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

Github user DaanHoogland commented on the pull request:

    https://github.com/apache/cloudstack/pull/1125#issuecomment-162480371
  
    Not sure if it is related but
    
    ```
    Running com.cloud.utils.net.NetUtilsTest
    2015-12-07 11:33:08,471 INFO  [utils.net.NetUtils] (main:) Invalid value of 
cidr 10.3.6.5/50
    2015-12-07 11:33:08,480 INFO  [utils.net.NetUtilsTest] (main:) IP is 
1234:5678::1
    2015-12-07 11:33:08,480 INFO  [utils.net.NetUtilsTest] (main:) IP is 
1234:5678::2
    2015-12-07 11:33:08,483 INFO  [utils.net.NetUtilsTest] (main:) IP is 
1234:5678::1
    2015-12-07 11:33:08,488 INFO  [utils.net.NetUtilsTest] (main:) IP is 
1234:5678::1
    2015-12-07 11:33:08,490 INFO  [utils.net.NetUtilsTest] (main:) IP is 
1234:5678::1
    2015-12-07 11:33:08,492 INFO  [utils.net.NetUtilsTest] (main:) IP is 
1234:5678::99d6:578:c6d0:4d1e
    2015-12-07 11:33:08,497 INFO  [utils.net.NetUtilsTest] (main:) IP is 
1234:5678::c2ad:5357:a636:5465
    2015-12-07 11:33:08,500 INFO  [utils.net.NetUtilsTest] (main:) IP is 
1234:5678::f54c:4cd1:fafc:6d08
    2015-12-07 11:33:08,509 INFO  [utils.net.NetUtilsTest] (main:) IP is 
1234:5678::54d1:5897:eba:aced
    2015-12-07 11:33:08,511 INFO  [utils.net.NetUtilsTest] (main:) IP is 
1234:5678::a924:8a89:5af3:2039
    2015-12-07 11:33:08,512 INFO  [utils.net.NetUtilsTest] (main:) IP is 
1234:5678::1442:6ab4:8a7f:1495
    2015-12-07 11:33:08,518 INFO  [utils.net.NetUtilsTest] (main:) IP is 
1234:5678::e319:8c5f:b31c:eda1
    2015-12-07 11:33:08,520 INFO  [utils.net.NetUtilsTest] (main:) IP is 
1234:5678::e380:62c1:5705:769f
    2015-12-07 11:33:08,521 INFO  [utils.net.NetUtilsTest] (main:) IP is 
1234:5678::a764:8dd3:1f33:bc29
    2015-12-07 11:33:08,522 INFO  [utils.net.NetUtilsTest] (main:) IP is 
1234:5678::9b2d:3bd9:7c1c:3df1
    2015-12-07 11:33:08,564 ERROR [utils.net.NetUtils] (main:) Failed to 
convert a string to an IPv6 address
    java.lang.IllegalArgumentException: can not parse []
        at 
com.googlecode.ipv6.IPv6Address.tryParseStringArrayIntoLongArray(IPv6Address.java:94)
        at com.googlecode.ipv6.IPv6Address.fromString(IPv6Address.java:80)
        at com.cloud.utils.net.NetUtils.countIp6InRange(NetUtils.java:1317)
        at 
com.cloud.utils.net.NetUtilsTest.testCountIp6InRangeWithNullStart(NetUtilsTest.java:152)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
        at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
        at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
        at 
org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283)
        at 
org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173)
        at 
org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
        at 
org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128)
        at 
org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
        at 
org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
        at 
org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
    Tests run: 40, Failures: 3, Errors: 0, Skipped: 0, Time elapsed: 0.143 sec 
<<< FAILURE! - in com.cloud.utils.net.NetUtilsTest
    test31BitPrefixEnd(com.cloud.utils.net.NetUtilsTest)  Time elapsed: 0.019 
sec  <<< FAILURE!
    java.lang.AssertionError: Check if the 
subnetUtils.setInclusiveHostCount(true) has been called.
        at org.junit.Assert.fail(Assert.java:88)
        at org.junit.Assert.assertTrue(Assert.java:41)
        at 
com.cloud.utils.net.NetUtilsTest.test31BitPrefixEnd(NetUtilsTest.java:362)
    
    test31BitPrefixFail(com.cloud.utils.net.NetUtilsTest)  Time elapsed: 0.001 
sec  <<< FAILURE!
    java.lang.AssertionError: Out of the range. Why did it return true?
        at org.junit.Assert.fail(Assert.java:88)
        at org.junit.Assert.assertTrue(Assert.java:41)
        at org.junit.Assert.assertFalse(Assert.java:64)
        at 
com.cloud.utils.net.NetUtilsTest.test31BitPrefixFail(NetUtilsTest.java:372)
    
    test31BitPrefixStart(com.cloud.utils.net.NetUtilsTest)  Time elapsed: 0.001 
sec  <<< FAILURE!
    java.lang.AssertionError: Check if the 
subnetUtils.setInclusiveHostCount(true) has been called.
        at org.junit.Assert.fail(Assert.java:88)
        at org.junit.Assert.assertTrue(Assert.java:41)
        at 
com.cloud.utils.net.NetUtilsTest.test31BitPrefixStart(NetUtilsTest.java:352)
    ```
    
    ```
    Results :
    
    Failed tests:
      NetUtilsTest.test31BitPrefixEnd:362 Check if the 
subnetUtils.setInclusiveHostCount(true) has been called.
      NetUtilsTest.test31BitPrefixFail:372 Out of the range. Why did it return 
true?
      NetUtilsTest.test31BitPrefixStart:352 Check if the 
subnetUtils.setInclusiveHostCount(true) has been called.
    ```



> ACS allows to create isolated networks with invalid gateway IP address
> ----------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-9086
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9086
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>            Reporter: Kshitij Kansal
>            Assignee: Kshitij Kansal
>
> When entering invalid combination no check is performed anymore and VR is 
> created with invalid interface. Of course, nothing works in the isolated 
> network. For example, you are allowed to create network with 172.16.21.0 IP 
> address for GW and 255.255.255.0 for SM - this address is not valid, however 
> it is accepted and even used in VR. One more example - 192.168.255.255 for GW 
> address and 255.255.255.0 for SM.



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

Reply via email to