[ https://issues.apache.org/jira/browse/CLOUDSTACK-8923?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14960560#comment-14960560 ]
ASF subversion and git services commented on CLOUDSTACK-8923: ------------------------------------------------------------- Commit 9363be33972eaccf734fd3caa04dfb981a788dce in cloudstack's branch refs/heads/master from [~rajanik] [ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=9363be3 ] Merge pull request #934 from karuturi/CLOUDSTACK-8923 [4.6][BLOCKER] CLOUDSTACK-8923: Create storage network IP range failedThis is a regression from commit 0cd8c06f7dceaf999acf202862c5d1d580e7aa0e try-with-resource used at https://github.com/apache/cloudstack/blob/master/server/src/com/cloud/network/StorageNetworkManagerImpl.java#L107 is closing the transaction. At later point when the transaction is actually committed, it doesn't find the transaction and hence the exception. testing: manually tested that create storage network api succeeds. ``` cloudmonkey > create storagenetworkiprange gateway=192.168.200.67 netmask=255.255.255.0 startip=192.168.200.200 endip=192.168.200.202 podid=544e3be0-9bc6-428f-9237-bf777053ab2e \ accountid = 120b521c-725c-11e5-9244-7278fd1d2943 cmd = org.apache.cloudstack.api.command.admin.network.CreateStorageNetworkIpRangeCmd created = 2015-10-15T09:31:22+0000 jobid = c86c4968-bc6e-4255-aa11-39221eb2277f jobprocstatus = 0 jobresult: storagenetworkiprange: id = df491e87-7a00-4b5e-9bfe-e811fe78c9cd endip = 192.168.200.202 gateway = 192.168.200.67 netmask = 255.255.255.0 startip = 192.168.200.200 jobresultcode = 0 jobresulttype = object jobstatus = 1 userid = 120b6414-725c-11e5-9244-7278fd1d2943 ``` ``` cloudmonkey > list storagenetworkiprange count = 1 storagenetworkiprange: id = df491e87-7a00-4b5e-9bfe-e811fe78c9cd endip = 192.168.200.202 gateway = 192.168.200.67 netmask = 255.255.255.0 networkid = a0f7faf9-83a1-4af5-b420-d8a78f2f59d8 podid = 544e3be0-9bc6-428f-9237-bf777053ab2e startip = 192.168.200.200 zoneid = 34b9a0a1-758c-442b-9bc6-7bce03157d4c ``` * pr/934: CLOUDSTACK-8923: Create storage network IP range failed Signed-off-by: Rajani Karuturi <rajani.karut...@citrix.com> > Create storage network IP range failed, Unknown parameters : zoneid > ------------------------------------------------------------------- > > Key: CLOUDSTACK-8923 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8923 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Secondary Storage > Affects Versions: 4.6.0 > Environment: CentOS 6 HVs and MGMT > Reporter: Nux > Assignee: Rajani Karuturi > Priority: Blocker > Fix For: 4.6.0 > > Attachments: > 0001-CLOUDSTACK-8923-Create-storage-network-IP-range-fail.patch > > > I am installing ACS from today's master (3ded3e9 > http://tmp.nux.ro/acs460snap/ ). > Adding an initial zone via the web UI wizard fails at the secondary storage > setup stage: > 2015-09-29 14:07:40,319 INFO [o.a.c.f.j.i.AsyncJobMonitor] > (API-Job-Executor-25:ctx-73c1ad88 job-27) Add job-27 into job monitoring > 2015-09-29 14:07:40,322 DEBUG [c.c.a.ApiServlet] > (catalina-exec-5:ctx-314bbaae ctx-2db63923) ===END=== 85.13.192.198 -- GET > command=createStorageNetworkIpRange&response=json&gateway=192.168.200.67&netmask=255.255.255.0&vlan=123&startip=192.168.200.200&endip=192.168.200.222&zoneid=2f0efdcf-adf6-4373-858e-87de6af4cc08&podid=eb7814d2-9a22-4ca4-93af-4a6b8abac67c&_=1443532060283 > 2015-09-29 14:07:40,327 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] > (API-Job-Executor-25:ctx-73c1ad88 job-27) Executing AsyncJobVO {id:27, > userId: 2, accountId: 2, instanceType: None, instanceId: null, cmd: > org.apache.cloudstack.api.command.admin.network.CreateStorageNetworkIpRangeCmd, > cmdInfo: {"response":"json","ctxDetails":"{\"interface > com.cloud.dc.Pod\":\"eb7814d2-9a22-4ca4-93af-4a6b8abac67c\"}","cmdEventType":"STORAGE.IP.RANGE.CREATE","ctxUserId":"2","gateway":"192.168.200.67","podid":"eb7814d2-9a22-4ca4-93af-4a6b8abac67c","zoneid":"2f0efdcf-adf6-4373-858e-87de6af4cc08","startip":"192.168.200.200","vlan":"123","httpmethod":"GET","_":"1443532060283","ctxAccountId":"2","ctxStartEventId":"68","netmask":"255.255.255.0","endip":"192.168.200.222"}, > cmdVersion: 0, status: IN_PROGRESS, processStatus: 0, resultCode: 0, result: > null, initMsid: 266785867798693, completeMsid: null, lastUpdated: null, > lastPolled: null, created: null} > 2015-09-29 14:07:40,330 WARN [c.c.a.d.ParamGenericValidationWorker] > (API-Job-Executor-25:ctx-73c1ad88 job-27 ctx-1fa03c4a) Received unknown > parameters for command createStorageNetworkIpRange. Unknown parameters : > zoneid > 2015-09-29 14:07:40,391 WARN [o.a.c.a.c.a.n.CreateStorageNetworkIpRangeCmd] > (API-Job-Executor-25:ctx-73c1ad88 job-27 ctx-1fa03c4a) Create storage network > IP range failed > com.cloud.utils.exception.CloudRuntimeException: Unable to commit or close > the connection. > at > com.cloud.utils.db.TransactionLegacy.commit(TransactionLegacy.java:730) > at com.cloud.utils.db.Transaction.execute(Transaction.java:46) > at > com.cloud.network.StorageNetworkManagerImpl.createIpRange(StorageNetworkManagerImpl.java:229) > at > org.apache.cloudstack.api.command.admin.network.CreateStorageNetworkIpRangeCmd.execute(CreateStorageNetworkIpRangeCmd.java:118) > at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:150) > at > com.cloud.api.ApiAsyncJobDispatcher.runJob(ApiAsyncJobDispatcher.java:108) > at > org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.runInContext(AsyncJobManagerImpl.java:537) > at > org.apache.cloudstack.managed.context.ManagedContextRunnable$1.run(ManagedContextRunnable.java:49) > 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 > org.apache.cloudstack.managed.context.ManagedContextRunnable.run(ManagedContextRunnable.java:46) > at > org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.run(AsyncJobManagerImpl.java:494) > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) > at java.util.concurrent.FutureTask.run(FutureTask.java:262) > 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:745) > Caused by: java.sql.SQLException: Connection is closed. > at > org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.checkOpen(PoolingDataSource.java:185) > at > org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.commit(PoolingDataSource.java:210) > at > com.cloud.utils.db.TransactionLegacy.commit(TransactionLegacy.java:722) > ... 17 more > 2015-09-29 14:07:40,392 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] > (API-Job-Executor-25:ctx-73c1ad88 job-27) Complete async job-27, jobStatus: > FAILED, resultCode: 530, result: > org.apache.cloudstack.api.response.ExceptionResponse/null/{"uuidList":[],"errorcode":530,"errortext":"Unable > to commit or close the connection. "} > 2015-09-29 14:07:40,393 ERROR [o.a.c.f.j.i.AsyncJobManagerImpl] > (API-Job-Executor-25:ctx-73c1ad88 job-27) Unexpected exception > com.cloud.utils.exception.CloudRuntimeException: DB Exception on: null > at com.cloud.utils.db.GenericDaoBase.findById(GenericDaoBase.java:1012) > at com.cloud.utils.db.GenericDaoBase.lockRow(GenericDaoBase.java:989) > at com.cloud.utils.db.GenericDaoBase.findById(GenericDaoBase.java:947) > at sun.reflect.GeneratedMethodAccessor43.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 > com.cloud.utils.db.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:34) > 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.$Proxy179.findById(Unknown Source) > at > org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl.completeAsyncJob(AsyncJobManagerImpl.java:231) > at > com.cloud.api.ApiAsyncJobDispatcher.runJob(ApiAsyncJobDispatcher.java:136) > at > org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.runInContext(AsyncJobManagerImpl.java:537) > at > org.apache.cloudstack.managed.context.ManagedContextRunnable$1.run(ManagedContextRunnable.java:49) > 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 > org.apache.cloudstack.managed.context.ManagedContextRunnable.run(ManagedContextRunnable.java:46) > at > org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.run(AsyncJobManagerImpl.java:494) > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) > at java.util.concurrent.FutureTask.run(FutureTask.java:262) > 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:745) > Caused by: java.sql.SQLException: Connection is closed. > at > org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.checkOpen(PoolingDataSource.java:185) > at > org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.prepareStatement(PoolingDataSource.java:312) > at > com.cloud.utils.db.TransactionLegacy.prepareStatement(TransactionLegacy.java:458) > ... 30 more > 2015-09-29 14:07:40,393 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] > (API-Job-Executor-25:ctx-73c1ad88 job-27) Complete async job-27, jobStatus: > FAILED, resultCode: 530, result: null -- This message was sent by Atlassian JIRA (v6.3.4#6332)