You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by "Tutkowski, Mike" <Mi...@netapp.com> on 2017/02/14 21:44:41 UTC

Can't create a zone using master

Hi,

I’m getting a NullPointerException when trying to create a zone using master.

Below is the relevant code in ConfigurationManagerImpl.

In the else block, network.getCidr() returns null and NetUtil.getCidrNetmask then throws a NullPointerException.

I noticed that network.getGateway() also returns null (which seems odd).

Thoughts on this?

Thanks!
Mike

public Pair<Boolean, Pair<String, String>> validateIpRange(final String startIP, final String endIP, final String newVlanGateway, final String newVlanNetmask, final List<VlanVO> vlans, final boolean ipv4,
        final boolean ipv6, String ip6Gateway, String ip6Cidr, final String startIPv6, final String endIPv6, final Network network) {
    String vlanGateway = null;
    String vlanNetmask = null;
    boolean sameSubnet = false;
    if (CollectionUtils.isNotEmpty(vlans)) {
        for (final VlanVO vlan : vlans) {
            vlanGateway = vlan.getVlanGateway();
            vlanNetmask = vlan.getVlanNetmask();
            sameSubnet = hasSameSubnet(ipv4, vlanGateway, vlanNetmask, newVlanGateway, newVlanNetmask, startIP, endIP,
                    ipv6, ip6Gateway, ip6Cidr, startIPv6, endIPv6, network);
            if (sameSubnet) break;
        }
    } else {
        vlanGateway = network.getGateway();
        vlanNetmask = NetUtils.getCidrNetmask(network.getCidr());


Re: Can't create a zone using master

Posted by "Tutkowski, Mike" <Mi...@netapp.com>.
Hi Rajani,

Just to make sure I'm running with the right code, can you provide me the SHA that you'd like me to test with?

Thanks!
Mike

> On Feb 15, 2017, at 10:21 PM, Rajani Karuturi <ra...@apache.org> wrote:
> 
> unfortunately, running one set of tests itself is very time
> consuming(multiplied by hypervisors, network modes etc. its
> impossible to run all)
> 
> If I remember correctly, wido tested it with PR 1700 (IPV6 in
> basic networking)
> 
> Can you try a commit before and a commit after that PR?
> 
> Thanks,
> 
> ~ Rajani
> 
> http://cloudplatform.accelerite.com/
> 
> On February 16, 2017 at 1:02 AM, Tutkowski, Mike
> (Mike.Tutkowski@netapp.com) wrote:
> 
> Thanks for noting that PR, Rene. I tried building a Basic Zone
> making use of code from that PR, but – unfortunately – I still
> get an exception (below).
> 
> On a related note, does this mean we don’t run any integration
> tests that build a Basic Zone before we OK a PR to be checked in?
> 
> ERROR [c.c.a.ApiServer] (qtp555984412-267:ctx-a904cbd0
> ctx-062a000a) (logid:30f5a3ec) unhandled exception executing api
> command: [Ljava.lang.String;@4732a98c
> java.lang.NullPointerException
> at
> com.cloud.utils.net.NetUtils.getCidrNetmask(NetUtils.java:956)
> at
> com.cloud.configuration.ConfigurationManagerImpl.validateIpRange(ConfigurationManagerImpl.java:2924)
> at
> com.cloud.configuration.ConfigurationManagerImpl.createVlanAndPublicIpRange(ConfigurationManagerImpl.java:2822)
> 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:498)
> at
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
> at
> org.apache.cloudstack.network.contrail.management.EventUtils$EventInterceptor.invoke(EventUtils.java:107)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168)
> at
> com.cloud.event.ActionEventInterceptor.invoke(ActionEventInterceptor.java:51)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168)
> at
> org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
> at
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
> at com.sun.proxy.$Proxy126.createVlanAndPublicIpRange(Unknown
> Source)
> at
> org.apache.cloudstack.api.command.admin.vlan.CreateVlanIpRangeCmd.execute(CreateVlanIpRangeCmd.java:219)
> at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:150)
> at com.cloud.api.ApiServer.queueCommand(ApiServer.java:709)
> at com.cloud.api.ApiServer.handleRequest(ApiServer.java:533)
> at
> com.cloud.api.ApiServlet.processRequestInContext(ApiServlet.java:299)
> at com.cloud.api.ApiServlet$1.run(ApiServlet.java:129)
> at
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)
> at
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)
> at
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
> at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:126)
> at com.cloud.api.ApiServlet.doGet(ApiServlet.java:88)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
> at
> org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
> at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
> at
> org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:189)
> at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
> at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
> at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
> at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
> at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
> at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
> at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
> at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
> at
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
> at
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
> at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
> at org.eclipse.jetty.server.Server.handle(Server.java:499)
> at
> org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
> at
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:258)
> at
> org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
> at java.lang.Thread.run(Thread.java:745)
> 
> On 2/15/17, 12:52 AM, "Tutkowski, Mike"
> <Mi...@netapp.com> wrote:
> 
> Thanks for pointing this out.
> 
> I can incorporate those changes in the morning and see if it
> does the trick.
> 
>> On Feb 15, 2017, at 12:50 AM, Rene Moser <ma...@renemoser.net>
> wrote:
>> 
>> Probably related to
> https://github.com/apache/cloudstack/pull/1927
>> 
>> 
>> 
>>> On 02/14/2017 10:44 PM, Tutkowski, Mike wrote:
>>> Hi,
>>> 
>>> I’m getting a NullPointerException when trying to create a
> zone using master.
>>> 
>>> Below is the relevant code in ConfigurationManagerImpl.
>>> 
>>> In the else block, network.getCidr() returns null and
> NetUtil.getCidrNetmask then throws a NullPointerException.
>>> 
>>> I noticed that network.getGateway() also returns null (which
> seems odd).
>>> 
>>> Thoughts on this?
>>> 
>>> Thanks!
>>> Mike
>>> 
>>> public Pair<Boolean, Pair<String, String>>
> validateIpRange(final String startIP, final String endIP, final
> String newVlanGateway, final String newVlanNetmask, final
> List<VlanVO> vlans, final boolean ipv4,
>>> final boolean ipv6, String ip6Gateway, String ip6Cidr, final
> String startIPv6, final String endIPv6, final Network network) {
>>> String vlanGateway = null;
>>> String vlanNetmask = null;
>>> boolean sameSubnet = false;
>>> if (CollectionUtils.isNotEmpty(vlans)) {
>>> for (final VlanVO vlan : vlans) {
>>> vlanGateway = vlan.getVlanGateway();
>>> vlanNetmask = vlan.getVlanNetmask();
>>> sameSubnet = hasSameSubnet(ipv4, vlanGateway, vlanNetmask,
> newVlanGateway, newVlanNetmask, startIP, endIP,
>>> ipv6, ip6Gateway, ip6Cidr, startIPv6, endIPv6, network);
>>> if (sameSubnet) break;
>>> }
>>> } else {
>>> vlanGateway = network.getGateway();
>>> vlanNetmask = NetUtils.getCidrNetmask(network.getCidr());

Re: Can't create a zone using master

Posted by "Tutkowski, Mike" <Mi...@netapp.com>.
For the CloudStack networking person who might investigate this, here is the code I changed per Wei’s comments to get this to work:

https://github.com/mike-tutkowski/cloudstack/commit/fdb4fd1e4b4fbb61d8e30006fceca86b8664bb5e

On 2/15/17, 11:22 PM, "Tutkowski, Mike" <Mi...@netapp.com> wrote:

    Hi Rajani,
    
    It looks like a combination of actions has fixed this for me:
    
    1) From Wei: You may remove the "else" part which does not exist in previous versions in ConfigurationManagerImpl.java.
    2) I made use of the new system VM template.
    
    It looks like we have a bug in ConfigurationManagerImpl. I don’t know why that else block was added, so someone who knows more about that part of the codebase should probably investigate and see what needs to be done there. Maybe removing it, as Wei suggested, is what we want for a solution there or maybe that is just a Band-Aid. Someone who knows about this networking code can make the call.
    
    Thanks,
    Mike
    
    On 2/15/17, 11:05 PM, "Rajani Karuturi" <ra...@apache.org> wrote:
    
        This is the order in which they are merged.
        
        * 7233ac3 N Merge pull request #977 from ustcweizhou/vm-snapshot
        2 weeks ago [Rajani Karuturi]
        
        * f10c8bf N Merge pull request #1700 from
        wido/ipv6-basic-networking 3 weeks ago [Rajani Karuturi]
        
        * 4721c53 N Merge pull request #1749 from
        mike-tutkowski/archived_snapshots 3 weeks ago [Rajani Karuturi]
        
        ~ Rajani
        
        http://cloudplatform.accelerite.com/
        
        On February 16, 2017 at 11:20 AM, Tutkowski, Mike
        (Mike.Tutkowski@netapp.com) wrote:
        
        Actually Rajani, I just saw the email you sent out about a new
        system VM template for master.
        
        I can try to make use of that new template and see if that fixes
        my agent issues.
        
        On Feb 15, 2017, at 10:21 PM, Rajani Karuturi <ra...@apache.org>
        wrote:
        
        unfortunately, running one set of tests itself is very time
        consuming(multiplied by hypervisors, network modes etc. its
        impossible to run all)
        
        If I remember correctly, wido tested it with PR 1700 (IPV6 in
        basic networking)
        
        Can you try a commit before and a commit after that PR?
        
        Thanks,
        
        ~ Rajani
        
        http://cloudplatform.accelerite.com/
        
        On February 16, 2017 at 1:02 AM, Tutkowski, Mike
        (Mike.Tutkowski@netapp.com) wrote:
        
        Thanks for noting that PR, Rene. I tried building a Basic Zone
        making use of code from that PR, but – unfortunately – I still
        get an exception (below).
        
        On a related note, does this mean we don’t run any integration
        tests that build a Basic Zone before we OK a PR to be checked
        in?
        
        ERROR [c.c.a.ApiServer] (qtp555984412-267:ctx-a904cbd0
        ctx-062a000a) (logid:30f5a3ec) unhandled exception executing api
        command: [Ljava.lang.String;@4732a98c
        java.lang.NullPointerException
        at
        com.cloud.utils.net.NetUtils.getCidrNetmask(NetUtils.java:956)
        at
        com.cloud.configuration.ConfigurationManagerImpl.validateIpRange(ConfigurationManagerImpl.java:2924)
        at
        com.cloud.configuration.ConfigurationManagerImpl.createVlanAndPublicIpRange(ConfigurationManagerImpl.java:2822)
        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:498)
        at
        org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
        at
        org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
        at
        org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
        at
        org.apache.cloudstack.network.contrail.management.EventUtils$EventInterceptor.invoke(EventUtils.java:107)
        at
        org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168)
        at
        com.cloud.event.ActionEventInterceptor.invoke(ActionEventInterceptor.java:51)
        at
        org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168)
        at
        org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
        at
        org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
        at
        org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
        at com.sun.proxy.$Proxy126.createVlanAndPublicIpRange(Unknown
        Source)
        at
        org.apache.cloudstack.api.command.admin.vlan.CreateVlanIpRangeCmd.execute(CreateVlanIpRangeCmd.java:219)
        at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:150)
        at com.cloud.api.ApiServer.queueCommand(ApiServer.java:709)
        at com.cloud.api.ApiServer.handleRequest(ApiServer.java:533)
        at
        com.cloud.api.ApiServlet.processRequestInContext(ApiServlet.java:299)
        at com.cloud.api.ApiServlet$1.run(ApiServlet.java:129)
        at
        org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)
        at
        org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)
        at
        org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
        at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:126)
        at com.cloud.api.ApiServlet.doGet(ApiServlet.java:88)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
        at
        org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
        at
        org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
        at
        org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:189)
        at
        org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
        at
        org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
        at
        org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
        at
        org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
        at
        org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
        at
        org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
        at
        org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
        at
        org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
        at
        org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
        at
        org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
        at
        org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
        at
        org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
        at
        org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
        at org.eclipse.jetty.server.Server.handle(Server.java:499)
        at
        org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
        at
        org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:258)
        at
        org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
        at
        org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
        at
        org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
        at java.lang.Thread.run(Thread.java:745)
        
        On 2/15/17, 12:52 AM, "Tutkowski, Mike"
        <Mi...@netapp.com> wrote:
        
        Thanks for pointing this out.
        
        I can incorporate those changes in the morning and see if it
        does the trick.
        
        On Feb 15, 2017, at 12:50 AM, Rene Moser <ma...@renemoser.net>
        
        wrote:
        
        Probably related to
        
        https://github.com/apache/cloudstack/pull/1927
        
        On 02/14/2017 10:44 PM, Tutkowski, Mike wrote:
        Hi,
        
        I’m getting a NullPointerException when trying to create a
        
        zone using master.
        
        Below is the relevant code in ConfigurationManagerImpl.
        
        In the else block, network.getCidr() returns null and
        
        NetUtil.getCidrNetmask then throws a NullPointerException.
        
        I noticed that network.getGateway() also returns null (which
        
        seems odd).
        
        Thoughts on this?
        
        Thanks!
        Mike
        
        public Pair<Boolean, Pair<String, String>>
        
        validateIpRange(final String startIP, final String endIP, final
        String newVlanGateway, final String newVlanNetmask, final
        List<VlanVO> vlans, final boolean ipv4,
        
        final boolean ipv6, String ip6Gateway, String ip6Cidr, final
        
        String startIPv6, final String endIPv6, final Network network) {
        
        String vlanGateway = null;
        String vlanNetmask = null;
        boolean sameSubnet = false;
        if (CollectionUtils.isNotEmpty(vlans)) {
        for (final VlanVO vlan : vlans) {
        vlanGateway = vlan.getVlanGateway();
        vlanNetmask = vlan.getVlanNetmask();
        sameSubnet = hasSameSubnet(ipv4, vlanGateway, vlanNetmask,
        
        newVlanGateway, newVlanNetmask, startIP, endIP,
        
        ipv6, ip6Gateway, ip6Cidr, startIPv6, endIPv6, network);
        if (sameSubnet) break;
        }
        } else {
        vlanGateway = network.getGateway();
        vlanNetmask = NetUtils.getCidrNetmask(network.getCidr());
    
    


Re: Can't create a zone using master

Posted by "Tutkowski, Mike" <Mi...@netapp.com>.
Hi Rajani,

It looks like a combination of actions has fixed this for me:

1) From Wei: You may remove the "else" part which does not exist in previous versions in ConfigurationManagerImpl.java.
2) I made use of the new system VM template.

It looks like we have a bug in ConfigurationManagerImpl. I don’t know why that else block was added, so someone who knows more about that part of the codebase should probably investigate and see what needs to be done there. Maybe removing it, as Wei suggested, is what we want for a solution there or maybe that is just a Band-Aid. Someone who knows about this networking code can make the call.

Thanks,
Mike

On 2/15/17, 11:05 PM, "Rajani Karuturi" <ra...@apache.org> wrote:

    This is the order in which they are merged.
    
    * 7233ac3 N Merge pull request #977 from ustcweizhou/vm-snapshot
    2 weeks ago [Rajani Karuturi]
    
    * f10c8bf N Merge pull request #1700 from
    wido/ipv6-basic-networking 3 weeks ago [Rajani Karuturi]
    
    * 4721c53 N Merge pull request #1749 from
    mike-tutkowski/archived_snapshots 3 weeks ago [Rajani Karuturi]
    
    ~ Rajani
    
    http://cloudplatform.accelerite.com/
    
    On February 16, 2017 at 11:20 AM, Tutkowski, Mike
    (Mike.Tutkowski@netapp.com) wrote:
    
    Actually Rajani, I just saw the email you sent out about a new
    system VM template for master.
    
    I can try to make use of that new template and see if that fixes
    my agent issues.
    
    On Feb 15, 2017, at 10:21 PM, Rajani Karuturi <ra...@apache.org>
    wrote:
    
    unfortunately, running one set of tests itself is very time
    consuming(multiplied by hypervisors, network modes etc. its
    impossible to run all)
    
    If I remember correctly, wido tested it with PR 1700 (IPV6 in
    basic networking)
    
    Can you try a commit before and a commit after that PR?
    
    Thanks,
    
    ~ Rajani
    
    http://cloudplatform.accelerite.com/
    
    On February 16, 2017 at 1:02 AM, Tutkowski, Mike
    (Mike.Tutkowski@netapp.com) wrote:
    
    Thanks for noting that PR, Rene. I tried building a Basic Zone
    making use of code from that PR, but – unfortunately – I still
    get an exception (below).
    
    On a related note, does this mean we don’t run any integration
    tests that build a Basic Zone before we OK a PR to be checked
    in?
    
    ERROR [c.c.a.ApiServer] (qtp555984412-267:ctx-a904cbd0
    ctx-062a000a) (logid:30f5a3ec) unhandled exception executing api
    command: [Ljava.lang.String;@4732a98c
    java.lang.NullPointerException
    at
    com.cloud.utils.net.NetUtils.getCidrNetmask(NetUtils.java:956)
    at
    com.cloud.configuration.ConfigurationManagerImpl.validateIpRange(ConfigurationManagerImpl.java:2924)
    at
    com.cloud.configuration.ConfigurationManagerImpl.createVlanAndPublicIpRange(ConfigurationManagerImpl.java:2822)
    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:498)
    at
    org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
    at
    org.apache.cloudstack.network.contrail.management.EventUtils$EventInterceptor.invoke(EventUtils.java:107)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168)
    at
    com.cloud.event.ActionEventInterceptor.invoke(ActionEventInterceptor.java:51)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168)
    at
    org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
    at
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at
    org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
    at com.sun.proxy.$Proxy126.createVlanAndPublicIpRange(Unknown
    Source)
    at
    org.apache.cloudstack.api.command.admin.vlan.CreateVlanIpRangeCmd.execute(CreateVlanIpRangeCmd.java:219)
    at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:150)
    at com.cloud.api.ApiServer.queueCommand(ApiServer.java:709)
    at com.cloud.api.ApiServer.handleRequest(ApiServer.java:533)
    at
    com.cloud.api.ApiServlet.processRequestInContext(ApiServlet.java:299)
    at com.cloud.api.ApiServlet$1.run(ApiServlet.java:129)
    at
    org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)
    at
    org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)
    at
    org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
    at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:126)
    at com.cloud.api.ApiServlet.doGet(ApiServlet.java:88)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    at
    org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
    at
    org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
    at
    org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:189)
    at
    org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
    at
    org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
    at
    org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
    at
    org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
    at
    org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
    at
    org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
    at
    org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
    at
    org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
    at
    org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
    at
    org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
    at
    org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
    at
    org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
    at
    org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
    at org.eclipse.jetty.server.Server.handle(Server.java:499)
    at
    org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
    at
    org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:258)
    at
    org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
    at
    org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
    at
    org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
    at java.lang.Thread.run(Thread.java:745)
    
    On 2/15/17, 12:52 AM, "Tutkowski, Mike"
    <Mi...@netapp.com> wrote:
    
    Thanks for pointing this out.
    
    I can incorporate those changes in the morning and see if it
    does the trick.
    
    On Feb 15, 2017, at 12:50 AM, Rene Moser <ma...@renemoser.net>
    
    wrote:
    
    Probably related to
    
    https://github.com/apache/cloudstack/pull/1927
    
    On 02/14/2017 10:44 PM, Tutkowski, Mike wrote:
    Hi,
    
    I’m getting a NullPointerException when trying to create a
    
    zone using master.
    
    Below is the relevant code in ConfigurationManagerImpl.
    
    In the else block, network.getCidr() returns null and
    
    NetUtil.getCidrNetmask then throws a NullPointerException.
    
    I noticed that network.getGateway() also returns null (which
    
    seems odd).
    
    Thoughts on this?
    
    Thanks!
    Mike
    
    public Pair<Boolean, Pair<String, String>>
    
    validateIpRange(final String startIP, final String endIP, final
    String newVlanGateway, final String newVlanNetmask, final
    List<VlanVO> vlans, final boolean ipv4,
    
    final boolean ipv6, String ip6Gateway, String ip6Cidr, final
    
    String startIPv6, final String endIPv6, final Network network) {
    
    String vlanGateway = null;
    String vlanNetmask = null;
    boolean sameSubnet = false;
    if (CollectionUtils.isNotEmpty(vlans)) {
    for (final VlanVO vlan : vlans) {
    vlanGateway = vlan.getVlanGateway();
    vlanNetmask = vlan.getVlanNetmask();
    sameSubnet = hasSameSubnet(ipv4, vlanGateway, vlanNetmask,
    
    newVlanGateway, newVlanNetmask, startIP, endIP,
    
    ipv6, ip6Gateway, ip6Cidr, startIPv6, endIPv6, network);
    if (sameSubnet) break;
    }
    } else {
    vlanGateway = network.getGateway();
    vlanNetmask = NetUtils.getCidrNetmask(network.getCidr());


Re: Can't create a zone using master

Posted by Rajani Karuturi <ra...@apache.org>.
This is the order in which they are merged.

* 7233ac3 N Merge pull request #977 from ustcweizhou/vm-snapshot
2 weeks ago [Rajani Karuturi]

* f10c8bf N Merge pull request #1700 from
wido/ipv6-basic-networking 3 weeks ago [Rajani Karuturi]

* 4721c53 N Merge pull request #1749 from
mike-tutkowski/archived_snapshots 3 weeks ago [Rajani Karuturi]

~ Rajani

http://cloudplatform.accelerite.com/

On February 16, 2017 at 11:20 AM, Tutkowski, Mike
(Mike.Tutkowski@netapp.com) wrote:

Actually Rajani, I just saw the email you sent out about a new
system VM template for master.

I can try to make use of that new template and see if that fixes
my agent issues.

On Feb 15, 2017, at 10:21 PM, Rajani Karuturi <ra...@apache.org>
wrote:

unfortunately, running one set of tests itself is very time
consuming(multiplied by hypervisors, network modes etc. its
impossible to run all)

If I remember correctly, wido tested it with PR 1700 (IPV6 in
basic networking)

Can you try a commit before and a commit after that PR?

Thanks,

~ Rajani

http://cloudplatform.accelerite.com/

On February 16, 2017 at 1:02 AM, Tutkowski, Mike
(Mike.Tutkowski@netapp.com) wrote:

Thanks for noting that PR, Rene. I tried building a Basic Zone
making use of code from that PR, but – unfortunately – I still
get an exception (below).

On a related note, does this mean we don’t run any integration
tests that build a Basic Zone before we OK a PR to be checked
in?

ERROR [c.c.a.ApiServer] (qtp555984412-267:ctx-a904cbd0
ctx-062a000a) (logid:30f5a3ec) unhandled exception executing api
command: [Ljava.lang.String;@4732a98c
java.lang.NullPointerException
at
com.cloud.utils.net.NetUtils.getCidrNetmask(NetUtils.java:956)
at
com.cloud.configuration.ConfigurationManagerImpl.validateIpRange(ConfigurationManagerImpl.java:2924)
at
com.cloud.configuration.ConfigurationManagerImpl.createVlanAndPublicIpRange(ConfigurationManagerImpl.java:2822)
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:498)
at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at
org.apache.cloudstack.network.contrail.management.EventUtils$EventInterceptor.invoke(EventUtils.java:107)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168)
at
com.cloud.event.ActionEventInterceptor.invoke(ActionEventInterceptor.java:51)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168)
at
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
at com.sun.proxy.$Proxy126.createVlanAndPublicIpRange(Unknown
Source)
at
org.apache.cloudstack.api.command.admin.vlan.CreateVlanIpRangeCmd.execute(CreateVlanIpRangeCmd.java:219)
at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:150)
at com.cloud.api.ApiServer.queueCommand(ApiServer.java:709)
at com.cloud.api.ApiServer.handleRequest(ApiServer.java:533)
at
com.cloud.api.ApiServlet.processRequestInContext(ApiServlet.java:299)
at com.cloud.api.ApiServlet$1.run(ApiServlet.java:129)
at
org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)
at
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)
at
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:126)
at com.cloud.api.ApiServlet.doGet(ApiServlet.java:88)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at
org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
at
org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:189)
at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
at
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
at
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
at
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
at
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:499)
at
org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
at
org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:258)
at
org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
at
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
at
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
at java.lang.Thread.run(Thread.java:745)

On 2/15/17, 12:52 AM, "Tutkowski, Mike"
<Mi...@netapp.com> wrote:

Thanks for pointing this out.

I can incorporate those changes in the morning and see if it
does the trick.

On Feb 15, 2017, at 12:50 AM, Rene Moser <ma...@renemoser.net>

wrote:

Probably related to

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

On 02/14/2017 10:44 PM, Tutkowski, Mike wrote:
Hi,

I’m getting a NullPointerException when trying to create a

zone using master.

Below is the relevant code in ConfigurationManagerImpl.

In the else block, network.getCidr() returns null and

NetUtil.getCidrNetmask then throws a NullPointerException.

I noticed that network.getGateway() also returns null (which

seems odd).

Thoughts on this?

Thanks!
Mike

public Pair<Boolean, Pair<String, String>>

validateIpRange(final String startIP, final String endIP, final
String newVlanGateway, final String newVlanNetmask, final
List<VlanVO> vlans, final boolean ipv4,

final boolean ipv6, String ip6Gateway, String ip6Cidr, final

String startIPv6, final String endIPv6, final Network network) {

String vlanGateway = null;
String vlanNetmask = null;
boolean sameSubnet = false;
if (CollectionUtils.isNotEmpty(vlans)) {
for (final VlanVO vlan : vlans) {
vlanGateway = vlan.getVlanGateway();
vlanNetmask = vlan.getVlanNetmask();
sameSubnet = hasSameSubnet(ipv4, vlanGateway, vlanNetmask,

newVlanGateway, newVlanNetmask, startIP, endIP,

ipv6, ip6Gateway, ip6Cidr, startIPv6, endIPv6, network);
if (sameSubnet) break;
}
} else {
vlanGateway = network.getGateway();
vlanNetmask = NetUtils.getCidrNetmask(network.getCidr());

Re: Can't create a zone using master

Posted by "Tutkowski, Mike" <Mi...@netapp.com>.
Actually Rajani, I just saw the email you sent out about a new system VM template for master.

I can try to make use of that new template and see if that fixes my agent issues.

> On Feb 15, 2017, at 10:21 PM, Rajani Karuturi <ra...@apache.org> wrote:
> 
> unfortunately, running one set of tests itself is very time
> consuming(multiplied by hypervisors, network modes etc. its
> impossible to run all)
> 
> If I remember correctly, wido tested it with PR 1700 (IPV6 in
> basic networking)
> 
> Can you try a commit before and a commit after that PR?
> 
> Thanks,
> 
> ~ Rajani
> 
> http://cloudplatform.accelerite.com/
> 
> On February 16, 2017 at 1:02 AM, Tutkowski, Mike
> (Mike.Tutkowski@netapp.com) wrote:
> 
> Thanks for noting that PR, Rene. I tried building a Basic Zone
> making use of code from that PR, but – unfortunately – I still
> get an exception (below).
> 
> On a related note, does this mean we don’t run any integration
> tests that build a Basic Zone before we OK a PR to be checked in?
> 
> ERROR [c.c.a.ApiServer] (qtp555984412-267:ctx-a904cbd0
> ctx-062a000a) (logid:30f5a3ec) unhandled exception executing api
> command: [Ljava.lang.String;@4732a98c
> java.lang.NullPointerException
> at
> com.cloud.utils.net.NetUtils.getCidrNetmask(NetUtils.java:956)
> at
> com.cloud.configuration.ConfigurationManagerImpl.validateIpRange(ConfigurationManagerImpl.java:2924)
> at
> com.cloud.configuration.ConfigurationManagerImpl.createVlanAndPublicIpRange(ConfigurationManagerImpl.java:2822)
> 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:498)
> at
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
> at
> org.apache.cloudstack.network.contrail.management.EventUtils$EventInterceptor.invoke(EventUtils.java:107)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168)
> at
> com.cloud.event.ActionEventInterceptor.invoke(ActionEventInterceptor.java:51)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168)
> at
> org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
> at
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
> at com.sun.proxy.$Proxy126.createVlanAndPublicIpRange(Unknown
> Source)
> at
> org.apache.cloudstack.api.command.admin.vlan.CreateVlanIpRangeCmd.execute(CreateVlanIpRangeCmd.java:219)
> at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:150)
> at com.cloud.api.ApiServer.queueCommand(ApiServer.java:709)
> at com.cloud.api.ApiServer.handleRequest(ApiServer.java:533)
> at
> com.cloud.api.ApiServlet.processRequestInContext(ApiServlet.java:299)
> at com.cloud.api.ApiServlet$1.run(ApiServlet.java:129)
> at
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)
> at
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)
> at
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
> at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:126)
> at com.cloud.api.ApiServlet.doGet(ApiServlet.java:88)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
> at
> org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
> at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
> at
> org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:189)
> at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
> at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
> at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
> at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
> at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
> at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
> at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
> at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
> at
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
> at
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
> at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
> at org.eclipse.jetty.server.Server.handle(Server.java:499)
> at
> org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
> at
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:258)
> at
> org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
> at java.lang.Thread.run(Thread.java:745)
> 
> On 2/15/17, 12:52 AM, "Tutkowski, Mike"
> <Mi...@netapp.com> wrote:
> 
> Thanks for pointing this out.
> 
> I can incorporate those changes in the morning and see if it
> does the trick.
> 
>> On Feb 15, 2017, at 12:50 AM, Rene Moser <ma...@renemoser.net>
> wrote:
>> 
>> Probably related to
> https://github.com/apache/cloudstack/pull/1927
>> 
>> 
>> 
>>> On 02/14/2017 10:44 PM, Tutkowski, Mike wrote:
>>> Hi,
>>> 
>>> I’m getting a NullPointerException when trying to create a
> zone using master.
>>> 
>>> Below is the relevant code in ConfigurationManagerImpl.
>>> 
>>> In the else block, network.getCidr() returns null and
> NetUtil.getCidrNetmask then throws a NullPointerException.
>>> 
>>> I noticed that network.getGateway() also returns null (which
> seems odd).
>>> 
>>> Thoughts on this?
>>> 
>>> Thanks!
>>> Mike
>>> 
>>> public Pair<Boolean, Pair<String, String>>
> validateIpRange(final String startIP, final String endIP, final
> String newVlanGateway, final String newVlanNetmask, final
> List<VlanVO> vlans, final boolean ipv4,
>>> final boolean ipv6, String ip6Gateway, String ip6Cidr, final
> String startIPv6, final String endIPv6, final Network network) {
>>> String vlanGateway = null;
>>> String vlanNetmask = null;
>>> boolean sameSubnet = false;
>>> if (CollectionUtils.isNotEmpty(vlans)) {
>>> for (final VlanVO vlan : vlans) {
>>> vlanGateway = vlan.getVlanGateway();
>>> vlanNetmask = vlan.getVlanNetmask();
>>> sameSubnet = hasSameSubnet(ipv4, vlanGateway, vlanNetmask,
> newVlanGateway, newVlanNetmask, startIP, endIP,
>>> ipv6, ip6Gateway, ip6Cidr, startIPv6, endIPv6, network);
>>> if (sameSubnet) break;
>>> }
>>> } else {
>>> vlanGateway = network.getGateway();
>>> vlanNetmask = NetUtils.getCidrNetmask(network.getCidr());

Re: Can't create a zone using master

Posted by Rajani Karuturi <ra...@apache.org>.
Thanks Sigert.

~ Rajani

http://cloudplatform.accelerite.com/

On February 17, 2017 at 5:53 PM, Sigert GOEMINNE
(sigert.goeminne@nuagenetworks.net) wrote:

Hi all,

We have a new PR that fixes this issue:
https://github.com/apache/cloudstack/pull/1952

Kind regards,

*Sigert Goeminne*
Software Development Engineer

*nuage*networks.net
Copernicuslaan 50
2018 Antwerp
Belgium

On Fri, Feb 17, 2017 at 8:55 AM, Kris Sterckx <
kris.sterckx@nuagenetworks.net> wrote:

Thanks Mike

Investigating.

Kris

On 17 February 2017 at 08:18, Tutkowski, Mike
<Mi...@netapp.com>
wrote:

I added a comment on the code of the relevant PR, but the PR is
in the
Merged state, so I don't know if people receive e-mail
notifications

then.

On Feb 17, 2017, at 12:16 AM, Wei ZHOU <us...@gmail.com>
wrote:

Maybe we need ask Nuage why the lines are added.

2017-02-17 7:54 GMT+01:00 Tutkowski, Mike
<Mi...@netapp.com>:

Hopefully we can now find someone with experience in CloudStack's
networking code to tell us if that fix is OK or if that was just
a

Band-Aid

and we should do something more thorough to correct the issue.

On Feb 16, 2017, at 11:48 PM, Rajani Karuturi <ra...@apache.org>

wrote:

Thanks for digging it Mike.

~ Rajani

http://cloudplatform.accelerite.com/

On February 17, 2017 at 12:18 AM, Tutkowski, Mike
(Mike.Tutkowski@netapp.com) wrote:

Hi,

I opened a blocker for 4.10 regarding this issue:

https://issues.apache.org/jira/browse/CLOUDSTACK-9790

Thanks,
Mike

On 2/16/17, 8:35 AM, "Tutkowski, Mike"
<Mi...@netapp.com> wrote:

I believe the issue is here:

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

In ConfigurationManagerImpl.java, it appears the lines that led
to NPEs being thrown were added on lines 2924 – 2926:

https://github.com/apache/cloudstack/pull/1579/files

On 2/16/17, 2:42 AM, "Wido den Hollander" <wi...@widodh.nl>
wrote:

Op 16 februari 2017 om 6:21 schreef Rajani Karuturi

<ra...@apache.org>:

unfortunately, running one set of tests itself is very time
consuming(multiplied by hypervisors, network modes etc. its
impossible to run all)

If I remember correctly, wido tested it with PR 1700 (IPV6 in
basic networking)

I highly doubt it's PR 1700 which is causing this. The PR I have
open to fix a issue ONLY applies if IPv6 has been set.

PR 1700 only does something when you have set a IPv6 subnet in
the 'vlan' table:
https://github.com/apache/cloudstack/commit/

c0e7766713b2631a167c2ceea7d42b574a5cd1b9#diff-f90fdac6810fd89f89e827309a41d180R231

So I don't think it's caused by this since you NIC table will
not be filled with IPv6 addresses afterwards.

Wido

Can you try a commit before and a commit after that PR?

Thanks,

~ Rajani

http://cloudplatform.accelerite.com/

On February 16, 2017 at 1:02 AM, Tutkowski, Mike
(Mike.Tutkowski@netapp.com) wrote:

Thanks for noting that PR, Rene. I tried building a Basic Zone
making use of code from that PR, but – unfortunately – I still
get an exception (below).

On a related note, does this mean we don’t run any integration
tests that build a Basic Zone before we OK a PR to be checked

in?

ERROR [c.c.a.ApiServer] (qtp555984412-267:ctx-a904cbd0
ctx-062a000a) (logid:30f5a3ec) unhandled exception executing

api

command: [Ljava.lang.String;@4732a98c
java.lang.NullPointerException
at
com.cloud.utils.net.NetUtils.getCidrNetmask(NetUtils.java:956)
at

com.cloud.configuration.ConfigurationManagerImpl.validateIpRange(

ConfigurationManagerImpl.java:2924)

at

com.cloud.configuration.ConfigurationManagerImpl.

createVlanAndPublicIpRange(ConfigurationManagerImpl.java:2822)

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:498)
at

org.springframework.aop.support.AopUtils.

invokeJoinpointUsingReflection

(AopUtils.java:333)

at

org.springframework.aop.framework.ReflectiveMethodInvocation.

invokeJoinpoint(ReflectiveMethodInvocation.java:190)

at

org.springframework.aop.framework.ReflectiveMethodInvocation.

proceed(

ReflectiveMethodInvocation.java:157)

at

org.apache.cloudstack.network.contrail.management.

EventUtils$EventInterceptor.invoke(EventUtils.java:107)

at

org.springframework.aop.framework.ReflectiveMethodInvocation.

proceed(

ReflectiveMethodInvocation.java:168)

at

com.cloud.event.ActionEventInterceptor.invoke(

ActionEventInterceptor.java:51)

at

org.springframework.aop.framework.ReflectiveMethodInvocation.

proceed(

ReflectiveMethodInvocation.java:168)

at

org.springframework.aop.interceptor.ExposeInvocationInterceptor.

invoke(

ExposeInvocationInterceptor.java:92)

at

org.springframework.aop.framework.ReflectiveMethodInvocation.

proceed(

ReflectiveMethodInvocation.java:179)

at

org.springframework.aop.framework.JdkDynamicAopProxy.

invoke(JdkDynamicAopProxy.java:213)

at com.sun.proxy.$Proxy126.createVlanAndPublicIpRange(Unknown
Source)
at

org.apache.cloudstack.api.command.admin.vlan.

CreateVlanIpRangeCmd.execute(CreateVlanIpRangeCmd.java:219)

at

com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:150)

at com.cloud.api.ApiServer.queueCommand(ApiServer.java:709)
at com.cloud.api.ApiServer.handleRequest(ApiServer.java:533)
at

com.cloud.api.ApiServlet.processRequestInContext(

ApiServlet.java:299)

at com.cloud.api.ApiServlet$1.run(ApiServlet.java:129)
at

org.apache.cloudstack.managed.context.impl.

DefaultManagedContext$1.call(

DefaultManagedContext.java:56)

at

org.apache.cloudstack.managed.context.impl.DefaultManagedContext.

callWithContext(DefaultManagedContext.java:103)

at

org.apache.cloudstack.managed.context.impl.DefaultManagedContext.

runWithContext(DefaultManagedContext.java:53)

at

com.cloud.api.ApiServlet.processRequest(ApiServlet.java:126)

at com.cloud.api.ApiServlet.doGet(ApiServlet.java:88)
at

javax.servlet.http.HttpServlet.service(HttpServlet.java:687)

at

javax.servlet.http.HttpServlet.service(HttpServlet.java:790)

at

org.eclipse.jetty.servlet.ServletHolder.handle(

ServletHolder.java:812)

at

org.eclipse.jetty.servlet.ServletHandler$CachedChain.

doFilter(ServletHandler.java:1669)

at

org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(

WebSocketUpgradeFilter.java:189)

at

org.eclipse.jetty.servlet.ServletHandler$CachedChain.

doFilter(ServletHandler.java:1652)

at

org.eclipse.jetty.servlet.ServletHandler.doHandle(

ServletHandler.java:585)

at

org.eclipse.jetty.server.handler.ScopedHandler.handle(

ScopedHandler.java:143)

at

org.eclipse.jetty.security.SecurityHandler.handle(

SecurityHandler.java:577)

at

org.eclipse.jetty.server.session.SessionHandler.

doHandle(SessionHandler.java:223)

at

org.eclipse.jetty.server.handler.ContextHandler.

doHandle(ContextHandler.java:1127)

at

org.eclipse.jetty.servlet.ServletHandler.doScope(

ServletHandler.java:515)

at

org.eclipse.jetty.server.session.SessionHandler.

doScope(SessionHandler.java:185)

at

org.eclipse.jetty.server.handler.ContextHandler.

doScope(ContextHandler.java:1061)

at

org.eclipse.jetty.server.handler.ScopedHandler.handle(

ScopedHandler.java:141)

at

org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(

ContextHandlerCollection.java:215)

at

org.eclipse.jetty.server.handler.HandlerCollection.

handle(HandlerCollection.java:110)

at

org.eclipse.jetty.server.handler.HandlerWrapper.handle(

HandlerWrapper.java:97)

at org.eclipse.jetty.server.Server.handle(Server.java:499)
at

org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)

at

org.eclipse.jetty.server.HttpConnection.onFillable(

HttpConnection.java:258)

at

org.eclipse.jetty.io.AbstractConnection$2.run(

AbstractConnection.java:544)

at

org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(

QueuedThreadPool.java:635)

at

org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(

QueuedThreadPool.java:555)

at java.lang.Thread.run(Thread.java:745)

On 2/15/17, 12:52 AM, "Tutkowski, Mike"
<Mi...@netapp.com> wrote:

Thanks for pointing this out.

I can incorporate those changes in the morning and see if it
does the trick.

On Feb 15, 2017, at 12:50 AM, Rene Moser

<ma...@renemoser.net>

wrote:

Probably related to

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

On 02/14/2017 10:44 PM, Tutkowski, Mike wrote:
Hi,

I’m getting a NullPointerException when trying to create a

zone using master.

Below is the relevant code in ConfigurationManagerImpl.

In the else block, network.getCidr() returns null and

NetUtil.getCidrNetmask then throws a NullPointerException.

I noticed that network.getGateway() also returns null

(which

seems odd).

Thoughts on this?

Thanks!
Mike

public Pair<Boolean, Pair<String, String>>

validateIpRange(final String startIP, final String endIP,

final

String newVlanGateway, final String newVlanNetmask, final
List<VlanVO> vlans, final boolean ipv4,

final boolean ipv6, String ip6Gateway, String ip6Cidr,

final

String startIPv6, final String endIPv6, final Network network)

{

String vlanGateway = null;
String vlanNetmask = null;
boolean sameSubnet = false;
if (CollectionUtils.isNotEmpty(vlans)) {
for (final VlanVO vlan : vlans) {
vlanGateway = vlan.getVlanGateway();
vlanNetmask = vlan.getVlanNetmask();
sameSubnet = hasSameSubnet(ipv4, vlanGateway, vlanNetmask,

newVlanGateway, newVlanNetmask, startIP, endIP,

ipv6, ip6Gateway, ip6Cidr, startIPv6, endIPv6, network);
if (sameSubnet) break;
}
} else {
vlanGateway = network.getGateway();
vlanNetmask = NetUtils.getCidrNetmask(network.getCidr());

Re: Can't create a zone using master

Posted by Sigert GOEMINNE <si...@nuagenetworks.net>.
Hi all,

We have a new PR that fixes this issue:
https://github.com/apache/cloudstack/pull/1952

Kind regards,

*Sigert Goeminne*
Software Development Engineer

*nuage*networks.net
Copernicuslaan 50
2018 Antwerp
Belgium




On Fri, Feb 17, 2017 at 8:55 AM, Kris Sterckx <
kris.sterckx@nuagenetworks.net> wrote:

> Thanks Mike
>
> Investigating.
>
> Kris
>
> On 17 February 2017 at 08:18, Tutkowski, Mike <Mi...@netapp.com>
> wrote:
>
> > I added a comment on the code of the relevant PR, but the PR is in the
> > Merged state, so I don't know if people receive e-mail notifications
> then.
> >
> > > On Feb 17, 2017, at 12:16 AM, Wei ZHOU <us...@gmail.com> wrote:
> > >
> > > Maybe we need ask Nuage why the lines are added.
> > >
> > >
> > > 2017-02-17 7:54 GMT+01:00 Tutkowski, Mike <Mi...@netapp.com>:
> > >
> > >> Hopefully we can now find someone with experience in CloudStack's
> > >> networking code to tell us if that fix is OK or if that was just a
> > Band-Aid
> > >> and we should do something more thorough to correct the issue.
> > >>
> > >>> On Feb 16, 2017, at 11:48 PM, Rajani Karuturi <ra...@apache.org>
> > wrote:
> > >>>
> > >>> Thanks for digging it Mike.
> > >>>
> > >>> ~ Rajani
> > >>>
> > >>> http://cloudplatform.accelerite.com/
> > >>>
> > >>> On February 17, 2017 at 12:18 AM, Tutkowski, Mike
> > >>> (Mike.Tutkowski@netapp.com) wrote:
> > >>>
> > >>> Hi,
> > >>>
> > >>> I opened a blocker for 4.10 regarding this issue:
> > >>>
> > >>> https://issues.apache.org/jira/browse/CLOUDSTACK-9790
> > >>>
> > >>> Thanks,
> > >>> Mike
> > >>>
> > >>> On 2/16/17, 8:35 AM, "Tutkowski, Mike"
> > >>> <Mi...@netapp.com> wrote:
> > >>>
> > >>> I believe the issue is here:
> > >>>
> > >>> https://github.com/apache/cloudstack/pull/1579
> > >>>
> > >>> In ConfigurationManagerImpl.java, it appears the lines that led
> > >>> to NPEs being thrown were added on lines 2924 – 2926:
> > >>>
> > >>> https://github.com/apache/cloudstack/pull/1579/files
> > >>>
> > >>> On 2/16/17, 2:42 AM, "Wido den Hollander" <wi...@widodh.nl>
> > >>> wrote:
> > >>>
> > >>>> Op 16 februari 2017 om 6:21 schreef Rajani Karuturi
> > >>> <ra...@apache.org>:
> > >>>>
> > >>>>
> > >>>> unfortunately, running one set of tests itself is very time
> > >>>> consuming(multiplied by hypervisors, network modes etc. its
> > >>>> impossible to run all)
> > >>>>
> > >>>> If I remember correctly, wido tested it with PR 1700 (IPV6 in
> > >>>> basic networking)
> > >>>>
> > >>>
> > >>> I highly doubt it's PR 1700 which is causing this. The PR I have
> > >>> open to fix a issue ONLY applies if IPv6 has been set.
> > >>>
> > >>> PR 1700 only does something when you have set a IPv6 subnet in
> > >>> the 'vlan' table:
> > >>> https://github.com/apache/cloudstack/commit/
> > >> c0e7766713b2631a167c2ceea7d42b574a5cd1b9#diff-
> > >> f90fdac6810fd89f89e827309a41d180R231
> > >>>
> > >>> So I don't think it's caused by this since you NIC table will
> > >>> not be filled with IPv6 addresses afterwards.
> > >>>
> > >>> Wido
> > >>>
> > >>>> Can you try a commit before and a commit after that PR?
> > >>>>
> > >>>> Thanks,
> > >>>>
> > >>>> ~ Rajani
> > >>>>
> > >>>> http://cloudplatform.accelerite.com/
> > >>>>
> > >>>> On February 16, 2017 at 1:02 AM, Tutkowski, Mike
> > >>>> (Mike.Tutkowski@netapp.com) wrote:
> > >>>>
> > >>>> Thanks for noting that PR, Rene. I tried building a Basic Zone
> > >>>> making use of code from that PR, but – unfortunately – I still
> > >>>> get an exception (below).
> > >>>>
> > >>>> On a related note, does this mean we don’t run any integration
> > >>>> tests that build a Basic Zone before we OK a PR to be checked
> > >>> in?
> > >>>>
> > >>>> ERROR [c.c.a.ApiServer] (qtp555984412-267:ctx-a904cbd0
> > >>>> ctx-062a000a) (logid:30f5a3ec) unhandled exception executing
> > >>> api
> > >>>> command: [Ljava.lang.String;@4732a98c
> > >>>> java.lang.NullPointerException
> > >>>> at
> > >>>> com.cloud.utils.net.NetUtils.getCidrNetmask(NetUtils.java:956)
> > >>>> at
> > >>>>
> > >>> com.cloud.configuration.ConfigurationManagerImpl.validateIpRange(
> > >> ConfigurationManagerImpl.java:2924)
> > >>>> at
> > >>>>
> > >>> com.cloud.configuration.ConfigurationManagerImpl.
> > >> createVlanAndPublicIpRange(ConfigurationManagerImpl.java:2822)
> > >>>> 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:498)
> > >>>> at
> > >>>>
> > >>> org.springframework.aop.support.AopUtils.
> > invokeJoinpointUsingReflection
> > >> (AopUtils.java:333)
> > >>>> at
> > >>>>
> > >>> org.springframework.aop.framework.ReflectiveMethodInvocation.
> > >> invokeJoinpoint(ReflectiveMethodInvocation.java:190)
> > >>>> at
> > >>>>
> > >>> org.springframework.aop.framework.ReflectiveMethodInvocation.
> proceed(
> > >> ReflectiveMethodInvocation.java:157)
> > >>>> at
> > >>>>
> > >>> org.apache.cloudstack.network.contrail.management.
> > >> EventUtils$EventInterceptor.invoke(EventUtils.java:107)
> > >>>> at
> > >>>>
> > >>> org.springframework.aop.framework.ReflectiveMethodInvocation.
> proceed(
> > >> ReflectiveMethodInvocation.java:168)
> > >>>> at
> > >>>>
> > >>> com.cloud.event.ActionEventInterceptor.invoke(
> > >> ActionEventInterceptor.java:51)
> > >>>> at
> > >>>>
> > >>> org.springframework.aop.framework.ReflectiveMethodInvocation.
> proceed(
> > >> ReflectiveMethodInvocation.java:168)
> > >>>> at
> > >>>>
> > >>> org.springframework.aop.interceptor.ExposeInvocationInterceptor.
> > invoke(
> > >> ExposeInvocationInterceptor.java:92)
> > >>>> at
> > >>>>
> > >>> org.springframework.aop.framework.ReflectiveMethodInvocation.
> proceed(
> > >> ReflectiveMethodInvocation.java:179)
> > >>>> at
> > >>>>
> > >>> org.springframework.aop.framework.JdkDynamicAopProxy.
> > >> invoke(JdkDynamicAopProxy.java:213)
> > >>>> at com.sun.proxy.$Proxy126.createVlanAndPublicIpRange(Unknown
> > >>>> Source)
> > >>>> at
> > >>>>
> > >>> org.apache.cloudstack.api.command.admin.vlan.
> > >> CreateVlanIpRangeCmd.execute(CreateVlanIpRangeCmd.java:219)
> > >>>> at
> > >>> com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:150)
> > >>>> at com.cloud.api.ApiServer.queueCommand(ApiServer.java:709)
> > >>>> at com.cloud.api.ApiServer.handleRequest(ApiServer.java:533)
> > >>>> at
> > >>>>
> > >>> com.cloud.api.ApiServlet.processRequestInContext(
> ApiServlet.java:299)
> > >>>> at com.cloud.api.ApiServlet$1.run(ApiServlet.java:129)
> > >>>> at
> > >>>>
> > >>> org.apache.cloudstack.managed.context.impl.
> > DefaultManagedContext$1.call(
> > >> DefaultManagedContext.java:56)
> > >>>> at
> > >>>>
> > >>> org.apache.cloudstack.managed.context.impl.DefaultManagedContext.
> > >> callWithContext(DefaultManagedContext.java:103)
> > >>>> at
> > >>>>
> > >>> org.apache.cloudstack.managed.context.impl.DefaultManagedContext.
> > >> runWithContext(DefaultManagedContext.java:53)
> > >>>> at
> > >>> com.cloud.api.ApiServlet.processRequest(ApiServlet.java:126)
> > >>>> at com.cloud.api.ApiServlet.doGet(ApiServlet.java:88)
> > >>>> at
> > >>> javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
> > >>>> at
> > >>> javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
> > >>>> at
> > >>>>
> > >>> org.eclipse.jetty.servlet.ServletHolder.handle(
> ServletHolder.java:812)
> > >>>> at
> > >>>>
> > >>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.
> > >> doFilter(ServletHandler.java:1669)
> > >>>> at
> > >>>>
> > >>> org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(
> > >> WebSocketUpgradeFilter.java:189)
> > >>>> at
> > >>>>
> > >>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.
> > >> doFilter(ServletHandler.java:1652)
> > >>>> at
> > >>>>
> > >>> org.eclipse.jetty.servlet.ServletHandler.doHandle(
> > >> ServletHandler.java:585)
> > >>>> at
> > >>>>
> > >>> org.eclipse.jetty.server.handler.ScopedHandler.handle(
> > >> ScopedHandler.java:143)
> > >>>> at
> > >>>>
> > >>> org.eclipse.jetty.security.SecurityHandler.handle(
> > >> SecurityHandler.java:577)
> > >>>> at
> > >>>>
> > >>> org.eclipse.jetty.server.session.SessionHandler.
> > >> doHandle(SessionHandler.java:223)
> > >>>> at
> > >>>>
> > >>> org.eclipse.jetty.server.handler.ContextHandler.
> > >> doHandle(ContextHandler.java:1127)
> > >>>> at
> > >>>>
> > >>> org.eclipse.jetty.servlet.ServletHandler.doScope(
> > >> ServletHandler.java:515)
> > >>>> at
> > >>>>
> > >>> org.eclipse.jetty.server.session.SessionHandler.
> > >> doScope(SessionHandler.java:185)
> > >>>> at
> > >>>>
> > >>> org.eclipse.jetty.server.handler.ContextHandler.
> > >> doScope(ContextHandler.java:1061)
> > >>>> at
> > >>>>
> > >>> org.eclipse.jetty.server.handler.ScopedHandler.handle(
> > >> ScopedHandler.java:141)
> > >>>> at
> > >>>>
> > >>> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(
> > >> ContextHandlerCollection.java:215)
> > >>>> at
> > >>>>
> > >>> org.eclipse.jetty.server.handler.HandlerCollection.
> > >> handle(HandlerCollection.java:110)
> > >>>> at
> > >>>>
> > >>> org.eclipse.jetty.server.handler.HandlerWrapper.handle(
> > >> HandlerWrapper.java:97)
> > >>>> at org.eclipse.jetty.server.Server.handle(Server.java:499)
> > >>>> at
> > >>>>
> > >>> org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
> > >>>> at
> > >>>>
> > >>> org.eclipse.jetty.server.HttpConnection.onFillable(
> > >> HttpConnection.java:258)
> > >>>> at
> > >>>>
> > >>> org.eclipse.jetty.io.AbstractConnection$2.run(
> > >> AbstractConnection.java:544)
> > >>>> at
> > >>>>
> > >>> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(
> > >> QueuedThreadPool.java:635)
> > >>>> at
> > >>>>
> > >>> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(
> > >> QueuedThreadPool.java:555)
> > >>>> at java.lang.Thread.run(Thread.java:745)
> > >>>>
> > >>>> On 2/15/17, 12:52 AM, "Tutkowski, Mike"
> > >>>> <Mi...@netapp.com> wrote:
> > >>>>
> > >>>> Thanks for pointing this out.
> > >>>>
> > >>>> I can incorporate those changes in the morning and see if it
> > >>>> does the trick.
> > >>>>
> > >>>>> On Feb 15, 2017, at 12:50 AM, Rene Moser
> > >>> <ma...@renemoser.net>
> > >>>> wrote:
> > >>>>>
> > >>>>> Probably related to
> > >>>> https://github.com/apache/cloudstack/pull/1927
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>>> On 02/14/2017 10:44 PM, Tutkowski, Mike wrote:
> > >>>>>> Hi,
> > >>>>>>
> > >>>>>> I’m getting a NullPointerException when trying to create a
> > >>>> zone using master.
> > >>>>>>
> > >>>>>> Below is the relevant code in ConfigurationManagerImpl.
> > >>>>>>
> > >>>>>> In the else block, network.getCidr() returns null and
> > >>>> NetUtil.getCidrNetmask then throws a NullPointerException.
> > >>>>>>
> > >>>>>> I noticed that network.getGateway() also returns null
> > >>> (which
> > >>>> seems odd).
> > >>>>>>
> > >>>>>> Thoughts on this?
> > >>>>>>
> > >>>>>> Thanks!
> > >>>>>> Mike
> > >>>>>>
> > >>>>>> public Pair<Boolean, Pair<String, String>>
> > >>>> validateIpRange(final String startIP, final String endIP,
> > >>> final
> > >>>> String newVlanGateway, final String newVlanNetmask, final
> > >>>> List<VlanVO> vlans, final boolean ipv4,
> > >>>>>> final boolean ipv6, String ip6Gateway, String ip6Cidr,
> > >>> final
> > >>>> String startIPv6, final String endIPv6, final Network network)
> > >>> {
> > >>>>>> String vlanGateway = null;
> > >>>>>> String vlanNetmask = null;
> > >>>>>> boolean sameSubnet = false;
> > >>>>>> if (CollectionUtils.isNotEmpty(vlans)) {
> > >>>>>> for (final VlanVO vlan : vlans) {
> > >>>>>> vlanGateway = vlan.getVlanGateway();
> > >>>>>> vlanNetmask = vlan.getVlanNetmask();
> > >>>>>> sameSubnet = hasSameSubnet(ipv4, vlanGateway, vlanNetmask,
> > >>>> newVlanGateway, newVlanNetmask, startIP, endIP,
> > >>>>>> ipv6, ip6Gateway, ip6Cidr, startIPv6, endIPv6, network);
> > >>>>>> if (sameSubnet) break;
> > >>>>>> }
> > >>>>>> } else {
> > >>>>>> vlanGateway = network.getGateway();
> > >>>>>> vlanNetmask = NetUtils.getCidrNetmask(network.getCidr());
> > >>
> >
>

Re: Can't create a zone using master

Posted by Kris Sterckx <kr...@nuagenetworks.net>.
Thanks Mike

Investigating.

Kris

On 17 February 2017 at 08:18, Tutkowski, Mike <Mi...@netapp.com>
wrote:

> I added a comment on the code of the relevant PR, but the PR is in the
> Merged state, so I don't know if people receive e-mail notifications then.
>
> > On Feb 17, 2017, at 12:16 AM, Wei ZHOU <us...@gmail.com> wrote:
> >
> > Maybe we need ask Nuage why the lines are added.
> >
> >
> > 2017-02-17 7:54 GMT+01:00 Tutkowski, Mike <Mi...@netapp.com>:
> >
> >> Hopefully we can now find someone with experience in CloudStack's
> >> networking code to tell us if that fix is OK or if that was just a
> Band-Aid
> >> and we should do something more thorough to correct the issue.
> >>
> >>> On Feb 16, 2017, at 11:48 PM, Rajani Karuturi <ra...@apache.org>
> wrote:
> >>>
> >>> Thanks for digging it Mike.
> >>>
> >>> ~ Rajani
> >>>
> >>> http://cloudplatform.accelerite.com/
> >>>
> >>> On February 17, 2017 at 12:18 AM, Tutkowski, Mike
> >>> (Mike.Tutkowski@netapp.com) wrote:
> >>>
> >>> Hi,
> >>>
> >>> I opened a blocker for 4.10 regarding this issue:
> >>>
> >>> https://issues.apache.org/jira/browse/CLOUDSTACK-9790
> >>>
> >>> Thanks,
> >>> Mike
> >>>
> >>> On 2/16/17, 8:35 AM, "Tutkowski, Mike"
> >>> <Mi...@netapp.com> wrote:
> >>>
> >>> I believe the issue is here:
> >>>
> >>> https://github.com/apache/cloudstack/pull/1579
> >>>
> >>> In ConfigurationManagerImpl.java, it appears the lines that led
> >>> to NPEs being thrown were added on lines 2924 – 2926:
> >>>
> >>> https://github.com/apache/cloudstack/pull/1579/files
> >>>
> >>> On 2/16/17, 2:42 AM, "Wido den Hollander" <wi...@widodh.nl>
> >>> wrote:
> >>>
> >>>> Op 16 februari 2017 om 6:21 schreef Rajani Karuturi
> >>> <ra...@apache.org>:
> >>>>
> >>>>
> >>>> unfortunately, running one set of tests itself is very time
> >>>> consuming(multiplied by hypervisors, network modes etc. its
> >>>> impossible to run all)
> >>>>
> >>>> If I remember correctly, wido tested it with PR 1700 (IPV6 in
> >>>> basic networking)
> >>>>
> >>>
> >>> I highly doubt it's PR 1700 which is causing this. The PR I have
> >>> open to fix a issue ONLY applies if IPv6 has been set.
> >>>
> >>> PR 1700 only does something when you have set a IPv6 subnet in
> >>> the 'vlan' table:
> >>> https://github.com/apache/cloudstack/commit/
> >> c0e7766713b2631a167c2ceea7d42b574a5cd1b9#diff-
> >> f90fdac6810fd89f89e827309a41d180R231
> >>>
> >>> So I don't think it's caused by this since you NIC table will
> >>> not be filled with IPv6 addresses afterwards.
> >>>
> >>> Wido
> >>>
> >>>> Can you try a commit before and a commit after that PR?
> >>>>
> >>>> Thanks,
> >>>>
> >>>> ~ Rajani
> >>>>
> >>>> http://cloudplatform.accelerite.com/
> >>>>
> >>>> On February 16, 2017 at 1:02 AM, Tutkowski, Mike
> >>>> (Mike.Tutkowski@netapp.com) wrote:
> >>>>
> >>>> Thanks for noting that PR, Rene. I tried building a Basic Zone
> >>>> making use of code from that PR, but – unfortunately – I still
> >>>> get an exception (below).
> >>>>
> >>>> On a related note, does this mean we don’t run any integration
> >>>> tests that build a Basic Zone before we OK a PR to be checked
> >>> in?
> >>>>
> >>>> ERROR [c.c.a.ApiServer] (qtp555984412-267:ctx-a904cbd0
> >>>> ctx-062a000a) (logid:30f5a3ec) unhandled exception executing
> >>> api
> >>>> command: [Ljava.lang.String;@4732a98c
> >>>> java.lang.NullPointerException
> >>>> at
> >>>> com.cloud.utils.net.NetUtils.getCidrNetmask(NetUtils.java:956)
> >>>> at
> >>>>
> >>> com.cloud.configuration.ConfigurationManagerImpl.validateIpRange(
> >> ConfigurationManagerImpl.java:2924)
> >>>> at
> >>>>
> >>> com.cloud.configuration.ConfigurationManagerImpl.
> >> createVlanAndPublicIpRange(ConfigurationManagerImpl.java:2822)
> >>>> 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:498)
> >>>> at
> >>>>
> >>> org.springframework.aop.support.AopUtils.
> invokeJoinpointUsingReflection
> >> (AopUtils.java:333)
> >>>> at
> >>>>
> >>> org.springframework.aop.framework.ReflectiveMethodInvocation.
> >> invokeJoinpoint(ReflectiveMethodInvocation.java:190)
> >>>> at
> >>>>
> >>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> >> ReflectiveMethodInvocation.java:157)
> >>>> at
> >>>>
> >>> org.apache.cloudstack.network.contrail.management.
> >> EventUtils$EventInterceptor.invoke(EventUtils.java:107)
> >>>> at
> >>>>
> >>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> >> ReflectiveMethodInvocation.java:168)
> >>>> at
> >>>>
> >>> com.cloud.event.ActionEventInterceptor.invoke(
> >> ActionEventInterceptor.java:51)
> >>>> at
> >>>>
> >>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> >> ReflectiveMethodInvocation.java:168)
> >>>> at
> >>>>
> >>> org.springframework.aop.interceptor.ExposeInvocationInterceptor.
> invoke(
> >> ExposeInvocationInterceptor.java:92)
> >>>> at
> >>>>
> >>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> >> ReflectiveMethodInvocation.java:179)
> >>>> at
> >>>>
> >>> org.springframework.aop.framework.JdkDynamicAopProxy.
> >> invoke(JdkDynamicAopProxy.java:213)
> >>>> at com.sun.proxy.$Proxy126.createVlanAndPublicIpRange(Unknown
> >>>> Source)
> >>>> at
> >>>>
> >>> org.apache.cloudstack.api.command.admin.vlan.
> >> CreateVlanIpRangeCmd.execute(CreateVlanIpRangeCmd.java:219)
> >>>> at
> >>> com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:150)
> >>>> at com.cloud.api.ApiServer.queueCommand(ApiServer.java:709)
> >>>> at com.cloud.api.ApiServer.handleRequest(ApiServer.java:533)
> >>>> at
> >>>>
> >>> com.cloud.api.ApiServlet.processRequestInContext(ApiServlet.java:299)
> >>>> at com.cloud.api.ApiServlet$1.run(ApiServlet.java:129)
> >>>> at
> >>>>
> >>> org.apache.cloudstack.managed.context.impl.
> DefaultManagedContext$1.call(
> >> DefaultManagedContext.java:56)
> >>>> at
> >>>>
> >>> org.apache.cloudstack.managed.context.impl.DefaultManagedContext.
> >> callWithContext(DefaultManagedContext.java:103)
> >>>> at
> >>>>
> >>> org.apache.cloudstack.managed.context.impl.DefaultManagedContext.
> >> runWithContext(DefaultManagedContext.java:53)
> >>>> at
> >>> com.cloud.api.ApiServlet.processRequest(ApiServlet.java:126)
> >>>> at com.cloud.api.ApiServlet.doGet(ApiServlet.java:88)
> >>>> at
> >>> javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
> >>>> at
> >>> javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
> >>>> at
> >>>>
> >>> org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
> >>>> at
> >>>>
> >>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.
> >> doFilter(ServletHandler.java:1669)
> >>>> at
> >>>>
> >>> org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(
> >> WebSocketUpgradeFilter.java:189)
> >>>> at
> >>>>
> >>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.
> >> doFilter(ServletHandler.java:1652)
> >>>> at
> >>>>
> >>> org.eclipse.jetty.servlet.ServletHandler.doHandle(
> >> ServletHandler.java:585)
> >>>> at
> >>>>
> >>> org.eclipse.jetty.server.handler.ScopedHandler.handle(
> >> ScopedHandler.java:143)
> >>>> at
> >>>>
> >>> org.eclipse.jetty.security.SecurityHandler.handle(
> >> SecurityHandler.java:577)
> >>>> at
> >>>>
> >>> org.eclipse.jetty.server.session.SessionHandler.
> >> doHandle(SessionHandler.java:223)
> >>>> at
> >>>>
> >>> org.eclipse.jetty.server.handler.ContextHandler.
> >> doHandle(ContextHandler.java:1127)
> >>>> at
> >>>>
> >>> org.eclipse.jetty.servlet.ServletHandler.doScope(
> >> ServletHandler.java:515)
> >>>> at
> >>>>
> >>> org.eclipse.jetty.server.session.SessionHandler.
> >> doScope(SessionHandler.java:185)
> >>>> at
> >>>>
> >>> org.eclipse.jetty.server.handler.ContextHandler.
> >> doScope(ContextHandler.java:1061)
> >>>> at
> >>>>
> >>> org.eclipse.jetty.server.handler.ScopedHandler.handle(
> >> ScopedHandler.java:141)
> >>>> at
> >>>>
> >>> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(
> >> ContextHandlerCollection.java:215)
> >>>> at
> >>>>
> >>> org.eclipse.jetty.server.handler.HandlerCollection.
> >> handle(HandlerCollection.java:110)
> >>>> at
> >>>>
> >>> org.eclipse.jetty.server.handler.HandlerWrapper.handle(
> >> HandlerWrapper.java:97)
> >>>> at org.eclipse.jetty.server.Server.handle(Server.java:499)
> >>>> at
> >>>>
> >>> org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
> >>>> at
> >>>>
> >>> org.eclipse.jetty.server.HttpConnection.onFillable(
> >> HttpConnection.java:258)
> >>>> at
> >>>>
> >>> org.eclipse.jetty.io.AbstractConnection$2.run(
> >> AbstractConnection.java:544)
> >>>> at
> >>>>
> >>> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(
> >> QueuedThreadPool.java:635)
> >>>> at
> >>>>
> >>> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(
> >> QueuedThreadPool.java:555)
> >>>> at java.lang.Thread.run(Thread.java:745)
> >>>>
> >>>> On 2/15/17, 12:52 AM, "Tutkowski, Mike"
> >>>> <Mi...@netapp.com> wrote:
> >>>>
> >>>> Thanks for pointing this out.
> >>>>
> >>>> I can incorporate those changes in the morning and see if it
> >>>> does the trick.
> >>>>
> >>>>> On Feb 15, 2017, at 12:50 AM, Rene Moser
> >>> <ma...@renemoser.net>
> >>>> wrote:
> >>>>>
> >>>>> Probably related to
> >>>> https://github.com/apache/cloudstack/pull/1927
> >>>>>
> >>>>>
> >>>>>
> >>>>>> On 02/14/2017 10:44 PM, Tutkowski, Mike wrote:
> >>>>>> Hi,
> >>>>>>
> >>>>>> I’m getting a NullPointerException when trying to create a
> >>>> zone using master.
> >>>>>>
> >>>>>> Below is the relevant code in ConfigurationManagerImpl.
> >>>>>>
> >>>>>> In the else block, network.getCidr() returns null and
> >>>> NetUtil.getCidrNetmask then throws a NullPointerException.
> >>>>>>
> >>>>>> I noticed that network.getGateway() also returns null
> >>> (which
> >>>> seems odd).
> >>>>>>
> >>>>>> Thoughts on this?
> >>>>>>
> >>>>>> Thanks!
> >>>>>> Mike
> >>>>>>
> >>>>>> public Pair<Boolean, Pair<String, String>>
> >>>> validateIpRange(final String startIP, final String endIP,
> >>> final
> >>>> String newVlanGateway, final String newVlanNetmask, final
> >>>> List<VlanVO> vlans, final boolean ipv4,
> >>>>>> final boolean ipv6, String ip6Gateway, String ip6Cidr,
> >>> final
> >>>> String startIPv6, final String endIPv6, final Network network)
> >>> {
> >>>>>> String vlanGateway = null;
> >>>>>> String vlanNetmask = null;
> >>>>>> boolean sameSubnet = false;
> >>>>>> if (CollectionUtils.isNotEmpty(vlans)) {
> >>>>>> for (final VlanVO vlan : vlans) {
> >>>>>> vlanGateway = vlan.getVlanGateway();
> >>>>>> vlanNetmask = vlan.getVlanNetmask();
> >>>>>> sameSubnet = hasSameSubnet(ipv4, vlanGateway, vlanNetmask,
> >>>> newVlanGateway, newVlanNetmask, startIP, endIP,
> >>>>>> ipv6, ip6Gateway, ip6Cidr, startIPv6, endIPv6, network);
> >>>>>> if (sameSubnet) break;
> >>>>>> }
> >>>>>> } else {
> >>>>>> vlanGateway = network.getGateway();
> >>>>>> vlanNetmask = NetUtils.getCidrNetmask(network.getCidr());
> >>
>

Re: Can't create a zone using master

Posted by "Tutkowski, Mike" <Mi...@netapp.com>.
I added a comment on the code of the relevant PR, but the PR is in the Merged state, so I don't know if people receive e-mail notifications then.

> On Feb 17, 2017, at 12:16 AM, Wei ZHOU <us...@gmail.com> wrote:
> 
> Maybe we need ask Nuage why the lines are added.
> 
> 
> 2017-02-17 7:54 GMT+01:00 Tutkowski, Mike <Mi...@netapp.com>:
> 
>> Hopefully we can now find someone with experience in CloudStack's
>> networking code to tell us if that fix is OK or if that was just a Band-Aid
>> and we should do something more thorough to correct the issue.
>> 
>>> On Feb 16, 2017, at 11:48 PM, Rajani Karuturi <ra...@apache.org> wrote:
>>> 
>>> Thanks for digging it Mike.
>>> 
>>> ~ Rajani
>>> 
>>> http://cloudplatform.accelerite.com/
>>> 
>>> On February 17, 2017 at 12:18 AM, Tutkowski, Mike
>>> (Mike.Tutkowski@netapp.com) wrote:
>>> 
>>> Hi,
>>> 
>>> I opened a blocker for 4.10 regarding this issue:
>>> 
>>> https://issues.apache.org/jira/browse/CLOUDSTACK-9790
>>> 
>>> Thanks,
>>> Mike
>>> 
>>> On 2/16/17, 8:35 AM, "Tutkowski, Mike"
>>> <Mi...@netapp.com> wrote:
>>> 
>>> I believe the issue is here:
>>> 
>>> https://github.com/apache/cloudstack/pull/1579
>>> 
>>> In ConfigurationManagerImpl.java, it appears the lines that led
>>> to NPEs being thrown were added on lines 2924 – 2926:
>>> 
>>> https://github.com/apache/cloudstack/pull/1579/files
>>> 
>>> On 2/16/17, 2:42 AM, "Wido den Hollander" <wi...@widodh.nl>
>>> wrote:
>>> 
>>>> Op 16 februari 2017 om 6:21 schreef Rajani Karuturi
>>> <ra...@apache.org>:
>>>> 
>>>> 
>>>> unfortunately, running one set of tests itself is very time
>>>> consuming(multiplied by hypervisors, network modes etc. its
>>>> impossible to run all)
>>>> 
>>>> If I remember correctly, wido tested it with PR 1700 (IPV6 in
>>>> basic networking)
>>>> 
>>> 
>>> I highly doubt it's PR 1700 which is causing this. The PR I have
>>> open to fix a issue ONLY applies if IPv6 has been set.
>>> 
>>> PR 1700 only does something when you have set a IPv6 subnet in
>>> the 'vlan' table:
>>> https://github.com/apache/cloudstack/commit/
>> c0e7766713b2631a167c2ceea7d42b574a5cd1b9#diff-
>> f90fdac6810fd89f89e827309a41d180R231
>>> 
>>> So I don't think it's caused by this since you NIC table will
>>> not be filled with IPv6 addresses afterwards.
>>> 
>>> Wido
>>> 
>>>> Can you try a commit before and a commit after that PR?
>>>> 
>>>> Thanks,
>>>> 
>>>> ~ Rajani
>>>> 
>>>> http://cloudplatform.accelerite.com/
>>>> 
>>>> On February 16, 2017 at 1:02 AM, Tutkowski, Mike
>>>> (Mike.Tutkowski@netapp.com) wrote:
>>>> 
>>>> Thanks for noting that PR, Rene. I tried building a Basic Zone
>>>> making use of code from that PR, but – unfortunately – I still
>>>> get an exception (below).
>>>> 
>>>> On a related note, does this mean we don’t run any integration
>>>> tests that build a Basic Zone before we OK a PR to be checked
>>> in?
>>>> 
>>>> ERROR [c.c.a.ApiServer] (qtp555984412-267:ctx-a904cbd0
>>>> ctx-062a000a) (logid:30f5a3ec) unhandled exception executing
>>> api
>>>> command: [Ljava.lang.String;@4732a98c
>>>> java.lang.NullPointerException
>>>> at
>>>> com.cloud.utils.net.NetUtils.getCidrNetmask(NetUtils.java:956)
>>>> at
>>>> 
>>> com.cloud.configuration.ConfigurationManagerImpl.validateIpRange(
>> ConfigurationManagerImpl.java:2924)
>>>> at
>>>> 
>>> com.cloud.configuration.ConfigurationManagerImpl.
>> createVlanAndPublicIpRange(ConfigurationManagerImpl.java:2822)
>>>> 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:498)
>>>> at
>>>> 
>>> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection
>> (AopUtils.java:333)
>>>> at
>>>> 
>>> org.springframework.aop.framework.ReflectiveMethodInvocation.
>> invokeJoinpoint(ReflectiveMethodInvocation.java:190)
>>>> at
>>>> 
>>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
>> ReflectiveMethodInvocation.java:157)
>>>> at
>>>> 
>>> org.apache.cloudstack.network.contrail.management.
>> EventUtils$EventInterceptor.invoke(EventUtils.java:107)
>>>> at
>>>> 
>>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
>> ReflectiveMethodInvocation.java:168)
>>>> at
>>>> 
>>> com.cloud.event.ActionEventInterceptor.invoke(
>> ActionEventInterceptor.java:51)
>>>> at
>>>> 
>>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
>> ReflectiveMethodInvocation.java:168)
>>>> at
>>>> 
>>> org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(
>> ExposeInvocationInterceptor.java:92)
>>>> at
>>>> 
>>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
>> ReflectiveMethodInvocation.java:179)
>>>> at
>>>> 
>>> org.springframework.aop.framework.JdkDynamicAopProxy.
>> invoke(JdkDynamicAopProxy.java:213)
>>>> at com.sun.proxy.$Proxy126.createVlanAndPublicIpRange(Unknown
>>>> Source)
>>>> at
>>>> 
>>> org.apache.cloudstack.api.command.admin.vlan.
>> CreateVlanIpRangeCmd.execute(CreateVlanIpRangeCmd.java:219)
>>>> at
>>> com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:150)
>>>> at com.cloud.api.ApiServer.queueCommand(ApiServer.java:709)
>>>> at com.cloud.api.ApiServer.handleRequest(ApiServer.java:533)
>>>> at
>>>> 
>>> com.cloud.api.ApiServlet.processRequestInContext(ApiServlet.java:299)
>>>> at com.cloud.api.ApiServlet$1.run(ApiServlet.java:129)
>>>> at
>>>> 
>>> org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(
>> DefaultManagedContext.java:56)
>>>> at
>>>> 
>>> org.apache.cloudstack.managed.context.impl.DefaultManagedContext.
>> callWithContext(DefaultManagedContext.java:103)
>>>> at
>>>> 
>>> org.apache.cloudstack.managed.context.impl.DefaultManagedContext.
>> runWithContext(DefaultManagedContext.java:53)
>>>> at
>>> com.cloud.api.ApiServlet.processRequest(ApiServlet.java:126)
>>>> at com.cloud.api.ApiServlet.doGet(ApiServlet.java:88)
>>>> at
>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
>>>> at
>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
>>>> at
>>>> 
>>> org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
>>>> at
>>>> 
>>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.
>> doFilter(ServletHandler.java:1669)
>>>> at
>>>> 
>>> org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(
>> WebSocketUpgradeFilter.java:189)
>>>> at
>>>> 
>>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.
>> doFilter(ServletHandler.java:1652)
>>>> at
>>>> 
>>> org.eclipse.jetty.servlet.ServletHandler.doHandle(
>> ServletHandler.java:585)
>>>> at
>>>> 
>>> org.eclipse.jetty.server.handler.ScopedHandler.handle(
>> ScopedHandler.java:143)
>>>> at
>>>> 
>>> org.eclipse.jetty.security.SecurityHandler.handle(
>> SecurityHandler.java:577)
>>>> at
>>>> 
>>> org.eclipse.jetty.server.session.SessionHandler.
>> doHandle(SessionHandler.java:223)
>>>> at
>>>> 
>>> org.eclipse.jetty.server.handler.ContextHandler.
>> doHandle(ContextHandler.java:1127)
>>>> at
>>>> 
>>> org.eclipse.jetty.servlet.ServletHandler.doScope(
>> ServletHandler.java:515)
>>>> at
>>>> 
>>> org.eclipse.jetty.server.session.SessionHandler.
>> doScope(SessionHandler.java:185)
>>>> at
>>>> 
>>> org.eclipse.jetty.server.handler.ContextHandler.
>> doScope(ContextHandler.java:1061)
>>>> at
>>>> 
>>> org.eclipse.jetty.server.handler.ScopedHandler.handle(
>> ScopedHandler.java:141)
>>>> at
>>>> 
>>> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(
>> ContextHandlerCollection.java:215)
>>>> at
>>>> 
>>> org.eclipse.jetty.server.handler.HandlerCollection.
>> handle(HandlerCollection.java:110)
>>>> at
>>>> 
>>> org.eclipse.jetty.server.handler.HandlerWrapper.handle(
>> HandlerWrapper.java:97)
>>>> at org.eclipse.jetty.server.Server.handle(Server.java:499)
>>>> at
>>>> 
>>> org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
>>>> at
>>>> 
>>> org.eclipse.jetty.server.HttpConnection.onFillable(
>> HttpConnection.java:258)
>>>> at
>>>> 
>>> org.eclipse.jetty.io.AbstractConnection$2.run(
>> AbstractConnection.java:544)
>>>> at
>>>> 
>>> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(
>> QueuedThreadPool.java:635)
>>>> at
>>>> 
>>> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(
>> QueuedThreadPool.java:555)
>>>> at java.lang.Thread.run(Thread.java:745)
>>>> 
>>>> On 2/15/17, 12:52 AM, "Tutkowski, Mike"
>>>> <Mi...@netapp.com> wrote:
>>>> 
>>>> Thanks for pointing this out.
>>>> 
>>>> I can incorporate those changes in the morning and see if it
>>>> does the trick.
>>>> 
>>>>> On Feb 15, 2017, at 12:50 AM, Rene Moser
>>> <ma...@renemoser.net>
>>>> wrote:
>>>>> 
>>>>> Probably related to
>>>> https://github.com/apache/cloudstack/pull/1927
>>>>> 
>>>>> 
>>>>> 
>>>>>> On 02/14/2017 10:44 PM, Tutkowski, Mike wrote:
>>>>>> Hi,
>>>>>> 
>>>>>> I’m getting a NullPointerException when trying to create a
>>>> zone using master.
>>>>>> 
>>>>>> Below is the relevant code in ConfigurationManagerImpl.
>>>>>> 
>>>>>> In the else block, network.getCidr() returns null and
>>>> NetUtil.getCidrNetmask then throws a NullPointerException.
>>>>>> 
>>>>>> I noticed that network.getGateway() also returns null
>>> (which
>>>> seems odd).
>>>>>> 
>>>>>> Thoughts on this?
>>>>>> 
>>>>>> Thanks!
>>>>>> Mike
>>>>>> 
>>>>>> public Pair<Boolean, Pair<String, String>>
>>>> validateIpRange(final String startIP, final String endIP,
>>> final
>>>> String newVlanGateway, final String newVlanNetmask, final
>>>> List<VlanVO> vlans, final boolean ipv4,
>>>>>> final boolean ipv6, String ip6Gateway, String ip6Cidr,
>>> final
>>>> String startIPv6, final String endIPv6, final Network network)
>>> {
>>>>>> String vlanGateway = null;
>>>>>> String vlanNetmask = null;
>>>>>> boolean sameSubnet = false;
>>>>>> if (CollectionUtils.isNotEmpty(vlans)) {
>>>>>> for (final VlanVO vlan : vlans) {
>>>>>> vlanGateway = vlan.getVlanGateway();
>>>>>> vlanNetmask = vlan.getVlanNetmask();
>>>>>> sameSubnet = hasSameSubnet(ipv4, vlanGateway, vlanNetmask,
>>>> newVlanGateway, newVlanNetmask, startIP, endIP,
>>>>>> ipv6, ip6Gateway, ip6Cidr, startIPv6, endIPv6, network);
>>>>>> if (sameSubnet) break;
>>>>>> }
>>>>>> } else {
>>>>>> vlanGateway = network.getGateway();
>>>>>> vlanNetmask = NetUtils.getCidrNetmask(network.getCidr());
>> 

Re: Can't create a zone using master

Posted by Wei ZHOU <us...@gmail.com>.
Maybe we need ask Nuage why the lines are added.


2017-02-17 7:54 GMT+01:00 Tutkowski, Mike <Mi...@netapp.com>:

> Hopefully we can now find someone with experience in CloudStack's
> networking code to tell us if that fix is OK or if that was just a Band-Aid
> and we should do something more thorough to correct the issue.
>
> > On Feb 16, 2017, at 11:48 PM, Rajani Karuturi <ra...@apache.org> wrote:
> >
> > Thanks for digging it Mike.
> >
> > ~ Rajani
> >
> > http://cloudplatform.accelerite.com/
> >
> > On February 17, 2017 at 12:18 AM, Tutkowski, Mike
> > (Mike.Tutkowski@netapp.com) wrote:
> >
> > Hi,
> >
> > I opened a blocker for 4.10 regarding this issue:
> >
> > https://issues.apache.org/jira/browse/CLOUDSTACK-9790
> >
> > Thanks,
> > Mike
> >
> > On 2/16/17, 8:35 AM, "Tutkowski, Mike"
> > <Mi...@netapp.com> wrote:
> >
> > I believe the issue is here:
> >
> > https://github.com/apache/cloudstack/pull/1579
> >
> > In ConfigurationManagerImpl.java, it appears the lines that led
> > to NPEs being thrown were added on lines 2924 – 2926:
> >
> > https://github.com/apache/cloudstack/pull/1579/files
> >
> > On 2/16/17, 2:42 AM, "Wido den Hollander" <wi...@widodh.nl>
> > wrote:
> >
> >> Op 16 februari 2017 om 6:21 schreef Rajani Karuturi
> > <ra...@apache.org>:
> >>
> >>
> >> unfortunately, running one set of tests itself is very time
> >> consuming(multiplied by hypervisors, network modes etc. its
> >> impossible to run all)
> >>
> >> If I remember correctly, wido tested it with PR 1700 (IPV6 in
> >> basic networking)
> >>
> >
> > I highly doubt it's PR 1700 which is causing this. The PR I have
> > open to fix a issue ONLY applies if IPv6 has been set.
> >
> > PR 1700 only does something when you have set a IPv6 subnet in
> > the 'vlan' table:
> > https://github.com/apache/cloudstack/commit/
> c0e7766713b2631a167c2ceea7d42b574a5cd1b9#diff-
> f90fdac6810fd89f89e827309a41d180R231
> >
> > So I don't think it's caused by this since you NIC table will
> > not be filled with IPv6 addresses afterwards.
> >
> > Wido
> >
> >> Can you try a commit before and a commit after that PR?
> >>
> >> Thanks,
> >>
> >> ~ Rajani
> >>
> >> http://cloudplatform.accelerite.com/
> >>
> >> On February 16, 2017 at 1:02 AM, Tutkowski, Mike
> >> (Mike.Tutkowski@netapp.com) wrote:
> >>
> >> Thanks for noting that PR, Rene. I tried building a Basic Zone
> >> making use of code from that PR, but – unfortunately – I still
> >> get an exception (below).
> >>
> >> On a related note, does this mean we don’t run any integration
> >> tests that build a Basic Zone before we OK a PR to be checked
> > in?
> >>
> >> ERROR [c.c.a.ApiServer] (qtp555984412-267:ctx-a904cbd0
> >> ctx-062a000a) (logid:30f5a3ec) unhandled exception executing
> > api
> >> command: [Ljava.lang.String;@4732a98c
> >> java.lang.NullPointerException
> >> at
> >> com.cloud.utils.net.NetUtils.getCidrNetmask(NetUtils.java:956)
> >> at
> >>
> > com.cloud.configuration.ConfigurationManagerImpl.validateIpRange(
> ConfigurationManagerImpl.java:2924)
> >> at
> >>
> > com.cloud.configuration.ConfigurationManagerImpl.
> createVlanAndPublicIpRange(ConfigurationManagerImpl.java:2822)
> >> 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:498)
> >> at
> >>
> > org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection
> (AopUtils.java:333)
> >> at
> >>
> > org.springframework.aop.framework.ReflectiveMethodInvocation.
> invokeJoinpoint(ReflectiveMethodInvocation.java:190)
> >> at
> >>
> > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> ReflectiveMethodInvocation.java:157)
> >> at
> >>
> > org.apache.cloudstack.network.contrail.management.
> EventUtils$EventInterceptor.invoke(EventUtils.java:107)
> >> at
> >>
> > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> ReflectiveMethodInvocation.java:168)
> >> at
> >>
> > com.cloud.event.ActionEventInterceptor.invoke(
> ActionEventInterceptor.java:51)
> >> at
> >>
> > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> ReflectiveMethodInvocation.java:168)
> >> at
> >>
> > org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(
> ExposeInvocationInterceptor.java:92)
> >> at
> >>
> > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> ReflectiveMethodInvocation.java:179)
> >> at
> >>
> > org.springframework.aop.framework.JdkDynamicAopProxy.
> invoke(JdkDynamicAopProxy.java:213)
> >> at com.sun.proxy.$Proxy126.createVlanAndPublicIpRange(Unknown
> >> Source)
> >> at
> >>
> > org.apache.cloudstack.api.command.admin.vlan.
> CreateVlanIpRangeCmd.execute(CreateVlanIpRangeCmd.java:219)
> >> at
> > com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:150)
> >> at com.cloud.api.ApiServer.queueCommand(ApiServer.java:709)
> >> at com.cloud.api.ApiServer.handleRequest(ApiServer.java:533)
> >> at
> >>
> > com.cloud.api.ApiServlet.processRequestInContext(ApiServlet.java:299)
> >> at com.cloud.api.ApiServlet$1.run(ApiServlet.java:129)
> >> at
> >>
> > org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(
> DefaultManagedContext.java:56)
> >> at
> >>
> > org.apache.cloudstack.managed.context.impl.DefaultManagedContext.
> callWithContext(DefaultManagedContext.java:103)
> >> at
> >>
> > org.apache.cloudstack.managed.context.impl.DefaultManagedContext.
> runWithContext(DefaultManagedContext.java:53)
> >> at
> > com.cloud.api.ApiServlet.processRequest(ApiServlet.java:126)
> >> at com.cloud.api.ApiServlet.doGet(ApiServlet.java:88)
> >> at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
> >> at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
> >> at
> >>
> > org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
> >> at
> >>
> > org.eclipse.jetty.servlet.ServletHandler$CachedChain.
> doFilter(ServletHandler.java:1669)
> >> at
> >>
> > org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(
> WebSocketUpgradeFilter.java:189)
> >> at
> >>
> > org.eclipse.jetty.servlet.ServletHandler$CachedChain.
> doFilter(ServletHandler.java:1652)
> >> at
> >>
> > org.eclipse.jetty.servlet.ServletHandler.doHandle(
> ServletHandler.java:585)
> >> at
> >>
> > org.eclipse.jetty.server.handler.ScopedHandler.handle(
> ScopedHandler.java:143)
> >> at
> >>
> > org.eclipse.jetty.security.SecurityHandler.handle(
> SecurityHandler.java:577)
> >> at
> >>
> > org.eclipse.jetty.server.session.SessionHandler.
> doHandle(SessionHandler.java:223)
> >> at
> >>
> > org.eclipse.jetty.server.handler.ContextHandler.
> doHandle(ContextHandler.java:1127)
> >> at
> >>
> > org.eclipse.jetty.servlet.ServletHandler.doScope(
> ServletHandler.java:515)
> >> at
> >>
> > org.eclipse.jetty.server.session.SessionHandler.
> doScope(SessionHandler.java:185)
> >> at
> >>
> > org.eclipse.jetty.server.handler.ContextHandler.
> doScope(ContextHandler.java:1061)
> >> at
> >>
> > org.eclipse.jetty.server.handler.ScopedHandler.handle(
> ScopedHandler.java:141)
> >> at
> >>
> > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(
> ContextHandlerCollection.java:215)
> >> at
> >>
> > org.eclipse.jetty.server.handler.HandlerCollection.
> handle(HandlerCollection.java:110)
> >> at
> >>
> > org.eclipse.jetty.server.handler.HandlerWrapper.handle(
> HandlerWrapper.java:97)
> >> at org.eclipse.jetty.server.Server.handle(Server.java:499)
> >> at
> >>
> > org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
> >> at
> >>
> > org.eclipse.jetty.server.HttpConnection.onFillable(
> HttpConnection.java:258)
> >> at
> >>
> > org.eclipse.jetty.io.AbstractConnection$2.run(
> AbstractConnection.java:544)
> >> at
> >>
> > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(
> QueuedThreadPool.java:635)
> >> at
> >>
> > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(
> QueuedThreadPool.java:555)
> >> at java.lang.Thread.run(Thread.java:745)
> >>
> >> On 2/15/17, 12:52 AM, "Tutkowski, Mike"
> >> <Mi...@netapp.com> wrote:
> >>
> >> Thanks for pointing this out.
> >>
> >> I can incorporate those changes in the morning and see if it
> >> does the trick.
> >>
> >>> On Feb 15, 2017, at 12:50 AM, Rene Moser
> > <ma...@renemoser.net>
> >> wrote:
> >>>
> >>> Probably related to
> >> https://github.com/apache/cloudstack/pull/1927
> >>>
> >>>
> >>>
> >>>> On 02/14/2017 10:44 PM, Tutkowski, Mike wrote:
> >>>> Hi,
> >>>>
> >>>> I’m getting a NullPointerException when trying to create a
> >> zone using master.
> >>>>
> >>>> Below is the relevant code in ConfigurationManagerImpl.
> >>>>
> >>>> In the else block, network.getCidr() returns null and
> >> NetUtil.getCidrNetmask then throws a NullPointerException.
> >>>>
> >>>> I noticed that network.getGateway() also returns null
> > (which
> >> seems odd).
> >>>>
> >>>> Thoughts on this?
> >>>>
> >>>> Thanks!
> >>>> Mike
> >>>>
> >>>> public Pair<Boolean, Pair<String, String>>
> >> validateIpRange(final String startIP, final String endIP,
> > final
> >> String newVlanGateway, final String newVlanNetmask, final
> >> List<VlanVO> vlans, final boolean ipv4,
> >>>> final boolean ipv6, String ip6Gateway, String ip6Cidr,
> > final
> >> String startIPv6, final String endIPv6, final Network network)
> > {
> >>>> String vlanGateway = null;
> >>>> String vlanNetmask = null;
> >>>> boolean sameSubnet = false;
> >>>> if (CollectionUtils.isNotEmpty(vlans)) {
> >>>> for (final VlanVO vlan : vlans) {
> >>>> vlanGateway = vlan.getVlanGateway();
> >>>> vlanNetmask = vlan.getVlanNetmask();
> >>>> sameSubnet = hasSameSubnet(ipv4, vlanGateway, vlanNetmask,
> >> newVlanGateway, newVlanNetmask, startIP, endIP,
> >>>> ipv6, ip6Gateway, ip6Cidr, startIPv6, endIPv6, network);
> >>>> if (sameSubnet) break;
> >>>> }
> >>>> } else {
> >>>> vlanGateway = network.getGateway();
> >>>> vlanNetmask = NetUtils.getCidrNetmask(network.getCidr());
>

Re: Can't create a zone using master

Posted by "Tutkowski, Mike" <Mi...@netapp.com>.
Hopefully we can now find someone with experience in CloudStack's networking code to tell us if that fix is OK or if that was just a Band-Aid and we should do something more thorough to correct the issue.

> On Feb 16, 2017, at 11:48 PM, Rajani Karuturi <ra...@apache.org> wrote:
> 
> Thanks for digging it Mike.
> 
> ~ Rajani
> 
> http://cloudplatform.accelerite.com/
> 
> On February 17, 2017 at 12:18 AM, Tutkowski, Mike
> (Mike.Tutkowski@netapp.com) wrote:
> 
> Hi,
> 
> I opened a blocker for 4.10 regarding this issue:
> 
> https://issues.apache.org/jira/browse/CLOUDSTACK-9790
> 
> Thanks,
> Mike
> 
> On 2/16/17, 8:35 AM, "Tutkowski, Mike"
> <Mi...@netapp.com> wrote:
> 
> I believe the issue is here:
> 
> https://github.com/apache/cloudstack/pull/1579
> 
> In ConfigurationManagerImpl.java, it appears the lines that led
> to NPEs being thrown were added on lines 2924 – 2926:
> 
> https://github.com/apache/cloudstack/pull/1579/files
> 
> On 2/16/17, 2:42 AM, "Wido den Hollander" <wi...@widodh.nl>
> wrote:
> 
>> Op 16 februari 2017 om 6:21 schreef Rajani Karuturi
> <ra...@apache.org>:
>> 
>> 
>> unfortunately, running one set of tests itself is very time
>> consuming(multiplied by hypervisors, network modes etc. its
>> impossible to run all)
>> 
>> If I remember correctly, wido tested it with PR 1700 (IPV6 in
>> basic networking)
>> 
> 
> I highly doubt it's PR 1700 which is causing this. The PR I have
> open to fix a issue ONLY applies if IPv6 has been set.
> 
> PR 1700 only does something when you have set a IPv6 subnet in
> the 'vlan' table:
> https://github.com/apache/cloudstack/commit/c0e7766713b2631a167c2ceea7d42b574a5cd1b9#diff-f90fdac6810fd89f89e827309a41d180R231
> 
> So I don't think it's caused by this since you NIC table will
> not be filled with IPv6 addresses afterwards.
> 
> Wido
> 
>> Can you try a commit before and a commit after that PR?
>> 
>> Thanks,
>> 
>> ~ Rajani
>> 
>> http://cloudplatform.accelerite.com/
>> 
>> On February 16, 2017 at 1:02 AM, Tutkowski, Mike
>> (Mike.Tutkowski@netapp.com) wrote:
>> 
>> Thanks for noting that PR, Rene. I tried building a Basic Zone
>> making use of code from that PR, but – unfortunately – I still
>> get an exception (below).
>> 
>> On a related note, does this mean we don’t run any integration
>> tests that build a Basic Zone before we OK a PR to be checked
> in?
>> 
>> ERROR [c.c.a.ApiServer] (qtp555984412-267:ctx-a904cbd0
>> ctx-062a000a) (logid:30f5a3ec) unhandled exception executing
> api
>> command: [Ljava.lang.String;@4732a98c
>> java.lang.NullPointerException
>> at
>> com.cloud.utils.net.NetUtils.getCidrNetmask(NetUtils.java:956)
>> at
>> 
> com.cloud.configuration.ConfigurationManagerImpl.validateIpRange(ConfigurationManagerImpl.java:2924)
>> at
>> 
> com.cloud.configuration.ConfigurationManagerImpl.createVlanAndPublicIpRange(ConfigurationManagerImpl.java:2822)
>> 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:498)
>> at
>> 
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
>> at
>> 
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
>> at
>> 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
>> at
>> 
> org.apache.cloudstack.network.contrail.management.EventUtils$EventInterceptor.invoke(EventUtils.java:107)
>> at
>> 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168)
>> at
>> 
> com.cloud.event.ActionEventInterceptor.invoke(ActionEventInterceptor.java:51)
>> at
>> 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168)
>> at
>> 
> org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
>> at
>> 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
>> at
>> 
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
>> at com.sun.proxy.$Proxy126.createVlanAndPublicIpRange(Unknown
>> Source)
>> at
>> 
> org.apache.cloudstack.api.command.admin.vlan.CreateVlanIpRangeCmd.execute(CreateVlanIpRangeCmd.java:219)
>> at
> com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:150)
>> at com.cloud.api.ApiServer.queueCommand(ApiServer.java:709)
>> at com.cloud.api.ApiServer.handleRequest(ApiServer.java:533)
>> at
>> 
> com.cloud.api.ApiServlet.processRequestInContext(ApiServlet.java:299)
>> at com.cloud.api.ApiServlet$1.run(ApiServlet.java:129)
>> at
>> 
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)
>> at
>> 
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)
>> at
>> 
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
>> at
> com.cloud.api.ApiServlet.processRequest(ApiServlet.java:126)
>> at com.cloud.api.ApiServlet.doGet(ApiServlet.java:88)
>> at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
>> at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
>> at
>> 
> org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
>> at
>> 
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
>> at
>> 
> org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:189)
>> at
>> 
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
>> at
>> 
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
>> at
>> 
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
>> at
>> 
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
>> at
>> 
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
>> at
>> 
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
>> at
>> 
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
>> at
>> 
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
>> at
>> 
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
>> at
>> 
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
>> at
>> 
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
>> at
>> 
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
>> at
>> 
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
>> at org.eclipse.jetty.server.Server.handle(Server.java:499)
>> at
>> 
> org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
>> at
>> 
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:258)
>> at
>> 
> org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
>> at
>> 
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
>> at
>> 
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
>> at java.lang.Thread.run(Thread.java:745)
>> 
>> On 2/15/17, 12:52 AM, "Tutkowski, Mike"
>> <Mi...@netapp.com> wrote:
>> 
>> Thanks for pointing this out.
>> 
>> I can incorporate those changes in the morning and see if it
>> does the trick.
>> 
>>> On Feb 15, 2017, at 12:50 AM, Rene Moser
> <ma...@renemoser.net>
>> wrote:
>>> 
>>> Probably related to
>> https://github.com/apache/cloudstack/pull/1927
>>> 
>>> 
>>> 
>>>> On 02/14/2017 10:44 PM, Tutkowski, Mike wrote:
>>>> Hi,
>>>> 
>>>> I’m getting a NullPointerException when trying to create a
>> zone using master.
>>>> 
>>>> Below is the relevant code in ConfigurationManagerImpl.
>>>> 
>>>> In the else block, network.getCidr() returns null and
>> NetUtil.getCidrNetmask then throws a NullPointerException.
>>>> 
>>>> I noticed that network.getGateway() also returns null
> (which
>> seems odd).
>>>> 
>>>> Thoughts on this?
>>>> 
>>>> Thanks!
>>>> Mike
>>>> 
>>>> public Pair<Boolean, Pair<String, String>>
>> validateIpRange(final String startIP, final String endIP,
> final
>> String newVlanGateway, final String newVlanNetmask, final
>> List<VlanVO> vlans, final boolean ipv4,
>>>> final boolean ipv6, String ip6Gateway, String ip6Cidr,
> final
>> String startIPv6, final String endIPv6, final Network network)
> {
>>>> String vlanGateway = null;
>>>> String vlanNetmask = null;
>>>> boolean sameSubnet = false;
>>>> if (CollectionUtils.isNotEmpty(vlans)) {
>>>> for (final VlanVO vlan : vlans) {
>>>> vlanGateway = vlan.getVlanGateway();
>>>> vlanNetmask = vlan.getVlanNetmask();
>>>> sameSubnet = hasSameSubnet(ipv4, vlanGateway, vlanNetmask,
>> newVlanGateway, newVlanNetmask, startIP, endIP,
>>>> ipv6, ip6Gateway, ip6Cidr, startIPv6, endIPv6, network);
>>>> if (sameSubnet) break;
>>>> }
>>>> } else {
>>>> vlanGateway = network.getGateway();
>>>> vlanNetmask = NetUtils.getCidrNetmask(network.getCidr());

Re: Can't create a zone using master

Posted by Rajani Karuturi <ra...@apache.org>.
Thanks for digging it Mike.

~ Rajani

http://cloudplatform.accelerite.com/

On February 17, 2017 at 12:18 AM, Tutkowski, Mike
(Mike.Tutkowski@netapp.com) wrote:

Hi,

I opened a blocker for 4.10 regarding this issue:

https://issues.apache.org/jira/browse/CLOUDSTACK-9790

Thanks,
Mike

On 2/16/17, 8:35 AM, "Tutkowski, Mike"
<Mi...@netapp.com> wrote:

I believe the issue is here:

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

In ConfigurationManagerImpl.java, it appears the lines that led
to NPEs being thrown were added on lines 2924 – 2926:

https://github.com/apache/cloudstack/pull/1579/files

On 2/16/17, 2:42 AM, "Wido den Hollander" <wi...@widodh.nl>
wrote:

> Op 16 februari 2017 om 6:21 schreef Rajani Karuturi
<ra...@apache.org>:
>
>
> unfortunately, running one set of tests itself is very time
> consuming(multiplied by hypervisors, network modes etc. its
> impossible to run all)
>
> If I remember correctly, wido tested it with PR 1700 (IPV6 in
> basic networking)
>

I highly doubt it's PR 1700 which is causing this. The PR I have
open to fix a issue ONLY applies if IPv6 has been set.

PR 1700 only does something when you have set a IPv6 subnet in
the 'vlan' table:
https://github.com/apache/cloudstack/commit/c0e7766713b2631a167c2ceea7d42b574a5cd1b9#diff-f90fdac6810fd89f89e827309a41d180R231

So I don't think it's caused by this since you NIC table will
not be filled with IPv6 addresses afterwards.

Wido

> Can you try a commit before and a commit after that PR?
>
> Thanks,
>
> ~ Rajani
>
> http://cloudplatform.accelerite.com/
>
> On February 16, 2017 at 1:02 AM, Tutkowski, Mike
> (Mike.Tutkowski@netapp.com) wrote:
>
> Thanks for noting that PR, Rene. I tried building a Basic Zone
> making use of code from that PR, but – unfortunately – I still
> get an exception (below).
>
> On a related note, does this mean we don’t run any integration
> tests that build a Basic Zone before we OK a PR to be checked
in?
>
> ERROR [c.c.a.ApiServer] (qtp555984412-267:ctx-a904cbd0
> ctx-062a000a) (logid:30f5a3ec) unhandled exception executing
api
> command: [Ljava.lang.String;@4732a98c
> java.lang.NullPointerException
> at
> com.cloud.utils.net.NetUtils.getCidrNetmask(NetUtils.java:956)
> at
>
com.cloud.configuration.ConfigurationManagerImpl.validateIpRange(ConfigurationManagerImpl.java:2924)
> at
>
com.cloud.configuration.ConfigurationManagerImpl.createVlanAndPublicIpRange(ConfigurationManagerImpl.java:2822)
> 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:498)
> at
>
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
> at
>
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
> at
>
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
> at
>
org.apache.cloudstack.network.contrail.management.EventUtils$EventInterceptor.invoke(EventUtils.java:107)
> at
>
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168)
> at
>
com.cloud.event.ActionEventInterceptor.invoke(ActionEventInterceptor.java:51)
> at
>
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168)
> at
>
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
> at
>
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
> at
>
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
> at com.sun.proxy.$Proxy126.createVlanAndPublicIpRange(Unknown
> Source)
> at
>
org.apache.cloudstack.api.command.admin.vlan.CreateVlanIpRangeCmd.execute(CreateVlanIpRangeCmd.java:219)
> at
com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:150)
> at com.cloud.api.ApiServer.queueCommand(ApiServer.java:709)
> at com.cloud.api.ApiServer.handleRequest(ApiServer.java:533)
> at
>
com.cloud.api.ApiServlet.processRequestInContext(ApiServlet.java:299)
> at com.cloud.api.ApiServlet$1.run(ApiServlet.java:129)
> at
>
org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)
> at
>
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)
> at
>
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
> at
com.cloud.api.ApiServlet.processRequest(ApiServlet.java:126)
> at com.cloud.api.ApiServlet.doGet(ApiServlet.java:88)
> at
javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
> at
javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
> at
>
org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
> at
>
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
> at
>
org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:189)
> at
>
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
> at
>
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
> at
>
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
> at
>
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
> at
>
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
> at
>
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
> at
>
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
> at
>
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
> at
>
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
> at
>
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
> at
>
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
> at
>
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
> at
>
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
> at org.eclipse.jetty.server.Server.handle(Server.java:499)
> at
>
org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
> at
>
org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:258)
> at
>
org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
> at
>
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
> at
>
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
> at java.lang.Thread.run(Thread.java:745)
>
> On 2/15/17, 12:52 AM, "Tutkowski, Mike"
> <Mi...@netapp.com> wrote:
>
> Thanks for pointing this out.
>
> I can incorporate those changes in the morning and see if it
> does the trick.
>
> > On Feb 15, 2017, at 12:50 AM, Rene Moser
<ma...@renemoser.net>
> wrote:
> >
> > Probably related to
> https://github.com/apache/cloudstack/pull/1927
> >
> >
> >
> >> On 02/14/2017 10:44 PM, Tutkowski, Mike wrote:
> >> Hi,
> >>
> >> I’m getting a NullPointerException when trying to create a
> zone using master.
> >>
> >> Below is the relevant code in ConfigurationManagerImpl.
> >>
> >> In the else block, network.getCidr() returns null and
> NetUtil.getCidrNetmask then throws a NullPointerException.
> >>
> >> I noticed that network.getGateway() also returns null
(which
> seems odd).
> >>
> >> Thoughts on this?
> >>
> >> Thanks!
> >> Mike
> >>
> >> public Pair<Boolean, Pair<String, String>>
> validateIpRange(final String startIP, final String endIP,
final
> String newVlanGateway, final String newVlanNetmask, final
> List<VlanVO> vlans, final boolean ipv4,
> >> final boolean ipv6, String ip6Gateway, String ip6Cidr,
final
> String startIPv6, final String endIPv6, final Network network)
{
> >> String vlanGateway = null;
> >> String vlanNetmask = null;
> >> boolean sameSubnet = false;
> >> if (CollectionUtils.isNotEmpty(vlans)) {
> >> for (final VlanVO vlan : vlans) {
> >> vlanGateway = vlan.getVlanGateway();
> >> vlanNetmask = vlan.getVlanNetmask();
> >> sameSubnet = hasSameSubnet(ipv4, vlanGateway, vlanNetmask,
> newVlanGateway, newVlanNetmask, startIP, endIP,
> >> ipv6, ip6Gateway, ip6Cidr, startIPv6, endIPv6, network);
> >> if (sameSubnet) break;
> >> }
> >> } else {
> >> vlanGateway = network.getGateway();
> >> vlanNetmask = NetUtils.getCidrNetmask(network.getCidr());
> >>

Re: Can't create a zone using master

Posted by "Tutkowski, Mike" <Mi...@netapp.com>.
Hi,

I opened a blocker for 4.10 regarding this issue:

https://issues.apache.org/jira/browse/CLOUDSTACK-9790

Thanks,
Mike

On 2/16/17, 8:35 AM, "Tutkowski, Mike" <Mi...@netapp.com> wrote:

    I believe the issue is here:
    
    https://github.com/apache/cloudstack/pull/1579
    
    In ConfigurationManagerImpl.java, it appears the lines that led to NPEs being thrown were added on lines 2924 – 2926:
    
    https://github.com/apache/cloudstack/pull/1579/files
    
    On 2/16/17, 2:42 AM, "Wido den Hollander" <wi...@widodh.nl> wrote:
    
        
        > Op 16 februari 2017 om 6:21 schreef Rajani Karuturi <ra...@apache.org>:
        > 
        > 
        > unfortunately, running one set of tests itself is very time
        > consuming(multiplied by hypervisors, network modes etc. its
        > impossible to run all)
        > 
        > If I remember correctly, wido tested it with PR 1700 (IPV6 in
        > basic networking)
        > 
        
        I highly doubt it's PR 1700 which is causing this. The PR I have open to fix a issue ONLY applies if IPv6 has been set.
        
        PR 1700 only does something when you have set a IPv6 subnet in the 'vlan' table: https://github.com/apache/cloudstack/commit/c0e7766713b2631a167c2ceea7d42b574a5cd1b9#diff-f90fdac6810fd89f89e827309a41d180R231
        
        So I don't think it's caused by this since you NIC table will not be filled with IPv6 addresses afterwards.
        
        Wido
        
        > Can you try a commit before and a commit after that PR?
        > 
        > Thanks,
        > 
        > ~ Rajani
        > 
        > http://cloudplatform.accelerite.com/
        > 
        > On February 16, 2017 at 1:02 AM, Tutkowski, Mike
        > (Mike.Tutkowski@netapp.com) wrote:
        > 
        > Thanks for noting that PR, Rene. I tried building a Basic Zone
        > making use of code from that PR, but – unfortunately – I still
        > get an exception (below).
        > 
        > On a related note, does this mean we don’t run any integration
        > tests that build a Basic Zone before we OK a PR to be checked in?
        > 
        > ERROR [c.c.a.ApiServer] (qtp555984412-267:ctx-a904cbd0
        > ctx-062a000a) (logid:30f5a3ec) unhandled exception executing api
        > command: [Ljava.lang.String;@4732a98c
        > java.lang.NullPointerException
        > at
        > com.cloud.utils.net.NetUtils.getCidrNetmask(NetUtils.java:956)
        > at
        > com.cloud.configuration.ConfigurationManagerImpl.validateIpRange(ConfigurationManagerImpl.java:2924)
        > at
        > com.cloud.configuration.ConfigurationManagerImpl.createVlanAndPublicIpRange(ConfigurationManagerImpl.java:2822)
        > 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:498)
        > at
        > org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
        > at
        > org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
        > at
        > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
        > at
        > org.apache.cloudstack.network.contrail.management.EventUtils$EventInterceptor.invoke(EventUtils.java:107)
        > at
        > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168)
        > at
        > com.cloud.event.ActionEventInterceptor.invoke(ActionEventInterceptor.java:51)
        > at
        > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168)
        > at
        > org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
        > at
        > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
        > at
        > org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
        > at com.sun.proxy.$Proxy126.createVlanAndPublicIpRange(Unknown
        > Source)
        > at
        > org.apache.cloudstack.api.command.admin.vlan.CreateVlanIpRangeCmd.execute(CreateVlanIpRangeCmd.java:219)
        > at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:150)
        > at com.cloud.api.ApiServer.queueCommand(ApiServer.java:709)
        > at com.cloud.api.ApiServer.handleRequest(ApiServer.java:533)
        > at
        > com.cloud.api.ApiServlet.processRequestInContext(ApiServlet.java:299)
        > at com.cloud.api.ApiServlet$1.run(ApiServlet.java:129)
        > at
        > org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)
        > at
        > org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)
        > at
        > org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
        > at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:126)
        > at com.cloud.api.ApiServlet.doGet(ApiServlet.java:88)
        > at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
        > at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
        > at
        > org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
        > at
        > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
        > at
        > org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:189)
        > at
        > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
        > at
        > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
        > at
        > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
        > at
        > org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
        > at
        > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
        > at
        > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
        > at
        > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
        > at
        > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
        > at
        > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
        > at
        > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
        > at
        > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
        > at
        > org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
        > at
        > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
        > at org.eclipse.jetty.server.Server.handle(Server.java:499)
        > at
        > org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
        > at
        > org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:258)
        > at
        > org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
        > at
        > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
        > at
        > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
        > at java.lang.Thread.run(Thread.java:745)
        > 
        > On 2/15/17, 12:52 AM, "Tutkowski, Mike"
        > <Mi...@netapp.com> wrote:
        > 
        > Thanks for pointing this out.
        > 
        > I can incorporate those changes in the morning and see if it
        > does the trick.
        > 
        > > On Feb 15, 2017, at 12:50 AM, Rene Moser <ma...@renemoser.net>
        > wrote:
        > >
        > > Probably related to
        > https://github.com/apache/cloudstack/pull/1927
        > >
        > >
        > >
        > >> On 02/14/2017 10:44 PM, Tutkowski, Mike wrote:
        > >> Hi,
        > >>
        > >> I’m getting a NullPointerException when trying to create a
        > zone using master.
        > >>
        > >> Below is the relevant code in ConfigurationManagerImpl.
        > >>
        > >> In the else block, network.getCidr() returns null and
        > NetUtil.getCidrNetmask then throws a NullPointerException.
        > >>
        > >> I noticed that network.getGateway() also returns null (which
        > seems odd).
        > >>
        > >> Thoughts on this?
        > >>
        > >> Thanks!
        > >> Mike
        > >>
        > >> public Pair<Boolean, Pair<String, String>>
        > validateIpRange(final String startIP, final String endIP, final
        > String newVlanGateway, final String newVlanNetmask, final
        > List<VlanVO> vlans, final boolean ipv4,
        > >> final boolean ipv6, String ip6Gateway, String ip6Cidr, final
        > String startIPv6, final String endIPv6, final Network network) {
        > >> String vlanGateway = null;
        > >> String vlanNetmask = null;
        > >> boolean sameSubnet = false;
        > >> if (CollectionUtils.isNotEmpty(vlans)) {
        > >> for (final VlanVO vlan : vlans) {
        > >> vlanGateway = vlan.getVlanGateway();
        > >> vlanNetmask = vlan.getVlanNetmask();
        > >> sameSubnet = hasSameSubnet(ipv4, vlanGateway, vlanNetmask,
        > newVlanGateway, newVlanNetmask, startIP, endIP,
        > >> ipv6, ip6Gateway, ip6Cidr, startIPv6, endIPv6, network);
        > >> if (sameSubnet) break;
        > >> }
        > >> } else {
        > >> vlanGateway = network.getGateway();
        > >> vlanNetmask = NetUtils.getCidrNetmask(network.getCidr());
        > >>
        
    
    


Re: Can't create a zone using master

Posted by "Tutkowski, Mike" <Mi...@netapp.com>.
I believe the issue is here:

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

In ConfigurationManagerImpl.java, it appears the lines that led to NPEs being thrown were added on lines 2924 – 2926:

https://github.com/apache/cloudstack/pull/1579/files

On 2/16/17, 2:42 AM, "Wido den Hollander" <wi...@widodh.nl> wrote:

    
    > Op 16 februari 2017 om 6:21 schreef Rajani Karuturi <ra...@apache.org>:
    > 
    > 
    > unfortunately, running one set of tests itself is very time
    > consuming(multiplied by hypervisors, network modes etc. its
    > impossible to run all)
    > 
    > If I remember correctly, wido tested it with PR 1700 (IPV6 in
    > basic networking)
    > 
    
    I highly doubt it's PR 1700 which is causing this. The PR I have open to fix a issue ONLY applies if IPv6 has been set.
    
    PR 1700 only does something when you have set a IPv6 subnet in the 'vlan' table: https://github.com/apache/cloudstack/commit/c0e7766713b2631a167c2ceea7d42b574a5cd1b9#diff-f90fdac6810fd89f89e827309a41d180R231
    
    So I don't think it's caused by this since you NIC table will not be filled with IPv6 addresses afterwards.
    
    Wido
    
    > Can you try a commit before and a commit after that PR?
    > 
    > Thanks,
    > 
    > ~ Rajani
    > 
    > http://cloudplatform.accelerite.com/
    > 
    > On February 16, 2017 at 1:02 AM, Tutkowski, Mike
    > (Mike.Tutkowski@netapp.com) wrote:
    > 
    > Thanks for noting that PR, Rene. I tried building a Basic Zone
    > making use of code from that PR, but – unfortunately – I still
    > get an exception (below).
    > 
    > On a related note, does this mean we don’t run any integration
    > tests that build a Basic Zone before we OK a PR to be checked in?
    > 
    > ERROR [c.c.a.ApiServer] (qtp555984412-267:ctx-a904cbd0
    > ctx-062a000a) (logid:30f5a3ec) unhandled exception executing api
    > command: [Ljava.lang.String;@4732a98c
    > java.lang.NullPointerException
    > at
    > com.cloud.utils.net.NetUtils.getCidrNetmask(NetUtils.java:956)
    > at
    > com.cloud.configuration.ConfigurationManagerImpl.validateIpRange(ConfigurationManagerImpl.java:2924)
    > at
    > com.cloud.configuration.ConfigurationManagerImpl.createVlanAndPublicIpRange(ConfigurationManagerImpl.java:2822)
    > 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:498)
    > at
    > org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
    > at
    > org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
    > at
    > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
    > at
    > org.apache.cloudstack.network.contrail.management.EventUtils$EventInterceptor.invoke(EventUtils.java:107)
    > at
    > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168)
    > at
    > com.cloud.event.ActionEventInterceptor.invoke(ActionEventInterceptor.java:51)
    > at
    > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168)
    > at
    > org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
    > at
    > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    > at
    > org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
    > at com.sun.proxy.$Proxy126.createVlanAndPublicIpRange(Unknown
    > Source)
    > at
    > org.apache.cloudstack.api.command.admin.vlan.CreateVlanIpRangeCmd.execute(CreateVlanIpRangeCmd.java:219)
    > at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:150)
    > at com.cloud.api.ApiServer.queueCommand(ApiServer.java:709)
    > at com.cloud.api.ApiServer.handleRequest(ApiServer.java:533)
    > at
    > com.cloud.api.ApiServlet.processRequestInContext(ApiServlet.java:299)
    > at com.cloud.api.ApiServlet$1.run(ApiServlet.java:129)
    > at
    > org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)
    > at
    > org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)
    > at
    > org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
    > at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:126)
    > at com.cloud.api.ApiServlet.doGet(ApiServlet.java:88)
    > at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
    > at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    > at
    > org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
    > at
    > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
    > at
    > org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:189)
    > at
    > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
    > at
    > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
    > at
    > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
    > at
    > org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
    > at
    > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
    > at
    > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
    > at
    > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
    > at
    > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
    > at
    > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
    > at
    > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
    > at
    > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
    > at
    > org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
    > at
    > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
    > at org.eclipse.jetty.server.Server.handle(Server.java:499)
    > at
    > org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
    > at
    > org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:258)
    > at
    > org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
    > at
    > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
    > at
    > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
    > at java.lang.Thread.run(Thread.java:745)
    > 
    > On 2/15/17, 12:52 AM, "Tutkowski, Mike"
    > <Mi...@netapp.com> wrote:
    > 
    > Thanks for pointing this out.
    > 
    > I can incorporate those changes in the morning and see if it
    > does the trick.
    > 
    > > On Feb 15, 2017, at 12:50 AM, Rene Moser <ma...@renemoser.net>
    > wrote:
    > >
    > > Probably related to
    > https://github.com/apache/cloudstack/pull/1927
    > >
    > >
    > >
    > >> On 02/14/2017 10:44 PM, Tutkowski, Mike wrote:
    > >> Hi,
    > >>
    > >> I’m getting a NullPointerException when trying to create a
    > zone using master.
    > >>
    > >> Below is the relevant code in ConfigurationManagerImpl.
    > >>
    > >> In the else block, network.getCidr() returns null and
    > NetUtil.getCidrNetmask then throws a NullPointerException.
    > >>
    > >> I noticed that network.getGateway() also returns null (which
    > seems odd).
    > >>
    > >> Thoughts on this?
    > >>
    > >> Thanks!
    > >> Mike
    > >>
    > >> public Pair<Boolean, Pair<String, String>>
    > validateIpRange(final String startIP, final String endIP, final
    > String newVlanGateway, final String newVlanNetmask, final
    > List<VlanVO> vlans, final boolean ipv4,
    > >> final boolean ipv6, String ip6Gateway, String ip6Cidr, final
    > String startIPv6, final String endIPv6, final Network network) {
    > >> String vlanGateway = null;
    > >> String vlanNetmask = null;
    > >> boolean sameSubnet = false;
    > >> if (CollectionUtils.isNotEmpty(vlans)) {
    > >> for (final VlanVO vlan : vlans) {
    > >> vlanGateway = vlan.getVlanGateway();
    > >> vlanNetmask = vlan.getVlanNetmask();
    > >> sameSubnet = hasSameSubnet(ipv4, vlanGateway, vlanNetmask,
    > newVlanGateway, newVlanNetmask, startIP, endIP,
    > >> ipv6, ip6Gateway, ip6Cidr, startIPv6, endIPv6, network);
    > >> if (sameSubnet) break;
    > >> }
    > >> } else {
    > >> vlanGateway = network.getGateway();
    > >> vlanNetmask = NetUtils.getCidrNetmask(network.getCidr());
    > >>
    


Re: Can't create a zone using master

Posted by Wido den Hollander <wi...@widodh.nl>.
> Op 16 februari 2017 om 6:21 schreef Rajani Karuturi <ra...@apache.org>:
> 
> 
> unfortunately, running one set of tests itself is very time
> consuming(multiplied by hypervisors, network modes etc. its
> impossible to run all)
> 
> If I remember correctly, wido tested it with PR 1700 (IPV6 in
> basic networking)
> 

I highly doubt it's PR 1700 which is causing this. The PR I have open to fix a issue ONLY applies if IPv6 has been set.

PR 1700 only does something when you have set a IPv6 subnet in the 'vlan' table: https://github.com/apache/cloudstack/commit/c0e7766713b2631a167c2ceea7d42b574a5cd1b9#diff-f90fdac6810fd89f89e827309a41d180R231

So I don't think it's caused by this since you NIC table will not be filled with IPv6 addresses afterwards.

Wido

> Can you try a commit before and a commit after that PR?
> 
> Thanks,
> 
> ~ Rajani
> 
> http://cloudplatform.accelerite.com/
> 
> On February 16, 2017 at 1:02 AM, Tutkowski, Mike
> (Mike.Tutkowski@netapp.com) wrote:
> 
> Thanks for noting that PR, Rene. I tried building a Basic Zone
> making use of code from that PR, but – unfortunately – I still
> get an exception (below).
> 
> On a related note, does this mean we don’t run any integration
> tests that build a Basic Zone before we OK a PR to be checked in?
> 
> ERROR [c.c.a.ApiServer] (qtp555984412-267:ctx-a904cbd0
> ctx-062a000a) (logid:30f5a3ec) unhandled exception executing api
> command: [Ljava.lang.String;@4732a98c
> java.lang.NullPointerException
> at
> com.cloud.utils.net.NetUtils.getCidrNetmask(NetUtils.java:956)
> at
> com.cloud.configuration.ConfigurationManagerImpl.validateIpRange(ConfigurationManagerImpl.java:2924)
> at
> com.cloud.configuration.ConfigurationManagerImpl.createVlanAndPublicIpRange(ConfigurationManagerImpl.java:2822)
> 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:498)
> at
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
> at
> org.apache.cloudstack.network.contrail.management.EventUtils$EventInterceptor.invoke(EventUtils.java:107)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168)
> at
> com.cloud.event.ActionEventInterceptor.invoke(ActionEventInterceptor.java:51)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168)
> at
> org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
> at
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
> at com.sun.proxy.$Proxy126.createVlanAndPublicIpRange(Unknown
> Source)
> at
> org.apache.cloudstack.api.command.admin.vlan.CreateVlanIpRangeCmd.execute(CreateVlanIpRangeCmd.java:219)
> at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:150)
> at com.cloud.api.ApiServer.queueCommand(ApiServer.java:709)
> at com.cloud.api.ApiServer.handleRequest(ApiServer.java:533)
> at
> com.cloud.api.ApiServlet.processRequestInContext(ApiServlet.java:299)
> at com.cloud.api.ApiServlet$1.run(ApiServlet.java:129)
> at
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)
> at
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)
> at
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
> at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:126)
> at com.cloud.api.ApiServlet.doGet(ApiServlet.java:88)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
> at
> org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
> at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
> at
> org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:189)
> at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
> at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
> at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
> at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
> at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
> at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
> at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
> at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
> at
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
> at
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
> at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
> at org.eclipse.jetty.server.Server.handle(Server.java:499)
> at
> org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
> at
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:258)
> at
> org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
> at java.lang.Thread.run(Thread.java:745)
> 
> On 2/15/17, 12:52 AM, "Tutkowski, Mike"
> <Mi...@netapp.com> wrote:
> 
> Thanks for pointing this out.
> 
> I can incorporate those changes in the morning and see if it
> does the trick.
> 
> > On Feb 15, 2017, at 12:50 AM, Rene Moser <ma...@renemoser.net>
> wrote:
> >
> > Probably related to
> https://github.com/apache/cloudstack/pull/1927
> >
> >
> >
> >> On 02/14/2017 10:44 PM, Tutkowski, Mike wrote:
> >> Hi,
> >>
> >> I’m getting a NullPointerException when trying to create a
> zone using master.
> >>
> >> Below is the relevant code in ConfigurationManagerImpl.
> >>
> >> In the else block, network.getCidr() returns null and
> NetUtil.getCidrNetmask then throws a NullPointerException.
> >>
> >> I noticed that network.getGateway() also returns null (which
> seems odd).
> >>
> >> Thoughts on this?
> >>
> >> Thanks!
> >> Mike
> >>
> >> public Pair<Boolean, Pair<String, String>>
> validateIpRange(final String startIP, final String endIP, final
> String newVlanGateway, final String newVlanNetmask, final
> List<VlanVO> vlans, final boolean ipv4,
> >> final boolean ipv6, String ip6Gateway, String ip6Cidr, final
> String startIPv6, final String endIPv6, final Network network) {
> >> String vlanGateway = null;
> >> String vlanNetmask = null;
> >> boolean sameSubnet = false;
> >> if (CollectionUtils.isNotEmpty(vlans)) {
> >> for (final VlanVO vlan : vlans) {
> >> vlanGateway = vlan.getVlanGateway();
> >> vlanNetmask = vlan.getVlanNetmask();
> >> sameSubnet = hasSameSubnet(ipv4, vlanGateway, vlanNetmask,
> newVlanGateway, newVlanNetmask, startIP, endIP,
> >> ipv6, ip6Gateway, ip6Cidr, startIPv6, endIPv6, network);
> >> if (sameSubnet) break;
> >> }
> >> } else {
> >> vlanGateway = network.getGateway();
> >> vlanNetmask = NetUtils.getCidrNetmask(network.getCidr());
> >>

Re: Can't create a zone using master

Posted by Rajani Karuturi <ra...@apache.org>.
unfortunately, running one set of tests itself is very time
consuming(multiplied by hypervisors, network modes etc. its
impossible to run all)

If I remember correctly, wido tested it with PR 1700 (IPV6 in
basic networking)

Can you try a commit before and a commit after that PR?

Thanks,

~ Rajani

http://cloudplatform.accelerite.com/

On February 16, 2017 at 1:02 AM, Tutkowski, Mike
(Mike.Tutkowski@netapp.com) wrote:

Thanks for noting that PR, Rene. I tried building a Basic Zone
making use of code from that PR, but – unfortunately – I still
get an exception (below).

On a related note, does this mean we don’t run any integration
tests that build a Basic Zone before we OK a PR to be checked in?

ERROR [c.c.a.ApiServer] (qtp555984412-267:ctx-a904cbd0
ctx-062a000a) (logid:30f5a3ec) unhandled exception executing api
command: [Ljava.lang.String;@4732a98c
java.lang.NullPointerException
at
com.cloud.utils.net.NetUtils.getCidrNetmask(NetUtils.java:956)
at
com.cloud.configuration.ConfigurationManagerImpl.validateIpRange(ConfigurationManagerImpl.java:2924)
at
com.cloud.configuration.ConfigurationManagerImpl.createVlanAndPublicIpRange(ConfigurationManagerImpl.java:2822)
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:498)
at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at
org.apache.cloudstack.network.contrail.management.EventUtils$EventInterceptor.invoke(EventUtils.java:107)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168)
at
com.cloud.event.ActionEventInterceptor.invoke(ActionEventInterceptor.java:51)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168)
at
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
at com.sun.proxy.$Proxy126.createVlanAndPublicIpRange(Unknown
Source)
at
org.apache.cloudstack.api.command.admin.vlan.CreateVlanIpRangeCmd.execute(CreateVlanIpRangeCmd.java:219)
at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:150)
at com.cloud.api.ApiServer.queueCommand(ApiServer.java:709)
at com.cloud.api.ApiServer.handleRequest(ApiServer.java:533)
at
com.cloud.api.ApiServlet.processRequestInContext(ApiServlet.java:299)
at com.cloud.api.ApiServlet$1.run(ApiServlet.java:129)
at
org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)
at
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)
at
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:126)
at com.cloud.api.ApiServlet.doGet(ApiServlet.java:88)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at
org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
at
org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:189)
at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
at
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
at
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
at
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
at
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:499)
at
org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
at
org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:258)
at
org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
at
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
at
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
at java.lang.Thread.run(Thread.java:745)

On 2/15/17, 12:52 AM, "Tutkowski, Mike"
<Mi...@netapp.com> wrote:

Thanks for pointing this out.

I can incorporate those changes in the morning and see if it
does the trick.

> On Feb 15, 2017, at 12:50 AM, Rene Moser <ma...@renemoser.net>
wrote:
>
> Probably related to
https://github.com/apache/cloudstack/pull/1927
>
>
>
>> On 02/14/2017 10:44 PM, Tutkowski, Mike wrote:
>> Hi,
>>
>> I’m getting a NullPointerException when trying to create a
zone using master.
>>
>> Below is the relevant code in ConfigurationManagerImpl.
>>
>> In the else block, network.getCidr() returns null and
NetUtil.getCidrNetmask then throws a NullPointerException.
>>
>> I noticed that network.getGateway() also returns null (which
seems odd).
>>
>> Thoughts on this?
>>
>> Thanks!
>> Mike
>>
>> public Pair<Boolean, Pair<String, String>>
validateIpRange(final String startIP, final String endIP, final
String newVlanGateway, final String newVlanNetmask, final
List<VlanVO> vlans, final boolean ipv4,
>> final boolean ipv6, String ip6Gateway, String ip6Cidr, final
String startIPv6, final String endIPv6, final Network network) {
>> String vlanGateway = null;
>> String vlanNetmask = null;
>> boolean sameSubnet = false;
>> if (CollectionUtils.isNotEmpty(vlans)) {
>> for (final VlanVO vlan : vlans) {
>> vlanGateway = vlan.getVlanGateway();
>> vlanNetmask = vlan.getVlanNetmask();
>> sameSubnet = hasSameSubnet(ipv4, vlanGateway, vlanNetmask,
newVlanGateway, newVlanNetmask, startIP, endIP,
>> ipv6, ip6Gateway, ip6Cidr, startIPv6, endIPv6, network);
>> if (sameSubnet) break;
>> }
>> } else {
>> vlanGateway = network.getGateway();
>> vlanNetmask = NetUtils.getCidrNetmask(network.getCidr());
>>

Re: Can't create a zone using master

Posted by "Tutkowski, Mike" <Mi...@netapp.com>.
Hi Wei,

OK, the situation is partially improved now: I can create a zone/pod/cluster.

However, my SSVM and CPVM don’t report the agent as Running.

From cloud.log in SSVM:

Wed Feb 15 21:12:59 UTC 2017 Incompleted parameters STORAGE_IP:, STORAGE_NETMASK:, STORAGE_CIDR:. Cannot setup storage network
Wed Feb 15 21:12:59 UTC 2017 Not setting up route of RFC1918 space to 10.117.40.126 befause 10.117.40.35 is RFC1918.

Any thoughts as to what might be the issue here?

Thanks!
Mike

On 2/15/17, 1:28 PM, "Tutkowski, Mike" <Mi...@netapp.com> wrote:

    Thanks, Wei. I will give that a shot and report back.
    
    On 2/15/17, 1:26 PM, "Wei ZHOU" <us...@gmail.com> wrote:
    
        Mike,
        
        You may remove the "else" part which does not exist in previous versions in
        ConfigurationManagerImpl.java.
        
        -Wei
        
        2017-02-15 20:55 GMT+01:00 Tutkowski, Mike <Mi...@netapp.com>:
        
        > OK, so, what I plan to do is jump back a bunch of commits and see if it
        > works. If it does, I can binary search my way to the commit that fails it.
        > If the commit I pick doesn’t work, I can jump back a bunch more. If that
        > one works, I I can binary search my way to the commit that fails it, etc.
        >
        > Just a time-consuming process, but it should get the job done.
        >
        > On 2/15/17, 12:39 PM, "williamstevens@gmail.com on behalf of Will
        > Stevens" <williamstevens@gmail.com on behalf of wstevens@cloudops.com>
        > wrote:
        >
        >     That does seem to be the case.  :(
        >
        >     *Will STEVENS*
        >     Lead Developer
        >
        >     <https://goo.gl/NYZ8KK>
        >
        >     On Wed, Feb 15, 2017 at 2:32 PM, Tutkowski, Mike <
        > Mike.Tutkowski@netapp.com>
        >     wrote:
        >
        >     > Thanks for noting that PR, Rene. I tried building a Basic Zone
        > making use
        >     > of code from that PR, but – unfortunately – I still get an exception
        >     > (below).
        >     >
        >     > On a related note, does this mean we don’t run any integration tests
        > that
        >     > build a Basic Zone before we OK a PR to be checked in?
        >     >
        >     > ERROR [c.c.a.ApiServer] (qtp555984412-267:ctx-a904cbd0 ctx-062a000a)
        >     > (logid:30f5a3ec) unhandled exception executing api command:
        >     > [Ljava.lang.String;@4732a98c
        >     > java.lang.NullPointerException
        >     >         at com.cloud.utils.net.NetUtils.
        > getCidrNetmask(NetUtils.java:956)
        >     >         at com.cloud.configuration.ConfigurationManagerImpl.
        >     > validateIpRange(ConfigurationManagerImpl.java:2924)
        >     >         at com.cloud.configuration.ConfigurationManagerImpl.
        >     > createVlanAndPublicIpRange(ConfigurationManagerImpl.java:2822)
        >     >         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:498)
        >     >         at org.springframework.aop.support.AopUtils.
        >     > invokeJoinpointUsingReflection(AopUtils.java:333)
        >     >         at org.springframework.aop.framework.
        > ReflectiveMethodInvocation.
        >     > invokeJoinpoint(ReflectiveMethodInvocation.java:190)
        >     >         at org.springframework.aop.framework.
        > ReflectiveMethodInvocation.
        >     > proceed(ReflectiveMethodInvocation.java:157)
        >     >         at org.apache.cloudstack.network.contrail.management.
        >     > EventUtils$EventInterceptor.invoke(EventUtils.java:107)
        >     >         at org.springframework.aop.framework.
        > ReflectiveMethodInvocation.
        >     > proceed(ReflectiveMethodInvocation.java:168)
        >     >         at com.cloud.event.ActionEventInterceptor.invoke(
        >     > ActionEventInterceptor.java:51)
        >     >         at org.springframework.aop.framework.
        > ReflectiveMethodInvocation.
        >     > proceed(ReflectiveMethodInvocation.java:168)
        >     >         at org.springframework.aop.interceptor.
        >     > ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.
        > java:92)
        >     >         at org.springframework.aop.framework.
        > ReflectiveMethodInvocation.
        >     > proceed(ReflectiveMethodInvocation.java:179)
        >     >         at org.springframework.aop.framework.JdkDynamicAopProxy.
        >     > invoke(JdkDynamicAopProxy.java:213)
        >     >         at com.sun.proxy.$Proxy126.createVlanAndPublicIpRange(
        > Unknown
        >     > Source)
        >     >         at org.apache.cloudstack.api.command.admin.vlan.
        >     > CreateVlanIpRangeCmd.execute(CreateVlanIpRangeCmd.java:219)
        >     >         at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:
        > 150)
        >     >         at com.cloud.api.ApiServer.queueCommand(ApiServer.java:709)
        >     >         at com.cloud.api.ApiServer.handleRequest(ApiServer.java:533)
        >     >         at com.cloud.api.ApiServlet.processRequestInContext(
        >     > ApiServlet.java:299)
        >     >         at com.cloud.api.ApiServlet$1.run(ApiServlet.java:129)
        >     >         at org.apache.cloudstack.managed.context.impl.
        >     > DefaultManagedContext$1.call(DefaultManagedContext.java:56)
        >     >         at org.apache.cloudstack.managed.context.impl.
        >     > DefaultManagedContext.callWithContext(DefaultManagedContext.java:
        > 103)
        >     >         at org.apache.cloudstack.managed.context.impl.
        >     > DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
        >     >         at com.cloud.api.ApiServlet.processRequest(ApiServlet.
        > java:126)
        >     >         at com.cloud.api.ApiServlet.doGet(ApiServlet.java:88)
        >     >         at javax.servlet.http.HttpServlet.service(
        > HttpServlet.java:687)
        >     >         at javax.servlet.http.HttpServlet.service(
        > HttpServlet.java:790)
        >     >         at org.eclipse.jetty.servlet.ServletHolder.handle(
        >     > ServletHolder.java:812)
        >     >         at org.eclipse.jetty.servlet.ServletHandler$CachedChain.
        >     > doFilter(ServletHandler.java:1669)
        >     >         at org.eclipse.jetty.websocket.
        > server.WebSocketUpgradeFilter.
        >     > doFilter(WebSocketUpgradeFilter.java:189)
        >     >         at org.eclipse.jetty.servlet.ServletHandler$CachedChain.
        >     > doFilter(ServletHandler.java:1652)
        >     >         at org.eclipse.jetty.servlet.ServletHandler.doHandle(
        >     > ServletHandler.java:585)
        >     >         at org.eclipse.jetty.server.handler.ScopedHandler.handle(
        >     > ScopedHandler.java:143)
        >     >         at org.eclipse.jetty.security.SecurityHandler.handle(
        >     > SecurityHandler.java:577)
        >     >         at org.eclipse.jetty.server.session.SessionHandler.
        >     > doHandle(SessionHandler.java:223)
        >     >         at org.eclipse.jetty.server.handler.ContextHandler.
        >     > doHandle(ContextHandler.java:1127)
        >     >         at org.eclipse.jetty.servlet.ServletHandler.doScope(
        >     > ServletHandler.java:515)
        >     >         at org.eclipse.jetty.server.session.SessionHandler.
        >     > doScope(SessionHandler.java:185)
        >     >         at org.eclipse.jetty.server.handler.ContextHandler.
        >     > doScope(ContextHandler.java:1061)
        >     >         at org.eclipse.jetty.server.handler.ScopedHandler.handle(
        >     > ScopedHandler.java:141)
        >     >         at org.eclipse.jetty.server.handler.
        > ContextHandlerCollection.
        >     > handle(ContextHandlerCollection.java:215)
        >     >         at org.eclipse.jetty.server.handler.HandlerCollection.
        >     > handle(HandlerCollection.java:110)
        >     >         at org.eclipse.jetty.server.handler.HandlerWrapper.handle(
        >     > HandlerWrapper.java:97)
        >     >         at org.eclipse.jetty.server.Server.handle(Server.java:499)
        >     >         at org.eclipse.jetty.server.HttpChannel.handle(
        >     > HttpChannel.java:311)
        >     >         at org.eclipse.jetty.server.HttpConnection.onFillable(
        >     > HttpConnection.java:258)
        >     >         at org.eclipse.jetty.io.AbstractConnection$2.run(
        >     > AbstractConnection.java:544)
        >     >         at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(
        >     > QueuedThreadPool.java:635)
        >     >         at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(
        >     > QueuedThreadPool.java:555)
        >     >         at java.lang.Thread.run(Thread.java:745)
        >     >
        >     > On 2/15/17, 12:52 AM, "Tutkowski, Mike" <Mi...@netapp.com>
        > wrote:
        >     >
        >     >     Thanks for pointing this out.
        >     >
        >     >     I can incorporate those changes in the morning and see if it
        > does the
        >     > trick.
        >     >
        >     >     > On Feb 15, 2017, at 12:50 AM, Rene Moser <ma...@renemoser.net>
        > wrote:
        >     >     >
        >     >     > Probably related to https://github.com/apache/
        > cloudstack/pull/1927
        >     >     >
        >     >     >
        >     >     >
        >     >     >> On 02/14/2017 10:44 PM, Tutkowski, Mike wrote:
        >     >     >> Hi,
        >     >     >>
        >     >     >> I’m getting a NullPointerException when trying to create a
        > zone
        >     > using master.
        >     >     >>
        >     >     >> Below is the relevant code in ConfigurationManagerImpl.
        >     >     >>
        >     >     >> In the else block, network.getCidr() returns null and
        >     > NetUtil.getCidrNetmask then throws a NullPointerException.
        >     >     >>
        >     >     >> I noticed that network.getGateway() also returns null (which
        > seems
        >     > odd).
        >     >     >>
        >     >     >> Thoughts on this?
        >     >     >>
        >     >     >> Thanks!
        >     >     >> Mike
        >     >     >>
        >     >     >> public Pair<Boolean, Pair<String, String>>
        > validateIpRange(final
        >     > String startIP, final String endIP, final String newVlanGateway,
        > final
        >     > String newVlanNetmask, final List<VlanVO> vlans, final boolean ipv4,
        >     >     >>        final boolean ipv6, String ip6Gateway, String ip6Cidr,
        > final
        >     > String startIPv6, final String endIPv6, final Network network) {
        >     >     >>    String vlanGateway = null;
        >     >     >>    String vlanNetmask = null;
        >     >     >>    boolean sameSubnet = false;
        >     >     >>    if (CollectionUtils.isNotEmpty(vlans)) {
        >     >     >>        for (final VlanVO vlan : vlans) {
        >     >     >>            vlanGateway = vlan.getVlanGateway();
        >     >     >>            vlanNetmask = vlan.getVlanNetmask();
        >     >     >>            sameSubnet = hasSameSubnet(ipv4, vlanGateway,
        >     > vlanNetmask, newVlanGateway, newVlanNetmask, startIP, endIP,
        >     >     >>                    ipv6, ip6Gateway, ip6Cidr, startIPv6,
        > endIPv6,
        >     > network);
        >     >     >>            if (sameSubnet) break;
        >     >     >>        }
        >     >     >>    } else {
        >     >     >>        vlanGateway = network.getGateway();
        >     >     >>        vlanNetmask = NetUtils.getCidrNetmask(
        > network.getCidr());
        >     >     >>
        >     >
        >     >
        >     >
        >
        >
        >
        
    
    


Re: Can't create a zone using master

Posted by "Tutkowski, Mike" <Mi...@netapp.com>.
Thanks, Wei. I will give that a shot and report back.

On 2/15/17, 1:26 PM, "Wei ZHOU" <us...@gmail.com> wrote:

    Mike,
    
    You may remove the "else" part which does not exist in previous versions in
    ConfigurationManagerImpl.java.
    
    -Wei
    
    2017-02-15 20:55 GMT+01:00 Tutkowski, Mike <Mi...@netapp.com>:
    
    > OK, so, what I plan to do is jump back a bunch of commits and see if it
    > works. If it does, I can binary search my way to the commit that fails it.
    > If the commit I pick doesn’t work, I can jump back a bunch more. If that
    > one works, I I can binary search my way to the commit that fails it, etc.
    >
    > Just a time-consuming process, but it should get the job done.
    >
    > On 2/15/17, 12:39 PM, "williamstevens@gmail.com on behalf of Will
    > Stevens" <williamstevens@gmail.com on behalf of wstevens@cloudops.com>
    > wrote:
    >
    >     That does seem to be the case.  :(
    >
    >     *Will STEVENS*
    >     Lead Developer
    >
    >     <https://goo.gl/NYZ8KK>
    >
    >     On Wed, Feb 15, 2017 at 2:32 PM, Tutkowski, Mike <
    > Mike.Tutkowski@netapp.com>
    >     wrote:
    >
    >     > Thanks for noting that PR, Rene. I tried building a Basic Zone
    > making use
    >     > of code from that PR, but – unfortunately – I still get an exception
    >     > (below).
    >     >
    >     > On a related note, does this mean we don’t run any integration tests
    > that
    >     > build a Basic Zone before we OK a PR to be checked in?
    >     >
    >     > ERROR [c.c.a.ApiServer] (qtp555984412-267:ctx-a904cbd0 ctx-062a000a)
    >     > (logid:30f5a3ec) unhandled exception executing api command:
    >     > [Ljava.lang.String;@4732a98c
    >     > java.lang.NullPointerException
    >     >         at com.cloud.utils.net.NetUtils.
    > getCidrNetmask(NetUtils.java:956)
    >     >         at com.cloud.configuration.ConfigurationManagerImpl.
    >     > validateIpRange(ConfigurationManagerImpl.java:2924)
    >     >         at com.cloud.configuration.ConfigurationManagerImpl.
    >     > createVlanAndPublicIpRange(ConfigurationManagerImpl.java:2822)
    >     >         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:498)
    >     >         at org.springframework.aop.support.AopUtils.
    >     > invokeJoinpointUsingReflection(AopUtils.java:333)
    >     >         at org.springframework.aop.framework.
    > ReflectiveMethodInvocation.
    >     > invokeJoinpoint(ReflectiveMethodInvocation.java:190)
    >     >         at org.springframework.aop.framework.
    > ReflectiveMethodInvocation.
    >     > proceed(ReflectiveMethodInvocation.java:157)
    >     >         at org.apache.cloudstack.network.contrail.management.
    >     > EventUtils$EventInterceptor.invoke(EventUtils.java:107)
    >     >         at org.springframework.aop.framework.
    > ReflectiveMethodInvocation.
    >     > proceed(ReflectiveMethodInvocation.java:168)
    >     >         at com.cloud.event.ActionEventInterceptor.invoke(
    >     > ActionEventInterceptor.java:51)
    >     >         at org.springframework.aop.framework.
    > ReflectiveMethodInvocation.
    >     > proceed(ReflectiveMethodInvocation.java:168)
    >     >         at org.springframework.aop.interceptor.
    >     > ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.
    > java:92)
    >     >         at org.springframework.aop.framework.
    > ReflectiveMethodInvocation.
    >     > proceed(ReflectiveMethodInvocation.java:179)
    >     >         at org.springframework.aop.framework.JdkDynamicAopProxy.
    >     > invoke(JdkDynamicAopProxy.java:213)
    >     >         at com.sun.proxy.$Proxy126.createVlanAndPublicIpRange(
    > Unknown
    >     > Source)
    >     >         at org.apache.cloudstack.api.command.admin.vlan.
    >     > CreateVlanIpRangeCmd.execute(CreateVlanIpRangeCmd.java:219)
    >     >         at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:
    > 150)
    >     >         at com.cloud.api.ApiServer.queueCommand(ApiServer.java:709)
    >     >         at com.cloud.api.ApiServer.handleRequest(ApiServer.java:533)
    >     >         at com.cloud.api.ApiServlet.processRequestInContext(
    >     > ApiServlet.java:299)
    >     >         at com.cloud.api.ApiServlet$1.run(ApiServlet.java:129)
    >     >         at org.apache.cloudstack.managed.context.impl.
    >     > DefaultManagedContext$1.call(DefaultManagedContext.java:56)
    >     >         at org.apache.cloudstack.managed.context.impl.
    >     > DefaultManagedContext.callWithContext(DefaultManagedContext.java:
    > 103)
    >     >         at org.apache.cloudstack.managed.context.impl.
    >     > DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
    >     >         at com.cloud.api.ApiServlet.processRequest(ApiServlet.
    > java:126)
    >     >         at com.cloud.api.ApiServlet.doGet(ApiServlet.java:88)
    >     >         at javax.servlet.http.HttpServlet.service(
    > HttpServlet.java:687)
    >     >         at javax.servlet.http.HttpServlet.service(
    > HttpServlet.java:790)
    >     >         at org.eclipse.jetty.servlet.ServletHolder.handle(
    >     > ServletHolder.java:812)
    >     >         at org.eclipse.jetty.servlet.ServletHandler$CachedChain.
    >     > doFilter(ServletHandler.java:1669)
    >     >         at org.eclipse.jetty.websocket.
    > server.WebSocketUpgradeFilter.
    >     > doFilter(WebSocketUpgradeFilter.java:189)
    >     >         at org.eclipse.jetty.servlet.ServletHandler$CachedChain.
    >     > doFilter(ServletHandler.java:1652)
    >     >         at org.eclipse.jetty.servlet.ServletHandler.doHandle(
    >     > ServletHandler.java:585)
    >     >         at org.eclipse.jetty.server.handler.ScopedHandler.handle(
    >     > ScopedHandler.java:143)
    >     >         at org.eclipse.jetty.security.SecurityHandler.handle(
    >     > SecurityHandler.java:577)
    >     >         at org.eclipse.jetty.server.session.SessionHandler.
    >     > doHandle(SessionHandler.java:223)
    >     >         at org.eclipse.jetty.server.handler.ContextHandler.
    >     > doHandle(ContextHandler.java:1127)
    >     >         at org.eclipse.jetty.servlet.ServletHandler.doScope(
    >     > ServletHandler.java:515)
    >     >         at org.eclipse.jetty.server.session.SessionHandler.
    >     > doScope(SessionHandler.java:185)
    >     >         at org.eclipse.jetty.server.handler.ContextHandler.
    >     > doScope(ContextHandler.java:1061)
    >     >         at org.eclipse.jetty.server.handler.ScopedHandler.handle(
    >     > ScopedHandler.java:141)
    >     >         at org.eclipse.jetty.server.handler.
    > ContextHandlerCollection.
    >     > handle(ContextHandlerCollection.java:215)
    >     >         at org.eclipse.jetty.server.handler.HandlerCollection.
    >     > handle(HandlerCollection.java:110)
    >     >         at org.eclipse.jetty.server.handler.HandlerWrapper.handle(
    >     > HandlerWrapper.java:97)
    >     >         at org.eclipse.jetty.server.Server.handle(Server.java:499)
    >     >         at org.eclipse.jetty.server.HttpChannel.handle(
    >     > HttpChannel.java:311)
    >     >         at org.eclipse.jetty.server.HttpConnection.onFillable(
    >     > HttpConnection.java:258)
    >     >         at org.eclipse.jetty.io.AbstractConnection$2.run(
    >     > AbstractConnection.java:544)
    >     >         at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(
    >     > QueuedThreadPool.java:635)
    >     >         at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(
    >     > QueuedThreadPool.java:555)
    >     >         at java.lang.Thread.run(Thread.java:745)
    >     >
    >     > On 2/15/17, 12:52 AM, "Tutkowski, Mike" <Mi...@netapp.com>
    > wrote:
    >     >
    >     >     Thanks for pointing this out.
    >     >
    >     >     I can incorporate those changes in the morning and see if it
    > does the
    >     > trick.
    >     >
    >     >     > On Feb 15, 2017, at 12:50 AM, Rene Moser <ma...@renemoser.net>
    > wrote:
    >     >     >
    >     >     > Probably related to https://github.com/apache/
    > cloudstack/pull/1927
    >     >     >
    >     >     >
    >     >     >
    >     >     >> On 02/14/2017 10:44 PM, Tutkowski, Mike wrote:
    >     >     >> Hi,
    >     >     >>
    >     >     >> I’m getting a NullPointerException when trying to create a
    > zone
    >     > using master.
    >     >     >>
    >     >     >> Below is the relevant code in ConfigurationManagerImpl.
    >     >     >>
    >     >     >> In the else block, network.getCidr() returns null and
    >     > NetUtil.getCidrNetmask then throws a NullPointerException.
    >     >     >>
    >     >     >> I noticed that network.getGateway() also returns null (which
    > seems
    >     > odd).
    >     >     >>
    >     >     >> Thoughts on this?
    >     >     >>
    >     >     >> Thanks!
    >     >     >> Mike
    >     >     >>
    >     >     >> public Pair<Boolean, Pair<String, String>>
    > validateIpRange(final
    >     > String startIP, final String endIP, final String newVlanGateway,
    > final
    >     > String newVlanNetmask, final List<VlanVO> vlans, final boolean ipv4,
    >     >     >>        final boolean ipv6, String ip6Gateway, String ip6Cidr,
    > final
    >     > String startIPv6, final String endIPv6, final Network network) {
    >     >     >>    String vlanGateway = null;
    >     >     >>    String vlanNetmask = null;
    >     >     >>    boolean sameSubnet = false;
    >     >     >>    if (CollectionUtils.isNotEmpty(vlans)) {
    >     >     >>        for (final VlanVO vlan : vlans) {
    >     >     >>            vlanGateway = vlan.getVlanGateway();
    >     >     >>            vlanNetmask = vlan.getVlanNetmask();
    >     >     >>            sameSubnet = hasSameSubnet(ipv4, vlanGateway,
    >     > vlanNetmask, newVlanGateway, newVlanNetmask, startIP, endIP,
    >     >     >>                    ipv6, ip6Gateway, ip6Cidr, startIPv6,
    > endIPv6,
    >     > network);
    >     >     >>            if (sameSubnet) break;
    >     >     >>        }
    >     >     >>    } else {
    >     >     >>        vlanGateway = network.getGateway();
    >     >     >>        vlanNetmask = NetUtils.getCidrNetmask(
    > network.getCidr());
    >     >     >>
    >     >
    >     >
    >     >
    >
    >
    >
    


Re: Can't create a zone using master

Posted by Wei ZHOU <us...@gmail.com>.
Mike,

You may remove the "else" part which does not exist in previous versions in
ConfigurationManagerImpl.java.

-Wei

2017-02-15 20:55 GMT+01:00 Tutkowski, Mike <Mi...@netapp.com>:

> OK, so, what I plan to do is jump back a bunch of commits and see if it
> works. If it does, I can binary search my way to the commit that fails it.
> If the commit I pick doesn’t work, I can jump back a bunch more. If that
> one works, I I can binary search my way to the commit that fails it, etc.
>
> Just a time-consuming process, but it should get the job done.
>
> On 2/15/17, 12:39 PM, "williamstevens@gmail.com on behalf of Will
> Stevens" <williamstevens@gmail.com on behalf of wstevens@cloudops.com>
> wrote:
>
>     That does seem to be the case.  :(
>
>     *Will STEVENS*
>     Lead Developer
>
>     <https://goo.gl/NYZ8KK>
>
>     On Wed, Feb 15, 2017 at 2:32 PM, Tutkowski, Mike <
> Mike.Tutkowski@netapp.com>
>     wrote:
>
>     > Thanks for noting that PR, Rene. I tried building a Basic Zone
> making use
>     > of code from that PR, but – unfortunately – I still get an exception
>     > (below).
>     >
>     > On a related note, does this mean we don’t run any integration tests
> that
>     > build a Basic Zone before we OK a PR to be checked in?
>     >
>     > ERROR [c.c.a.ApiServer] (qtp555984412-267:ctx-a904cbd0 ctx-062a000a)
>     > (logid:30f5a3ec) unhandled exception executing api command:
>     > [Ljava.lang.String;@4732a98c
>     > java.lang.NullPointerException
>     >         at com.cloud.utils.net.NetUtils.
> getCidrNetmask(NetUtils.java:956)
>     >         at com.cloud.configuration.ConfigurationManagerImpl.
>     > validateIpRange(ConfigurationManagerImpl.java:2924)
>     >         at com.cloud.configuration.ConfigurationManagerImpl.
>     > createVlanAndPublicIpRange(ConfigurationManagerImpl.java:2822)
>     >         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:498)
>     >         at org.springframework.aop.support.AopUtils.
>     > invokeJoinpointUsingReflection(AopUtils.java:333)
>     >         at org.springframework.aop.framework.
> ReflectiveMethodInvocation.
>     > invokeJoinpoint(ReflectiveMethodInvocation.java:190)
>     >         at org.springframework.aop.framework.
> ReflectiveMethodInvocation.
>     > proceed(ReflectiveMethodInvocation.java:157)
>     >         at org.apache.cloudstack.network.contrail.management.
>     > EventUtils$EventInterceptor.invoke(EventUtils.java:107)
>     >         at org.springframework.aop.framework.
> ReflectiveMethodInvocation.
>     > proceed(ReflectiveMethodInvocation.java:168)
>     >         at com.cloud.event.ActionEventInterceptor.invoke(
>     > ActionEventInterceptor.java:51)
>     >         at org.springframework.aop.framework.
> ReflectiveMethodInvocation.
>     > proceed(ReflectiveMethodInvocation.java:168)
>     >         at org.springframework.aop.interceptor.
>     > ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.
> java:92)
>     >         at org.springframework.aop.framework.
> ReflectiveMethodInvocation.
>     > proceed(ReflectiveMethodInvocation.java:179)
>     >         at org.springframework.aop.framework.JdkDynamicAopProxy.
>     > invoke(JdkDynamicAopProxy.java:213)
>     >         at com.sun.proxy.$Proxy126.createVlanAndPublicIpRange(
> Unknown
>     > Source)
>     >         at org.apache.cloudstack.api.command.admin.vlan.
>     > CreateVlanIpRangeCmd.execute(CreateVlanIpRangeCmd.java:219)
>     >         at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:
> 150)
>     >         at com.cloud.api.ApiServer.queueCommand(ApiServer.java:709)
>     >         at com.cloud.api.ApiServer.handleRequest(ApiServer.java:533)
>     >         at com.cloud.api.ApiServlet.processRequestInContext(
>     > ApiServlet.java:299)
>     >         at com.cloud.api.ApiServlet$1.run(ApiServlet.java:129)
>     >         at org.apache.cloudstack.managed.context.impl.
>     > DefaultManagedContext$1.call(DefaultManagedContext.java:56)
>     >         at org.apache.cloudstack.managed.context.impl.
>     > DefaultManagedContext.callWithContext(DefaultManagedContext.java:
> 103)
>     >         at org.apache.cloudstack.managed.context.impl.
>     > DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
>     >         at com.cloud.api.ApiServlet.processRequest(ApiServlet.
> java:126)
>     >         at com.cloud.api.ApiServlet.doGet(ApiServlet.java:88)
>     >         at javax.servlet.http.HttpServlet.service(
> HttpServlet.java:687)
>     >         at javax.servlet.http.HttpServlet.service(
> HttpServlet.java:790)
>     >         at org.eclipse.jetty.servlet.ServletHolder.handle(
>     > ServletHolder.java:812)
>     >         at org.eclipse.jetty.servlet.ServletHandler$CachedChain.
>     > doFilter(ServletHandler.java:1669)
>     >         at org.eclipse.jetty.websocket.
> server.WebSocketUpgradeFilter.
>     > doFilter(WebSocketUpgradeFilter.java:189)
>     >         at org.eclipse.jetty.servlet.ServletHandler$CachedChain.
>     > doFilter(ServletHandler.java:1652)
>     >         at org.eclipse.jetty.servlet.ServletHandler.doHandle(
>     > ServletHandler.java:585)
>     >         at org.eclipse.jetty.server.handler.ScopedHandler.handle(
>     > ScopedHandler.java:143)
>     >         at org.eclipse.jetty.security.SecurityHandler.handle(
>     > SecurityHandler.java:577)
>     >         at org.eclipse.jetty.server.session.SessionHandler.
>     > doHandle(SessionHandler.java:223)
>     >         at org.eclipse.jetty.server.handler.ContextHandler.
>     > doHandle(ContextHandler.java:1127)
>     >         at org.eclipse.jetty.servlet.ServletHandler.doScope(
>     > ServletHandler.java:515)
>     >         at org.eclipse.jetty.server.session.SessionHandler.
>     > doScope(SessionHandler.java:185)
>     >         at org.eclipse.jetty.server.handler.ContextHandler.
>     > doScope(ContextHandler.java:1061)
>     >         at org.eclipse.jetty.server.handler.ScopedHandler.handle(
>     > ScopedHandler.java:141)
>     >         at org.eclipse.jetty.server.handler.
> ContextHandlerCollection.
>     > handle(ContextHandlerCollection.java:215)
>     >         at org.eclipse.jetty.server.handler.HandlerCollection.
>     > handle(HandlerCollection.java:110)
>     >         at org.eclipse.jetty.server.handler.HandlerWrapper.handle(
>     > HandlerWrapper.java:97)
>     >         at org.eclipse.jetty.server.Server.handle(Server.java:499)
>     >         at org.eclipse.jetty.server.HttpChannel.handle(
>     > HttpChannel.java:311)
>     >         at org.eclipse.jetty.server.HttpConnection.onFillable(
>     > HttpConnection.java:258)
>     >         at org.eclipse.jetty.io.AbstractConnection$2.run(
>     > AbstractConnection.java:544)
>     >         at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(
>     > QueuedThreadPool.java:635)
>     >         at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(
>     > QueuedThreadPool.java:555)
>     >         at java.lang.Thread.run(Thread.java:745)
>     >
>     > On 2/15/17, 12:52 AM, "Tutkowski, Mike" <Mi...@netapp.com>
> wrote:
>     >
>     >     Thanks for pointing this out.
>     >
>     >     I can incorporate those changes in the morning and see if it
> does the
>     > trick.
>     >
>     >     > On Feb 15, 2017, at 12:50 AM, Rene Moser <ma...@renemoser.net>
> wrote:
>     >     >
>     >     > Probably related to https://github.com/apache/
> cloudstack/pull/1927
>     >     >
>     >     >
>     >     >
>     >     >> On 02/14/2017 10:44 PM, Tutkowski, Mike wrote:
>     >     >> Hi,
>     >     >>
>     >     >> I’m getting a NullPointerException when trying to create a
> zone
>     > using master.
>     >     >>
>     >     >> Below is the relevant code in ConfigurationManagerImpl.
>     >     >>
>     >     >> In the else block, network.getCidr() returns null and
>     > NetUtil.getCidrNetmask then throws a NullPointerException.
>     >     >>
>     >     >> I noticed that network.getGateway() also returns null (which
> seems
>     > odd).
>     >     >>
>     >     >> Thoughts on this?
>     >     >>
>     >     >> Thanks!
>     >     >> Mike
>     >     >>
>     >     >> public Pair<Boolean, Pair<String, String>>
> validateIpRange(final
>     > String startIP, final String endIP, final String newVlanGateway,
> final
>     > String newVlanNetmask, final List<VlanVO> vlans, final boolean ipv4,
>     >     >>        final boolean ipv6, String ip6Gateway, String ip6Cidr,
> final
>     > String startIPv6, final String endIPv6, final Network network) {
>     >     >>    String vlanGateway = null;
>     >     >>    String vlanNetmask = null;
>     >     >>    boolean sameSubnet = false;
>     >     >>    if (CollectionUtils.isNotEmpty(vlans)) {
>     >     >>        for (final VlanVO vlan : vlans) {
>     >     >>            vlanGateway = vlan.getVlanGateway();
>     >     >>            vlanNetmask = vlan.getVlanNetmask();
>     >     >>            sameSubnet = hasSameSubnet(ipv4, vlanGateway,
>     > vlanNetmask, newVlanGateway, newVlanNetmask, startIP, endIP,
>     >     >>                    ipv6, ip6Gateway, ip6Cidr, startIPv6,
> endIPv6,
>     > network);
>     >     >>            if (sameSubnet) break;
>     >     >>        }
>     >     >>    } else {
>     >     >>        vlanGateway = network.getGateway();
>     >     >>        vlanNetmask = NetUtils.getCidrNetmask(
> network.getCidr());
>     >     >>
>     >
>     >
>     >
>
>
>

Re: Can't create a zone using master

Posted by "Tutkowski, Mike" <Mi...@netapp.com>.
OK, so, what I plan to do is jump back a bunch of commits and see if it works. If it does, I can binary search my way to the commit that fails it. If the commit I pick doesn’t work, I can jump back a bunch more. If that one works, I I can binary search my way to the commit that fails it, etc.

Just a time-consuming process, but it should get the job done.

On 2/15/17, 12:39 PM, "williamstevens@gmail.com on behalf of Will Stevens" <williamstevens@gmail.com on behalf of wstevens@cloudops.com> wrote:

    That does seem to be the case.  :(
    
    *Will STEVENS*
    Lead Developer
    
    <https://goo.gl/NYZ8KK>
    
    On Wed, Feb 15, 2017 at 2:32 PM, Tutkowski, Mike <Mi...@netapp.com>
    wrote:
    
    > Thanks for noting that PR, Rene. I tried building a Basic Zone making use
    > of code from that PR, but – unfortunately – I still get an exception
    > (below).
    >
    > On a related note, does this mean we don’t run any integration tests that
    > build a Basic Zone before we OK a PR to be checked in?
    >
    > ERROR [c.c.a.ApiServer] (qtp555984412-267:ctx-a904cbd0 ctx-062a000a)
    > (logid:30f5a3ec) unhandled exception executing api command:
    > [Ljava.lang.String;@4732a98c
    > java.lang.NullPointerException
    >         at com.cloud.utils.net.NetUtils.getCidrNetmask(NetUtils.java:956)
    >         at com.cloud.configuration.ConfigurationManagerImpl.
    > validateIpRange(ConfigurationManagerImpl.java:2924)
    >         at com.cloud.configuration.ConfigurationManagerImpl.
    > createVlanAndPublicIpRange(ConfigurationManagerImpl.java:2822)
    >         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:498)
    >         at org.springframework.aop.support.AopUtils.
    > invokeJoinpointUsingReflection(AopUtils.java:333)
    >         at org.springframework.aop.framework.ReflectiveMethodInvocation.
    > invokeJoinpoint(ReflectiveMethodInvocation.java:190)
    >         at org.springframework.aop.framework.ReflectiveMethodInvocation.
    > proceed(ReflectiveMethodInvocation.java:157)
    >         at org.apache.cloudstack.network.contrail.management.
    > EventUtils$EventInterceptor.invoke(EventUtils.java:107)
    >         at org.springframework.aop.framework.ReflectiveMethodInvocation.
    > proceed(ReflectiveMethodInvocation.java:168)
    >         at com.cloud.event.ActionEventInterceptor.invoke(
    > ActionEventInterceptor.java:51)
    >         at org.springframework.aop.framework.ReflectiveMethodInvocation.
    > proceed(ReflectiveMethodInvocation.java:168)
    >         at org.springframework.aop.interceptor.
    > ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
    >         at org.springframework.aop.framework.ReflectiveMethodInvocation.
    > proceed(ReflectiveMethodInvocation.java:179)
    >         at org.springframework.aop.framework.JdkDynamicAopProxy.
    > invoke(JdkDynamicAopProxy.java:213)
    >         at com.sun.proxy.$Proxy126.createVlanAndPublicIpRange(Unknown
    > Source)
    >         at org.apache.cloudstack.api.command.admin.vlan.
    > CreateVlanIpRangeCmd.execute(CreateVlanIpRangeCmd.java:219)
    >         at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:150)
    >         at com.cloud.api.ApiServer.queueCommand(ApiServer.java:709)
    >         at com.cloud.api.ApiServer.handleRequest(ApiServer.java:533)
    >         at com.cloud.api.ApiServlet.processRequestInContext(
    > ApiServlet.java:299)
    >         at com.cloud.api.ApiServlet$1.run(ApiServlet.java:129)
    >         at org.apache.cloudstack.managed.context.impl.
    > DefaultManagedContext$1.call(DefaultManagedContext.java:56)
    >         at org.apache.cloudstack.managed.context.impl.
    > DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)
    >         at org.apache.cloudstack.managed.context.impl.
    > DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
    >         at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:126)
    >         at com.cloud.api.ApiServlet.doGet(ApiServlet.java:88)
    >         at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
    >         at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    >         at org.eclipse.jetty.servlet.ServletHolder.handle(
    > ServletHolder.java:812)
    >         at org.eclipse.jetty.servlet.ServletHandler$CachedChain.
    > doFilter(ServletHandler.java:1669)
    >         at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.
    > doFilter(WebSocketUpgradeFilter.java:189)
    >         at org.eclipse.jetty.servlet.ServletHandler$CachedChain.
    > doFilter(ServletHandler.java:1652)
    >         at org.eclipse.jetty.servlet.ServletHandler.doHandle(
    > ServletHandler.java:585)
    >         at org.eclipse.jetty.server.handler.ScopedHandler.handle(
    > ScopedHandler.java:143)
    >         at org.eclipse.jetty.security.SecurityHandler.handle(
    > SecurityHandler.java:577)
    >         at org.eclipse.jetty.server.session.SessionHandler.
    > doHandle(SessionHandler.java:223)
    >         at org.eclipse.jetty.server.handler.ContextHandler.
    > doHandle(ContextHandler.java:1127)
    >         at org.eclipse.jetty.servlet.ServletHandler.doScope(
    > ServletHandler.java:515)
    >         at org.eclipse.jetty.server.session.SessionHandler.
    > doScope(SessionHandler.java:185)
    >         at org.eclipse.jetty.server.handler.ContextHandler.
    > doScope(ContextHandler.java:1061)
    >         at org.eclipse.jetty.server.handler.ScopedHandler.handle(
    > ScopedHandler.java:141)
    >         at org.eclipse.jetty.server.handler.ContextHandlerCollection.
    > handle(ContextHandlerCollection.java:215)
    >         at org.eclipse.jetty.server.handler.HandlerCollection.
    > handle(HandlerCollection.java:110)
    >         at org.eclipse.jetty.server.handler.HandlerWrapper.handle(
    > HandlerWrapper.java:97)
    >         at org.eclipse.jetty.server.Server.handle(Server.java:499)
    >         at org.eclipse.jetty.server.HttpChannel.handle(
    > HttpChannel.java:311)
    >         at org.eclipse.jetty.server.HttpConnection.onFillable(
    > HttpConnection.java:258)
    >         at org.eclipse.jetty.io.AbstractConnection$2.run(
    > AbstractConnection.java:544)
    >         at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(
    > QueuedThreadPool.java:635)
    >         at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(
    > QueuedThreadPool.java:555)
    >         at java.lang.Thread.run(Thread.java:745)
    >
    > On 2/15/17, 12:52 AM, "Tutkowski, Mike" <Mi...@netapp.com> wrote:
    >
    >     Thanks for pointing this out.
    >
    >     I can incorporate those changes in the morning and see if it does the
    > trick.
    >
    >     > On Feb 15, 2017, at 12:50 AM, Rene Moser <ma...@renemoser.net> wrote:
    >     >
    >     > Probably related to https://github.com/apache/cloudstack/pull/1927
    >     >
    >     >
    >     >
    >     >> On 02/14/2017 10:44 PM, Tutkowski, Mike wrote:
    >     >> Hi,
    >     >>
    >     >> I’m getting a NullPointerException when trying to create a zone
    > using master.
    >     >>
    >     >> Below is the relevant code in ConfigurationManagerImpl.
    >     >>
    >     >> In the else block, network.getCidr() returns null and
    > NetUtil.getCidrNetmask then throws a NullPointerException.
    >     >>
    >     >> I noticed that network.getGateway() also returns null (which seems
    > odd).
    >     >>
    >     >> Thoughts on this?
    >     >>
    >     >> Thanks!
    >     >> Mike
    >     >>
    >     >> public Pair<Boolean, Pair<String, String>> validateIpRange(final
    > String startIP, final String endIP, final String newVlanGateway, final
    > String newVlanNetmask, final List<VlanVO> vlans, final boolean ipv4,
    >     >>        final boolean ipv6, String ip6Gateway, String ip6Cidr, final
    > String startIPv6, final String endIPv6, final Network network) {
    >     >>    String vlanGateway = null;
    >     >>    String vlanNetmask = null;
    >     >>    boolean sameSubnet = false;
    >     >>    if (CollectionUtils.isNotEmpty(vlans)) {
    >     >>        for (final VlanVO vlan : vlans) {
    >     >>            vlanGateway = vlan.getVlanGateway();
    >     >>            vlanNetmask = vlan.getVlanNetmask();
    >     >>            sameSubnet = hasSameSubnet(ipv4, vlanGateway,
    > vlanNetmask, newVlanGateway, newVlanNetmask, startIP, endIP,
    >     >>                    ipv6, ip6Gateway, ip6Cidr, startIPv6, endIPv6,
    > network);
    >     >>            if (sameSubnet) break;
    >     >>        }
    >     >>    } else {
    >     >>        vlanGateway = network.getGateway();
    >     >>        vlanNetmask = NetUtils.getCidrNetmask(network.getCidr());
    >     >>
    >
    >
    >
    


Re: Can't create a zone using master

Posted by Will Stevens <ws...@cloudops.com>.
That does seem to be the case.  :(

*Will STEVENS*
Lead Developer

<https://goo.gl/NYZ8KK>

On Wed, Feb 15, 2017 at 2:32 PM, Tutkowski, Mike <Mi...@netapp.com>
wrote:

> Thanks for noting that PR, Rene. I tried building a Basic Zone making use
> of code from that PR, but – unfortunately – I still get an exception
> (below).
>
> On a related note, does this mean we don’t run any integration tests that
> build a Basic Zone before we OK a PR to be checked in?
>
> ERROR [c.c.a.ApiServer] (qtp555984412-267:ctx-a904cbd0 ctx-062a000a)
> (logid:30f5a3ec) unhandled exception executing api command:
> [Ljava.lang.String;@4732a98c
> java.lang.NullPointerException
>         at com.cloud.utils.net.NetUtils.getCidrNetmask(NetUtils.java:956)
>         at com.cloud.configuration.ConfigurationManagerImpl.
> validateIpRange(ConfigurationManagerImpl.java:2924)
>         at com.cloud.configuration.ConfigurationManagerImpl.
> createVlanAndPublicIpRange(ConfigurationManagerImpl.java:2822)
>         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:498)
>         at org.springframework.aop.support.AopUtils.
> invokeJoinpointUsingReflection(AopUtils.java:333)
>         at org.springframework.aop.framework.ReflectiveMethodInvocation.
> invokeJoinpoint(ReflectiveMethodInvocation.java:190)
>         at org.springframework.aop.framework.ReflectiveMethodInvocation.
> proceed(ReflectiveMethodInvocation.java:157)
>         at org.apache.cloudstack.network.contrail.management.
> EventUtils$EventInterceptor.invoke(EventUtils.java:107)
>         at org.springframework.aop.framework.ReflectiveMethodInvocation.
> proceed(ReflectiveMethodInvocation.java:168)
>         at com.cloud.event.ActionEventInterceptor.invoke(
> ActionEventInterceptor.java:51)
>         at org.springframework.aop.framework.ReflectiveMethodInvocation.
> proceed(ReflectiveMethodInvocation.java:168)
>         at org.springframework.aop.interceptor.
> ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
>         at org.springframework.aop.framework.ReflectiveMethodInvocation.
> proceed(ReflectiveMethodInvocation.java:179)
>         at org.springframework.aop.framework.JdkDynamicAopProxy.
> invoke(JdkDynamicAopProxy.java:213)
>         at com.sun.proxy.$Proxy126.createVlanAndPublicIpRange(Unknown
> Source)
>         at org.apache.cloudstack.api.command.admin.vlan.
> CreateVlanIpRangeCmd.execute(CreateVlanIpRangeCmd.java:219)
>         at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:150)
>         at com.cloud.api.ApiServer.queueCommand(ApiServer.java:709)
>         at com.cloud.api.ApiServer.handleRequest(ApiServer.java:533)
>         at com.cloud.api.ApiServlet.processRequestInContext(
> ApiServlet.java:299)
>         at com.cloud.api.ApiServlet$1.run(ApiServlet.java:129)
>         at org.apache.cloudstack.managed.context.impl.
> DefaultManagedContext$1.call(DefaultManagedContext.java:56)
>         at org.apache.cloudstack.managed.context.impl.
> DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)
>         at org.apache.cloudstack.managed.context.impl.
> DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
>         at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:126)
>         at com.cloud.api.ApiServlet.doGet(ApiServlet.java:88)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
>         at org.eclipse.jetty.servlet.ServletHolder.handle(
> ServletHolder.java:812)
>         at org.eclipse.jetty.servlet.ServletHandler$CachedChain.
> doFilter(ServletHandler.java:1669)
>         at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.
> doFilter(WebSocketUpgradeFilter.java:189)
>         at org.eclipse.jetty.servlet.ServletHandler$CachedChain.
> doFilter(ServletHandler.java:1652)
>         at org.eclipse.jetty.servlet.ServletHandler.doHandle(
> ServletHandler.java:585)
>         at org.eclipse.jetty.server.handler.ScopedHandler.handle(
> ScopedHandler.java:143)
>         at org.eclipse.jetty.security.SecurityHandler.handle(
> SecurityHandler.java:577)
>         at org.eclipse.jetty.server.session.SessionHandler.
> doHandle(SessionHandler.java:223)
>         at org.eclipse.jetty.server.handler.ContextHandler.
> doHandle(ContextHandler.java:1127)
>         at org.eclipse.jetty.servlet.ServletHandler.doScope(
> ServletHandler.java:515)
>         at org.eclipse.jetty.server.session.SessionHandler.
> doScope(SessionHandler.java:185)
>         at org.eclipse.jetty.server.handler.ContextHandler.
> doScope(ContextHandler.java:1061)
>         at org.eclipse.jetty.server.handler.ScopedHandler.handle(
> ScopedHandler.java:141)
>         at org.eclipse.jetty.server.handler.ContextHandlerCollection.
> handle(ContextHandlerCollection.java:215)
>         at org.eclipse.jetty.server.handler.HandlerCollection.
> handle(HandlerCollection.java:110)
>         at org.eclipse.jetty.server.handler.HandlerWrapper.handle(
> HandlerWrapper.java:97)
>         at org.eclipse.jetty.server.Server.handle(Server.java:499)
>         at org.eclipse.jetty.server.HttpChannel.handle(
> HttpChannel.java:311)
>         at org.eclipse.jetty.server.HttpConnection.onFillable(
> HttpConnection.java:258)
>         at org.eclipse.jetty.io.AbstractConnection$2.run(
> AbstractConnection.java:544)
>         at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(
> QueuedThreadPool.java:635)
>         at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(
> QueuedThreadPool.java:555)
>         at java.lang.Thread.run(Thread.java:745)
>
> On 2/15/17, 12:52 AM, "Tutkowski, Mike" <Mi...@netapp.com> wrote:
>
>     Thanks for pointing this out.
>
>     I can incorporate those changes in the morning and see if it does the
> trick.
>
>     > On Feb 15, 2017, at 12:50 AM, Rene Moser <ma...@renemoser.net> wrote:
>     >
>     > Probably related to https://github.com/apache/cloudstack/pull/1927
>     >
>     >
>     >
>     >> On 02/14/2017 10:44 PM, Tutkowski, Mike wrote:
>     >> Hi,
>     >>
>     >> I’m getting a NullPointerException when trying to create a zone
> using master.
>     >>
>     >> Below is the relevant code in ConfigurationManagerImpl.
>     >>
>     >> In the else block, network.getCidr() returns null and
> NetUtil.getCidrNetmask then throws a NullPointerException.
>     >>
>     >> I noticed that network.getGateway() also returns null (which seems
> odd).
>     >>
>     >> Thoughts on this?
>     >>
>     >> Thanks!
>     >> Mike
>     >>
>     >> public Pair<Boolean, Pair<String, String>> validateIpRange(final
> String startIP, final String endIP, final String newVlanGateway, final
> String newVlanNetmask, final List<VlanVO> vlans, final boolean ipv4,
>     >>        final boolean ipv6, String ip6Gateway, String ip6Cidr, final
> String startIPv6, final String endIPv6, final Network network) {
>     >>    String vlanGateway = null;
>     >>    String vlanNetmask = null;
>     >>    boolean sameSubnet = false;
>     >>    if (CollectionUtils.isNotEmpty(vlans)) {
>     >>        for (final VlanVO vlan : vlans) {
>     >>            vlanGateway = vlan.getVlanGateway();
>     >>            vlanNetmask = vlan.getVlanNetmask();
>     >>            sameSubnet = hasSameSubnet(ipv4, vlanGateway,
> vlanNetmask, newVlanGateway, newVlanNetmask, startIP, endIP,
>     >>                    ipv6, ip6Gateway, ip6Cidr, startIPv6, endIPv6,
> network);
>     >>            if (sameSubnet) break;
>     >>        }
>     >>    } else {
>     >>        vlanGateway = network.getGateway();
>     >>        vlanNetmask = NetUtils.getCidrNetmask(network.getCidr());
>     >>
>
>
>

Re: Can't create a zone using master

Posted by "Tutkowski, Mike" <Mi...@netapp.com>.
Thanks for noting that PR, Rene. I tried building a Basic Zone making use of code from that PR, but – unfortunately – I still get an exception (below).

On a related note, does this mean we don’t run any integration tests that build a Basic Zone before we OK a PR to be checked in?

ERROR [c.c.a.ApiServer] (qtp555984412-267:ctx-a904cbd0 ctx-062a000a) (logid:30f5a3ec) unhandled exception executing api command: [Ljava.lang.String;@4732a98c
java.lang.NullPointerException
	at com.cloud.utils.net.NetUtils.getCidrNetmask(NetUtils.java:956)
	at com.cloud.configuration.ConfigurationManagerImpl.validateIpRange(ConfigurationManagerImpl.java:2924)
	at com.cloud.configuration.ConfigurationManagerImpl.createVlanAndPublicIpRange(ConfigurationManagerImpl.java:2822)
	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:498)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
	at org.apache.cloudstack.network.contrail.management.EventUtils$EventInterceptor.invoke(EventUtils.java:107)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168)
	at com.cloud.event.ActionEventInterceptor.invoke(ActionEventInterceptor.java:51)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168)
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
	at com.sun.proxy.$Proxy126.createVlanAndPublicIpRange(Unknown Source)
	at org.apache.cloudstack.api.command.admin.vlan.CreateVlanIpRangeCmd.execute(CreateVlanIpRangeCmd.java:219)
	at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:150)
	at com.cloud.api.ApiServer.queueCommand(ApiServer.java:709)
	at com.cloud.api.ApiServer.handleRequest(ApiServer.java:533)
	at com.cloud.api.ApiServlet.processRequestInContext(ApiServlet.java:299)
	at com.cloud.api.ApiServlet$1.run(ApiServlet.java:129)
	at org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)
	at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)
	at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
	at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:126)
	at com.cloud.api.ApiServlet.doGet(ApiServlet.java:88)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
	at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:189)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
	at org.eclipse.jetty.server.Server.handle(Server.java:499)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:258)
	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
	at java.lang.Thread.run(Thread.java:745)

On 2/15/17, 12:52 AM, "Tutkowski, Mike" <Mi...@netapp.com> wrote:

    Thanks for pointing this out.
    
    I can incorporate those changes in the morning and see if it does the trick.
    
    > On Feb 15, 2017, at 12:50 AM, Rene Moser <ma...@renemoser.net> wrote:
    > 
    > Probably related to https://github.com/apache/cloudstack/pull/1927
    > 
    > 
    > 
    >> On 02/14/2017 10:44 PM, Tutkowski, Mike wrote:
    >> Hi,
    >> 
    >> I’m getting a NullPointerException when trying to create a zone using master.
    >> 
    >> Below is the relevant code in ConfigurationManagerImpl.
    >> 
    >> In the else block, network.getCidr() returns null and NetUtil.getCidrNetmask then throws a NullPointerException.
    >> 
    >> I noticed that network.getGateway() also returns null (which seems odd).
    >> 
    >> Thoughts on this?
    >> 
    >> Thanks!
    >> Mike
    >> 
    >> public Pair<Boolean, Pair<String, String>> validateIpRange(final String startIP, final String endIP, final String newVlanGateway, final String newVlanNetmask, final List<VlanVO> vlans, final boolean ipv4,
    >>        final boolean ipv6, String ip6Gateway, String ip6Cidr, final String startIPv6, final String endIPv6, final Network network) {
    >>    String vlanGateway = null;
    >>    String vlanNetmask = null;
    >>    boolean sameSubnet = false;
    >>    if (CollectionUtils.isNotEmpty(vlans)) {
    >>        for (final VlanVO vlan : vlans) {
    >>            vlanGateway = vlan.getVlanGateway();
    >>            vlanNetmask = vlan.getVlanNetmask();
    >>            sameSubnet = hasSameSubnet(ipv4, vlanGateway, vlanNetmask, newVlanGateway, newVlanNetmask, startIP, endIP,
    >>                    ipv6, ip6Gateway, ip6Cidr, startIPv6, endIPv6, network);
    >>            if (sameSubnet) break;
    >>        }
    >>    } else {
    >>        vlanGateway = network.getGateway();
    >>        vlanNetmask = NetUtils.getCidrNetmask(network.getCidr());
    >> 
    


Re: Can't create a zone using master

Posted by "Tutkowski, Mike" <Mi...@netapp.com>.
Thanks for pointing this out.

I can incorporate those changes in the morning and see if it does the trick.

> On Feb 15, 2017, at 12:50 AM, Rene Moser <ma...@renemoser.net> wrote:
> 
> Probably related to https://github.com/apache/cloudstack/pull/1927
> 
> 
> 
>> On 02/14/2017 10:44 PM, Tutkowski, Mike wrote:
>> Hi,
>> 
>> I’m getting a NullPointerException when trying to create a zone using master.
>> 
>> Below is the relevant code in ConfigurationManagerImpl.
>> 
>> In the else block, network.getCidr() returns null and NetUtil.getCidrNetmask then throws a NullPointerException.
>> 
>> I noticed that network.getGateway() also returns null (which seems odd).
>> 
>> Thoughts on this?
>> 
>> Thanks!
>> Mike
>> 
>> public Pair<Boolean, Pair<String, String>> validateIpRange(final String startIP, final String endIP, final String newVlanGateway, final String newVlanNetmask, final List<VlanVO> vlans, final boolean ipv4,
>>        final boolean ipv6, String ip6Gateway, String ip6Cidr, final String startIPv6, final String endIPv6, final Network network) {
>>    String vlanGateway = null;
>>    String vlanNetmask = null;
>>    boolean sameSubnet = false;
>>    if (CollectionUtils.isNotEmpty(vlans)) {
>>        for (final VlanVO vlan : vlans) {
>>            vlanGateway = vlan.getVlanGateway();
>>            vlanNetmask = vlan.getVlanNetmask();
>>            sameSubnet = hasSameSubnet(ipv4, vlanGateway, vlanNetmask, newVlanGateway, newVlanNetmask, startIP, endIP,
>>                    ipv6, ip6Gateway, ip6Cidr, startIPv6, endIPv6, network);
>>            if (sameSubnet) break;
>>        }
>>    } else {
>>        vlanGateway = network.getGateway();
>>        vlanNetmask = NetUtils.getCidrNetmask(network.getCidr());
>> 

Re: Can't create a zone using master

Posted by Rene Moser <ma...@renemoser.net>.
Probably related to https://github.com/apache/cloudstack/pull/1927



On 02/14/2017 10:44 PM, Tutkowski, Mike wrote:
> Hi,
> 
> I\u2019m getting a NullPointerException when trying to create a zone using master.
> 
> Below is the relevant code in ConfigurationManagerImpl.
> 
> In the else block, network.getCidr() returns null and NetUtil.getCidrNetmask then throws a NullPointerException.
> 
> I noticed that network.getGateway() also returns null (which seems odd).
> 
> Thoughts on this?
> 
> Thanks!
> Mike
> 
> public Pair<Boolean, Pair<String, String>> validateIpRange(final String startIP, final String endIP, final String newVlanGateway, final String newVlanNetmask, final List<VlanVO> vlans, final boolean ipv4,
>         final boolean ipv6, String ip6Gateway, String ip6Cidr, final String startIPv6, final String endIPv6, final Network network) {
>     String vlanGateway = null;
>     String vlanNetmask = null;
>     boolean sameSubnet = false;
>     if (CollectionUtils.isNotEmpty(vlans)) {
>         for (final VlanVO vlan : vlans) {
>             vlanGateway = vlan.getVlanGateway();
>             vlanNetmask = vlan.getVlanNetmask();
>             sameSubnet = hasSameSubnet(ipv4, vlanGateway, vlanNetmask, newVlanGateway, newVlanNetmask, startIP, endIP,
>                     ipv6, ip6Gateway, ip6Cidr, startIPv6, endIPv6, network);
>             if (sameSubnet) break;
>         }
>     } else {
>         vlanGateway = network.getGateway();
>         vlanNetmask = NetUtils.getCidrNetmask(network.getCidr());
> 

Re: Can't create a zone using master

Posted by "Tutkowski, Mike" <Mi...@netapp.com>.
If it helps in debugging, I typically assign 10.117.40.20 - 10.117.40.25 for Management IPs and 10.117.40.26 - 10.117.40.99 for Guest IPs.

On the network in my lab, I am assigned the following range (by our IT people):

10.117.40.0 /25 (10.117.40.0 - 10.117.40.127)

Subnet Mask: 255.255.255.128
Gateway: 10.117.40.126

This worked fine up until I rebased against master recently.

Thanks!
Mike

On 2/14/17, 6:20 PM, "Tutkowski, Mike" <Mi...@netapp.com> wrote:

    Also, for any CloudStack networking person out there who is curious about this, I see the following in cloud.log for my SSVM:
    
    Wed Feb 15 01:07:50 UTC 2017 Incompleted parameters STORAGE_IP:, STORAGE_NETMASK:, STORAGE_CIDR:. Cannot setup storage network
    Wed Feb 15 01:07:50 UTC 2017 Not setting up route of RFC1918 space to 10.117.40.126 befause 10.117.40.93 is RFC1918.
    
    On 2/14/17, 6:14 PM, "Tutkowski, Mike" <Mi...@netapp.com> wrote:
    
        I’m not very familiar with the networking code that’s failing, but I worked around it with these changes:
        
        https://github.com/mike-tutkowski/cloudstack/commit/834b7ea7df18f278cbc9eb1bfaa9578fad2debeb
        
        I’m not sure if those are viable changes in this case, but perhaps someone who works in the networking area of CloudStack can say.
        
        The problem now, however (and maybe this is unrelated), is that neither my CPVM nor my SSVM report their agent as Running.
        
        Those system VMs do show as each having public, private, and link local IP addresses (as well as an IP address for their gateway).
        
        Is anyone else having these kinds of issues with recent master code?
        
        Thanks!
        Mike
        
        On 2/14/17, 3:02 PM, "Tutkowski, Mike" <Mi...@netapp.com> wrote:
        
            By the way, this is for a Basic Zone.
            
            On 2/14/17, 2:44 PM, "Tutkowski, Mike" <Mi...@netapp.com> wrote:
            
                Hi,
                
                I’m getting a NullPointerException when trying to create a zone using master.
                
                Below is the relevant code in ConfigurationManagerImpl.
                
                In the else block, network.getCidr() returns null and NetUtil.getCidrNetmask then throws a NullPointerException.
                
                I noticed that network.getGateway() also returns null (which seems odd).
                
                Thoughts on this?
                
                Thanks!
                Mike
                
                public Pair<Boolean, Pair<String, String>> validateIpRange(final String startIP, final String endIP, final String newVlanGateway, final String newVlanNetmask, final List<VlanVO> vlans, final boolean ipv4,
                        final boolean ipv6, String ip6Gateway, String ip6Cidr, final String startIPv6, final String endIPv6, final Network network) {
                    String vlanGateway = null;
                    String vlanNetmask = null;
                    boolean sameSubnet = false;
                    if (CollectionUtils.isNotEmpty(vlans)) {
                        for (final VlanVO vlan : vlans) {
                            vlanGateway = vlan.getVlanGateway();
                            vlanNetmask = vlan.getVlanNetmask();
                            sameSubnet = hasSameSubnet(ipv4, vlanGateway, vlanNetmask, newVlanGateway, newVlanNetmask, startIP, endIP,
                                    ipv6, ip6Gateway, ip6Cidr, startIPv6, endIPv6, network);
                            if (sameSubnet) break;
                        }
                    } else {
                        vlanGateway = network.getGateway();
                        vlanNetmask = NetUtils.getCidrNetmask(network.getCidr());
                
                
            
            
        
        
    
    


Re: Can't create a zone using master

Posted by "Tutkowski, Mike" <Mi...@netapp.com>.
Also, for any CloudStack networking person out there who is curious about this, I see the following in cloud.log for my SSVM:

Wed Feb 15 01:07:50 UTC 2017 Incompleted parameters STORAGE_IP:, STORAGE_NETMASK:, STORAGE_CIDR:. Cannot setup storage network
Wed Feb 15 01:07:50 UTC 2017 Not setting up route of RFC1918 space to 10.117.40.126 befause 10.117.40.93 is RFC1918.

On 2/14/17, 6:14 PM, "Tutkowski, Mike" <Mi...@netapp.com> wrote:

    I’m not very familiar with the networking code that’s failing, but I worked around it with these changes:
    
    https://github.com/mike-tutkowski/cloudstack/commit/834b7ea7df18f278cbc9eb1bfaa9578fad2debeb
    
    I’m not sure if those are viable changes in this case, but perhaps someone who works in the networking area of CloudStack can say.
    
    The problem now, however (and maybe this is unrelated), is that neither my CPVM nor my SSVM report their agent as Running.
    
    Those system VMs do show as each having public, private, and link local IP addresses (as well as an IP address for their gateway).
    
    Is anyone else having these kinds of issues with recent master code?
    
    Thanks!
    Mike
    
    On 2/14/17, 3:02 PM, "Tutkowski, Mike" <Mi...@netapp.com> wrote:
    
        By the way, this is for a Basic Zone.
        
        On 2/14/17, 2:44 PM, "Tutkowski, Mike" <Mi...@netapp.com> wrote:
        
            Hi,
            
            I’m getting a NullPointerException when trying to create a zone using master.
            
            Below is the relevant code in ConfigurationManagerImpl.
            
            In the else block, network.getCidr() returns null and NetUtil.getCidrNetmask then throws a NullPointerException.
            
            I noticed that network.getGateway() also returns null (which seems odd).
            
            Thoughts on this?
            
            Thanks!
            Mike
            
            public Pair<Boolean, Pair<String, String>> validateIpRange(final String startIP, final String endIP, final String newVlanGateway, final String newVlanNetmask, final List<VlanVO> vlans, final boolean ipv4,
                    final boolean ipv6, String ip6Gateway, String ip6Cidr, final String startIPv6, final String endIPv6, final Network network) {
                String vlanGateway = null;
                String vlanNetmask = null;
                boolean sameSubnet = false;
                if (CollectionUtils.isNotEmpty(vlans)) {
                    for (final VlanVO vlan : vlans) {
                        vlanGateway = vlan.getVlanGateway();
                        vlanNetmask = vlan.getVlanNetmask();
                        sameSubnet = hasSameSubnet(ipv4, vlanGateway, vlanNetmask, newVlanGateway, newVlanNetmask, startIP, endIP,
                                ipv6, ip6Gateway, ip6Cidr, startIPv6, endIPv6, network);
                        if (sameSubnet) break;
                    }
                } else {
                    vlanGateway = network.getGateway();
                    vlanNetmask = NetUtils.getCidrNetmask(network.getCidr());
            
            
        
        
    
    


Re: Can't create a zone using master

Posted by "Tutkowski, Mike" <Mi...@netapp.com>.
I’m not very familiar with the networking code that’s failing, but I worked around it with these changes:

https://github.com/mike-tutkowski/cloudstack/commit/834b7ea7df18f278cbc9eb1bfaa9578fad2debeb

I’m not sure if those are viable changes in this case, but perhaps someone who works in the networking area of CloudStack can say.

The problem now, however (and maybe this is unrelated), is that neither my CPVM nor my SSVM report their agent as Running.

Those system VMs do show as each having public, private, and link local IP addresses (as well as an IP address for their gateway).

Is anyone else having these kinds of issues with recent master code?

Thanks!
Mike

On 2/14/17, 3:02 PM, "Tutkowski, Mike" <Mi...@netapp.com> wrote:

    By the way, this is for a Basic Zone.
    
    On 2/14/17, 2:44 PM, "Tutkowski, Mike" <Mi...@netapp.com> wrote:
    
        Hi,
        
        I’m getting a NullPointerException when trying to create a zone using master.
        
        Below is the relevant code in ConfigurationManagerImpl.
        
        In the else block, network.getCidr() returns null and NetUtil.getCidrNetmask then throws a NullPointerException.
        
        I noticed that network.getGateway() also returns null (which seems odd).
        
        Thoughts on this?
        
        Thanks!
        Mike
        
        public Pair<Boolean, Pair<String, String>> validateIpRange(final String startIP, final String endIP, final String newVlanGateway, final String newVlanNetmask, final List<VlanVO> vlans, final boolean ipv4,
                final boolean ipv6, String ip6Gateway, String ip6Cidr, final String startIPv6, final String endIPv6, final Network network) {
            String vlanGateway = null;
            String vlanNetmask = null;
            boolean sameSubnet = false;
            if (CollectionUtils.isNotEmpty(vlans)) {
                for (final VlanVO vlan : vlans) {
                    vlanGateway = vlan.getVlanGateway();
                    vlanNetmask = vlan.getVlanNetmask();
                    sameSubnet = hasSameSubnet(ipv4, vlanGateway, vlanNetmask, newVlanGateway, newVlanNetmask, startIP, endIP,
                            ipv6, ip6Gateway, ip6Cidr, startIPv6, endIPv6, network);
                    if (sameSubnet) break;
                }
            } else {
                vlanGateway = network.getGateway();
                vlanNetmask = NetUtils.getCidrNetmask(network.getCidr());
        
        
    
    


Re: Can't create a zone using master

Posted by "Tutkowski, Mike" <Mi...@netapp.com>.
By the way, this is for a Basic Zone.

On 2/14/17, 2:44 PM, "Tutkowski, Mike" <Mi...@netapp.com> wrote:

    Hi,
    
    I’m getting a NullPointerException when trying to create a zone using master.
    
    Below is the relevant code in ConfigurationManagerImpl.
    
    In the else block, network.getCidr() returns null and NetUtil.getCidrNetmask then throws a NullPointerException.
    
    I noticed that network.getGateway() also returns null (which seems odd).
    
    Thoughts on this?
    
    Thanks!
    Mike
    
    public Pair<Boolean, Pair<String, String>> validateIpRange(final String startIP, final String endIP, final String newVlanGateway, final String newVlanNetmask, final List<VlanVO> vlans, final boolean ipv4,
            final boolean ipv6, String ip6Gateway, String ip6Cidr, final String startIPv6, final String endIPv6, final Network network) {
        String vlanGateway = null;
        String vlanNetmask = null;
        boolean sameSubnet = false;
        if (CollectionUtils.isNotEmpty(vlans)) {
            for (final VlanVO vlan : vlans) {
                vlanGateway = vlan.getVlanGateway();
                vlanNetmask = vlan.getVlanNetmask();
                sameSubnet = hasSameSubnet(ipv4, vlanGateway, vlanNetmask, newVlanGateway, newVlanNetmask, startIP, endIP,
                        ipv6, ip6Gateway, ip6Cidr, startIPv6, endIPv6, network);
                if (sameSubnet) break;
            }
        } else {
            vlanGateway = network.getGateway();
            vlanNetmask = NetUtils.getCidrNetmask(network.getCidr());