[ https://issues.apache.org/jira/browse/CLOUDSTACK-6881?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Animesh Chaturvedi updated CLOUDSTACK-6881: ------------------------------------------- Fix Version/s: (was: 4.5.0) Future > MS:IPv4 Incorrect IPv4 address as iptonetworklist param raises insufficient > address capacity > -------------------------------------------------------------------------------------------- > > Key: CLOUDSTACK-6881 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-6881 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Management Server > Affects Versions: 4.4.0 > Reporter: Parth Jagirdar > Fix For: Future > > > We need a mechanism to validate 0's followed by a number in IPv4 addressing. > To reproduce, deploy a VM with static IPv4 where there is a single digit > number followed by a 0. > Example, 10.2.2.02 > API should return an appropriate error, This validation can be performed > using JS as a preventive method. > Refer to following.. Observed in dual stack. > 2014-06-09 11:44:47,608 DEBUG [o.a.c.i.RoleBasedEntityAccessChecker] > (catalina-exec-7:ctx-8d87d71b ctx-fc6ae1da) IAM access check for > 2-null-null-SystemCapability from cache: true > 2014-06-09 11:44:47,608 DEBUG [c.c.u.AccountManagerImpl] > (catalina-exec-7:ctx-8d87d71b ctx-fc6ae1da) Root Access granted to > Acct[298be2e2-df9d-11e3-98fe-ced18bec4952-admin] by > RoleBasedEntityAccessChecker > 2014-06-09 11:44:47,609 DEBUG [o.a.c.i.RoleBasedEntityAccessChecker] > (catalina-exec-7:ctx-8d87d71b ctx-fc6ae1da) IAM access check for > 2-null-null-DomainCapability from cache: false > 2014-06-09 11:44:47,610 DEBUG [o.a.c.i.RoleBasedEntityAccessChecker] > (catalina-exec-7:ctx-8d87d71b ctx-fc6ae1da) IAM access check for > 2-null-null-DomainResourceCapability from cache: false > 2014-06-09 11:44:47,611 DEBUG [c.c.n.NetworkModelImpl] > (catalina-exec-7:ctx-8d87d71b ctx-fc6ae1da) Service SecurityGroup is not > supported in the network id=222 > 2014-06-09 11:44:47,626 DEBUG [c.c.v.UserVmManagerImpl] > (catalina-exec-7:ctx-8d87d71b ctx-fc6ae1da) Allocating in the DB for vm > 2014-06-09 11:44:47,636 DEBUG [c.c.v.VirtualMachineManagerImpl] > (catalina-exec-7:ctx-8d87d71b ctx-fc6ae1da) Allocating entries for VM: > VM[User|i-2-143-VM] > 2014-06-09 11:44:47,637 DEBUG [c.c.v.VirtualMachineManagerImpl] > (catalina-exec-7:ctx-8d87d71b ctx-fc6ae1da) Allocating nics for > VM[User|i-2-143-VM] > 2014-06-09 11:44:47,638 DEBUG [o.a.c.e.o.NetworkOrchestrator] > (catalina-exec-7:ctx-8d87d71b ctx-fc6ae1da) Allocating nic for vm > VM[User|i-2-143-VM] in network > Ntwk[6c04eff1-972d-4119-bd97-e26c39d2bc0c|Guest|7] with requested profile > NicProfile[0-0-null-null-null > 2014-06-09 11:44:47,640 WARN [c.c.n.IpAddressManagerImpl] > (catalina-exec-7:ctx-8d87d71b ctx-fc6ae1da) Unable to get ip adress in zone > id=1, vlanId id=[1, 21], network id=222: requested ip 10.2.2.09 is not > available > 2014-06-09 11:44:47,641 DEBUG [c.c.u.d.T.Transaction] > (catalina-exec-7:ctx-8d87d71b ctx-fc6ae1da) Rolling back the transaction: > Time = 21 Name = catalina-exec-7; called by > -TransactionLegacy.rollback:903-TransactionLegacy.removeUpTo:846-TransactionLegacy.close:670-Transaction.execute:41-IpAddressManagerImpl.fetchNewPublicIp:661-IpAddressManagerImpl.assignPublicIpAddress:648-IpAddressManagerImpl$11.doInTransactionWithoutResult:1853-TransactionCallbackWithExceptionNoReturn.doInTransaction:25-TransactionCallbackWithExceptionNoReturn.doInTransaction:21-Transaction.execute:37-IpAddressManagerImpl.allocateDirectIp:1831-DirectNetworkGuru$1.doInTransactionWithoutResult:246 > 2014-06-09 11:44:47,650 INFO [o.a.c.a.c.u.v.DeployVMCmd] > (catalina-exec-7:ctx-8d87d71b ctx-fc6ae1da) > com.cloud.exception.InsufficientAddressCapacityException: Insufficient > address capacityScope=interface com.cloud.dc.DataCenter; id=1 > 2014-06-09 11:44:47,650 TRACE [o.a.c.a.c.u.v.DeployVMCmd] > (catalina-exec-7:ctx-8d87d71b ctx-fc6ae1da) Insufficient address capacity > com.cloud.exception.InsufficientAddressCapacityException: Insufficient > address capacityScope=interface com.cloud.dc.DataCenter; id=1 > at > com.cloud.network.IpAddressManagerImpl$2.doInTransaction(IpAddressManagerImpl.java:750) > at > com.cloud.network.IpAddressManagerImpl$2.doInTransaction(IpAddressManagerImpl.java:661) > at com.cloud.utils.db.Transaction.execute(Transaction.java:37) > at > com.cloud.network.IpAddressManagerImpl.fetchNewPublicIp(IpAddressManagerImpl.java:661) > at > com.cloud.network.IpAddressManagerImpl.assignPublicIpAddress(IpAddressManagerImpl.java:648) > at > com.cloud.network.IpAddressManagerImpl$11.doInTransactionWithoutResult(IpAddressManagerImpl.java:1853) > at > com.cloud.utils.db.TransactionCallbackWithExceptionNoReturn.doInTransaction(TransactionCallbackWithExceptionNoReturn.java:25) > at > com.cloud.utils.db.TransactionCallbackWithExceptionNoReturn.doInTransaction(TransactionCallbackWithExceptionNoReturn.java:21) > at com.cloud.utils.db.Transaction.execute(Transaction.java:37) > at > com.cloud.network.IpAddressManagerImpl.allocateDirectIp(IpAddressManagerImpl.java:1831) > at > com.cloud.network.guru.DirectNetworkGuru$1.doInTransactionWithoutResult(DirectNetworkGuru.java:246) > at > com.cloud.utils.db.TransactionCallbackWithExceptionNoReturn.doInTransaction(TransactionCallbackWithExceptionNoReturn.java:25) > at > com.cloud.utils.db.TransactionCallbackWithExceptionNoReturn.doInTransaction(TransactionCallbackWithExceptionNoReturn.java:21) > at com.cloud.utils.db.Transaction.execute(Transaction.java:37) > at > com.cloud.network.guru.DirectNetworkGuru.allocateDirectIp(DirectNetworkGuru.java:242) > at > com.cloud.network.guru.DirectNetworkGuru.allocate(DirectNetworkGuru.java:215) > at > org.apache.cloudstack.engine.orchestration.NetworkOrchestrator.allocateNic(NetworkOrchestrator.java:802) > at > org.apache.cloudstack.engine.orchestration.NetworkOrchestrator$3.doInTransactionWithoutResult(NetworkOrchestrator.java:748) > at > com.cloud.utils.db.TransactionCallbackWithExceptionNoReturn.doInTransaction(TransactionCallbackWithExceptionNoReturn.java:25) > at > com.cloud.utils.db.TransactionCallbackWithExceptionNoReturn.doInTransaction(TransactionCallbackWithExceptionNoReturn.java:21) > at com.cloud.utils.db.Transaction.execute(Transaction.java:37) > at > org.apache.cloudstack.engine.orchestration.NetworkOrchestrator.allocate(NetworkOrchestrator.java:708) > at > com.cloud.vm.VirtualMachineManagerImpl$1.doInTransactionWithoutResult(VirtualMachineManagerImpl.java:407) > at > com.cloud.utils.db.TransactionCallbackWithExceptionNoReturn.doInTransaction(TransactionCallbackWithExceptionNoReturn.java:25) > at > com.cloud.utils.db.TransactionCallbackWithExceptionNoReturn.doInTransaction(TransactionCallbackWithExceptionNoReturn.java:21) > at com.cloud.utils.db.Transaction.execute(Transaction.java:37) > at > com.cloud.vm.VirtualMachineManagerImpl.allocate(VirtualMachineManagerImpl.java:399) > at > org.apache.cloudstack.engine.orchestration.CloudOrchestrator.createVirtualMachine(CloudOrchestrator.java:236) > at > com.cloud.vm.UserVmManagerImpl$3.doInTransaction(UserVmManagerImpl.java:2967) > at > com.cloud.vm.UserVmManagerImpl$3.doInTransaction(UserVmManagerImpl.java:2860) > at com.cloud.utils.db.Transaction.execute(Transaction.java:37) > at > com.cloud.vm.UserVmManagerImpl.commitUserVm(UserVmManagerImpl.java:2860) > at > com.cloud.vm.UserVmManagerImpl.createVirtualMachine(UserVmManagerImpl.java:2798) > at > com.cloud.vm.UserVmManagerImpl.createAdvancedVirtualMachine(UserVmManagerImpl.java:2529) > at sun.reflect.GeneratedMethodAccessor431.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:606) > at > org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) > at > org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) > at > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) > at > org.apache.cloudstack.network.contrail.management.EventUtils$EventInterceptor.invoke(EventUtils.java:106) > at > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161) > at > com.cloud.event.ActionEventInterceptor.invoke(ActionEventInterceptor.java:51) > at > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161) > at > org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91) > at > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) > at > org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) > at com.sun.proxy.$Proxy206.createAdvancedVirtualMachine(Unknown > Source) > at > org.apache.cloudstack.api.command.user.vm.DeployVMCmd.create(DeployVMCmd.java:600) > at > com.cloud.api.dispatch.CommandCreationWorker.handle(CommandCreationWorker.java:47) > at > com.cloud.api.dispatch.DispatchChain.dispatch(DispatchChain.java:37) > at > com.cloud.api.ApiDispatcher.dispatchCreateCmd(ApiDispatcher.java:74) > at com.cloud.api.ApiServer.queueCommand(ApiServer.java:614) > at com.cloud.api.ApiServer.handleRequest(ApiServer.java:506) > at > com.cloud.api.ApiServlet.processRequestInContext(ApiServlet.java:330) > at com.cloud.api.ApiServlet.access$000(ApiServlet.java:54) > at com.cloud.api.ApiServlet$1.run(ApiServlet.java:118) > 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:115) > at com.cloud.api.ApiServlet.doGet(ApiServlet.java:77) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) > at > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) > at > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) > at > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) > at > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) > at > org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555) > at > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) > at > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) > at > org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:889) > at > org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:721) > at > org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2274) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) > at java.lang.Thread.run(Thread.java:744) > 2014-06-09 11:44:47,652 INFO [c.c.a.ApiServer] (catalina-exec-7:ctx-8d87d71b > ctx-fc6ae1da) Insufficient address capacity > 2014-06-09 11:44:47,653 DEBUG [o.a.c.i.RoleBasedEntityAccessChecker] > (catalina-exec-7:ctx-8d87d71b ctx-fc6ae1da) IAM access check for > 2-null-null-SystemCapability from cache: true > 2014-06-09 11:44:47,653 DEBUG [c.c.u.AccountManagerImpl] > (catalina-exec-7:ctx-8d87d71b ctx-fc6ae1da) Root Access granted to > Acct[298be2e2-df9d-11e3-98fe-ced18bec4952-admin] by > RoleBasedEntityAccessChecker > 2014-06-09 11:44:47,654 DEBUG [c.c.a.ApiServlet] > (catalina-exec-7:ctx-8d87d71b ctx-fc6ae1da) ===END=== 10.215.2.19 -- GET > command=deployVirtualMachine&serviceofferingid=b54dd0ee-12e3-4bc9-9751-b547d429a8e5&templateid=9c029bfc-76e8-484e-9e20-7a50c454027b&zoneid=2a5d9892-8f83-4194-b540-56c8926e555d&response=json&ip6&iptonetworklist[0].ipv6=fc00:3::0009&iptonetworklist[0].networkid=6c04eff1-972d-4119-bd97-e26c39d2bc0c&iptonetworklist[1].ip=10.2.2.09&iptonetworklist[1].networkid=6c04eff1-972d-4119-bd97-e26c39d2bc0c&startvm=true&sessionkey=wBLBTNsYE9WcAkc7CK89pyM9va0%3D&_=1402339142099 > 2014-06-09 11:44:47,909 DEBUG [c.c.a.m.AgentManagerImpl] > (AgentManager-Handler-1:null) SeqA 2-224317: Processing Seq 2-224317: { Cmd > , MgmtId: -1, via: 2, Ver: v1, Flags: 11, > [{"com.cloud.agent.api.ConsoleProxyLoadReportCommand":{"_proxyVmId":1,"_loadInfo":"{\n > \"connections\": []\n}","wait":0}}] } > 2014-06-09 11:44:47,915 DEBUG [c.c.a.m.AgentManagerImpl] > (AgentManager-Handler-1:null) SeqA 2-224317: Sending Seq 2-224317: { Ans: , > MgmtId: 227399391005010, via: 2, Ver: v1, Flags: 100010, > [{"com.cloud.agent.api.AgentControlAnswer":{"result":true,"wait":0}}] } > 2014-06-09 11:44:49,813 DEBUG [c.c.a.ApiServlet] > (catalina-exec-4:ctx-0c688e21) ===START=== 10.215.2.19 -- GET > command=listVirtualMachines&response=json&sessionkey=wBLBTNsYE9WcAkc7CK89pyM9va0%3D&listAll=true&page=1&pagesize=20&_=1402339489705 > 2014-06-09 11:44:49,824 DEBUG [o.a.c.i.RoleBasedEntityAccessChecker] > (catalina-exec-4:ctx-0c688e21 ctx-6e7a3877) IAM access check for > 2-null-null-SystemCapability from cache: true > 2014-06-09 11:44:49,825 DEBUG [c.c.u.AccountManagerImpl] > (catalina-exec-4:ctx-0c688e21 ctx-6e7a3877) Root Access granted to > Acct[298be2e2-df9d-11e3-98fe-ced18bec4952-admin] by > RoleBasedEntityAccessChecker > 2014-06-09 11:44:49,834 DEBUG [o.a.c.i.RoleBasedEntityAccessChecker] > (catalina-exec-4:ctx-0c688e21 ctx-6e7a3877) IAM access check for > 2-null-null-SystemCapability from cache: true > 2014-06-09 11:44:49,835 DEBUG [c.c.u.AccountManagerImpl] > (catalina-exec-4:ctx-0c688e21 ctx-6e7a3877) Root Access granted to > Acct[298be2e2-df9d-11e3-98fe-ced18bec4952-admin] by > RoleBasedEntityAccessChecker > 2014-06-09 11:44:49,836 DEBUG [o.a.c.i.RoleBasedEntityAccessChecker] > (catalina-exec-4:ctx-0c688e21 ctx-6e7a3877) IAM access check for > 2-null-null-SystemCapability from cache: true > 2014-06-09 11:44:49,836 DEBUG [c.c.u.AccountManagerImpl] > (catalina-exec-4:ctx-0c688e21 ctx-6e7a3877) Root Access granted to > Acct[298be2e2-df9d-11e3-98fe-ced18bec4952-admin] by > RoleBasedEntityAccessChecker > 2014-06-09 11:44:49,851 DEBUG [c.c.a.ApiServlet] > (catalina-exec-4:ctx-0c688e21 ctx-6e7a3877) ===END=== 10.215.2.19 -- GET > command=listVirtualMachines&response=json&sessionkey=wBLBTNsYE9WcAkc7CK89pyM9va0%3D&listAll=true&page=1&pagesize=20&_=1402339489705 > 2014-06-09 11:44:50,375 DEBUG [o.a.c.s.SecondaryStorageManagerImpl] > (secstorage-1:ctx-96352522) Zone 1 is ready to launch secondary storage VM > 2014-06-09 11:44:50,655 DEBUG [c.c.c.ConsoleProxyManagerImpl] > (consoleproxy-1:ctx-ea5c7998) Zone 1 is ready to launch console proxy > 2014-06-09 11:44:51,448 DEBUG [c.c.a.ApiServlet] > (catalina-exec-3:ctx-8dbc03c3) ===START=== 10.215.2.19 -- GET > command=listVirtualMachines&response=json&sessionkey=wBLBTNsYE9WcAkc7CK89pyM9va0%3D&listAll=true&page=1&pagesize=20&_=1402339491354 > 2014-06-09 11:44:51,459 DEBUG [o.a.c.i.RoleBasedEntityAccessChecker] > (catalina-exec-3:ctx-8dbc03c3 ctx-56472364) IAM access check for > 2-null-null-SystemCapability from cache: true > 2014-06-09 11:44:51,459 DEBUG [c.c.u.AccountManagerImpl] > (catalina-exec-3:ctx-8dbc03c3 ctx-56472364) Root Access granted to > Acct[298be2e2-df9d-11e3-98fe-ced18bec4952-admin] by > RoleBasedEntityAccessChecker > 2014-06-09 11:44:51,468 DEBUG [o.a.c.i.RoleBasedEntityAccessChecker] > (catalina-exec-3:ctx-8dbc03c3 ctx-56472364) IAM access check for > 2-null-null-SystemCapability from cache: true > 2014-06-09 11:44:51,469 DEBUG [c.c.u.AccountManagerImpl] > (catalina-exec-3:ctx-8dbc03c3 ctx-56472364) Root Access granted to > Acct[298be2e2-df9d-11e3-98fe-ced18bec4952-admin] by > RoleBasedEntityAccessChecker > 2014-06-09 11:44:51,470 DEBUG [o.a.c.i.RoleBasedEntityAccessChecker] > (catalina-exec-3:ctx-8dbc03c3 ctx-56472364) IAM access check for > 2-null-null-SystemCapability from cache: true > 2014-06-09 11:44:51,470 DEBUG [c.c.u.AccountManagerImpl] > (catalina-exec-3:ctx-8dbc03c3 ctx-56472364) Root Access granted to > Acct[298be2e2-df9d-11e3-98fe-ced18bec4952-admin] by > RoleBasedEntityAccessChecker > 2014-06-09 11:44:51,484 DEBUG [c.c.a.ApiServlet] > (catalina-exec-3:ctx-8dbc03c3 ctx-56472364) ===END=== 10.215.2.19 -- GET > command=listVirtualMachines&response=json&sessionkey=wBLBTNsYE9WcAkc7CK89pyM9va0%3D&listAll=true&page=1&pagesize=20&_=1402339491354 > 2014-06-09 11:44:52,484 DEBUG [c.c.a.ApiServlet] > (catalina-exec-13:ctx-aae0a91d) ===START=== 10.215.2.19 -- GET > command=listVirtualMachines&response=json&sessionkey=wBLBTNsYE9WcAkc7CK89pyM9va0%3D&listAll=true&page=1&pagesize=20&_=1402339492394 > 2014-06-09 11:44:52,495 DEBUG [o.a.c.i.RoleBasedEntityAccessChecker] > (catalina-exec-13:ctx-aae0a91d ctx-92420a6e) IAM access check for > 2-null-null-SystemCapability from cache: true > 2014-06-09 11:44:52,496 DEBUG [c.c.u.AccountManagerImpl] > (catalina-exec-13:ctx-aae0a91d ctx-92420a6e) Root Access granted to > Acct[298be2e2-df9d-11e3-98fe-ced18bec4952-admin] by > RoleBasedEntityAccessChecker > 2014-06-09 11:44:52,504 DEBUG [o.a.c.i.RoleBasedEntityAccessChecker] > (catalina-exec-13:ctx-aae0a91d ctx-92420a6e) IAM access check for > 2-null-null-SystemCapability from cache: true > 2014-06-09 11:44:52,505 DEBUG [c.c.u.AccountManagerImpl] > (catalina-exec-13:ctx-aae0a91d ctx-92420a6e) Root Access granted to > Acct[298be2e2-df9d-11e3-98fe-ced18bec4952-admin] by > RoleBasedEntityAccessChecker > 2014-06-09 11:44:52,506 DEBUG [o.a.c.i.RoleBasedEntityAccessChecker] > (catalina-exec-13:ctx-aae0a91d ctx-92420a6e) IAM access check for > 2-null-null-SystemCapability from cache: true > 2014-06-09 11:44:52,506 DEBUG [c.c.u.AccountManagerImpl] > (catalina-exec-13:ctx-aae0a91d ctx-92420a6e) Root Access granted to > Acct[298be2e2-df9d-11e3-98fe-ced18bec4952-admin] by > RoleBasedEntityAccessChecker > 2014-06-09 11:44:52,520 DEBUG [c.c.a.ApiServlet] > (catalina-exec-13:ctx-aae0a91d ctx-92420a6e) ===END=== 10.215.2.19 -- GET > command=listVirtualMachines&response=json&sessionkey=wBLBTNsYE9WcAkc7CK89pyM9va0%3D&listAll=true&page=1&pagesize=20&_=1402339492394 -- This message was sent by Atlassian JIRA (v6.3.4#6332)