[
https://issues.apache.org/jira/browse/CLOUDSTACK-8845?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15040792#comment-15040792
]
ASF GitHub Bot commented on CLOUDSTACK-8845:
--------------------------------------------
GitHub user anshul1886 opened a pull request:
https://github.com/apache/cloudstack/pull/1164
CLOUDSTACK-8845: Fixed list snapshots command throwing exception
https://issues.apache.org/jira/browse/CLOUDSTACK-8845
Fixed list snapshots command throwing exception if any one of snapshot is
not present on primary.
Bug got introduced because of KVM specific code.
Testing done
List snapashots working fine.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/anshul1886/cloudstack-1 CLOUDSTACK-8845
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cloudstack/pull/1164.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1164
----
commit 91578903e1c687991329aac1518ca6717ac81285
Author: Anshul Gangwar <[email protected]>
Date: 2015-11-23T09:26:53Z
CLOUDSTACK-8845: Fixed list snapshots command throwing exception if any one
of snapshot is not present on primary
Bug got introduced because of KVM specific code
----
> list snapshot without id is failing with Unable to determine the storage pool
> of the snapshot
> ---------------------------------------------------------------------------------------------
>
> Key: CLOUDSTACK-8845
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8845
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Components: API
> Affects Versions: 4.6.0
> Reporter: prashant kumar mishra
> Assignee: Anshul Gangwar
> Labels: snapshot
> Attachments: cloud.dmp, management-server.log
>
>
> steps
> --------
> Try to list snapshot using api/UI without passing id
> http://10.*.*.*:8080/client/api?command=listSnapshots&response=json&_=1442227513154
> {"listsnapshotsresponse":{"uuidList":[],"errorcode":530,"cserrorcode":4250,"errortext":"Unable
> to determine the storage pool of the snapshot"}}
> logs
> -----
> 2015-09-14 10:23:10,579 DEBUG [c.c.a.ApiServlet]
> (catalina-exec-4:ctx-600cffa2) ===START=== 10.252.193.23 -- GET
> command=listSnapshots&response=json&_=1442227513154
> 2015-09-14 10:23:10,635 ERROR [c.c.a.ApiServer] (catalina-exec-4:ctx-600cffa2
> ctx-92e1cd5e) unhandled exception executing api command:
> [Ljava.lang.String;@10e4744f
> com.cloud.utils.exception.CloudRuntimeException: Unable to determine the
> storage pool of the snapshot
> at
> org.apache.cloudstack.storage.snapshot.StorageSystemSnapshotStrategy.canHandle(StorageSystemSnapshotStrategy.java:455)
> at
> org.apache.cloudstack.storage.helper.StorageStrategyFactoryImpl$3.canHandle(StorageStrategyFactoryImpl.java:72)
> at
> org.apache.cloudstack.storage.helper.StorageStrategyFactoryImpl$3.canHandle(StorageStrategyFactoryImpl.java:69)
> at
> org.apache.cloudstack.storage.helper.StorageStrategyFactoryImpl.bestMatch(StorageStrategyFactoryImpl.java:95)
> at
> org.apache.cloudstack.storage.helper.StorageStrategyFactoryImpl.getSnapshotStrategy(StorageStrategyFactoryImpl.java:69)
> at
> org.apache.cloudstack.storage.snapshot.SnapshotObject.isRevertable(SnapshotObject.java:133)
> at
> com.cloud.api.ApiResponseHelper.createSnapshotResponse(ApiResponseHelper.java:499)
> at
> org.apache.cloudstack.api.command.user.snapshot.ListSnapshotsCmd.execute(ListSnapshotsCmd.java:114)
> at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:141)
> at com.cloud.api.ApiServer.queueCommand(ApiServer.java:704)
> at com.cloud.api.ApiServer.handleRequest(ApiServer.java:529)
> at com.cloud.api.ApiServlet.processRequestInContext(ApiServlet.java:296)
> at com.cloud.api.ApiServlet$1.run(ApiServlet.java:127)
> 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:124)
> at com.cloud.api.ApiServlet.doGet(ApiServlet.java:86)
> 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:2268)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
> 2015-09-14 10:23:10,638 DEBUG [c.c.a.ApiServlet]
> (catalina-exec-4:ctx-600cffa2 ctx-92e1cd5e) ===END=== 10.252.193.23 -- GET
> command=listSnapshots&response=json&_=1442227513154
> 2015-09-14 10:23:18,098 INFO [o.a.c.f.j.i.AsyncJobManagerImpl]
> (AsyncJobMgr-Heartbeat-1:ctx-b7a4637f) Begin cleanup expired async-jobs
> 2015-09-14 10:23:18,104 INFO [o.a.c.f.j.i.AsyncJobManagerImpl]
> (AsyncJobMgr-Heartbeat-1:ctx-b7a4637f) End cleanup expired async-jobs
> 2015-09-14 10:23:18,472 DEBUG [c.c.a.m.AgentManagerImpl]
> (AgentManager-Handler-1:null) SeqA 2-1758: Processing Seq 2-1758: { Cmd ,
> MgmtId: -1, via: 2, Ver: v1, Flags: 11,
> [{"com.cloud.agent.api.ConsoleProxyLoadReportCommand":{"_proxyVmId":2,"_loadInfo":"{\n
> \"connections\": []\n}","wait":0}}] }
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)