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" <mike.tutkow...@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" <raj...@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.tutkow...@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 <raj...@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.tutkow...@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"
        <mike.tutkow...@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 <m...@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());
    
    

Reply via email to