cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tutkowski, Mike" <Mike.Tutkow...@netapp.com>
Subject Re: Can't create a zone using master
Date Wed, 15 Feb 2017 19:32:29 GMT
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.Tutkowski@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 <mail@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());
    >> 
    

Mime
View raw message