You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cloudstack.apache.org by "shweta agarwal (JIRA)" <ji...@apache.org> on 2013/07/10 13:25:49 UTC

[jira] [Closed] (CLOUDSTACK-3347) user can not Delete his own template in case of project

     [ https://issues.apache.org/jira/browse/CLOUDSTACK-3347?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

shweta agarwal closed CLOUDSTACK-3347.
--------------------------------------


Verified on build:
CloudPlatform-4.2-CR-1-rhel6.3
Passed
                
> user can not Delete his own template in case of project
> -------------------------------------------------------
>
>                 Key: CLOUDSTACK-3347
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-3347
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>          Components: Projects
>    Affects Versions: 4.2.0
>         Environment: build:
> CloudPlatform-4.2-138-rhel6.3
>            Reporter: shweta agarwal
>            Assignee: Alena Prokharchyk
>            Priority: Blocker
>             Fix For: 4.2.0
>
>
> Repro steps:
> 1. Create a domain and some accounts /user in that domain
> 2. Create a project in that domain
> 3. Create a private template in the project
> 4. Delete the self created template
> Bug:
> Gets message Acct[7-childuser1] does not have permission to launch instances from Tmpl[206-VHD-206-6-3e83bd51-45e4-38ee-baec-c69bc03e17f2
> Expected Result:
> Template should be deleted
> API : 
> http://10.147.38.141:8080/client/api?command=deleteTemplate&id=6a6f87b9-8ab9-4b8f-a0eb-025c7a05d205&zoneid=f5bac28a-d422-4e1f-aed4-f6fc1d50b25a&response=json&sessionkey=huC8edrh0luuiRKbDzx5zX7CsdE%3D&projectid=8b2f334b-9b24-49eb-b583-cab1e5fe9094&_=1372847678963
> http://10.147.38.141:8080/client/api?command=queryAsyncJobResult&jobId=24118872-2e94-4923-b8a2-b214a9887172&response=json&sessionkey=huC8edrh0luuiRKbDzx5zX7CsdE%3D&projectid=8b2f334b-9b24-49eb-b583-cab1e5fe9094&_=1372847682509
> response: 
> { "queryasyncjobresultresponse" : {"accountid":"d13705fb-4bc4-43cb-8809-21a5966127d4","userid":"18eb25ae-cee6-4e8c-85b3-770f0c0db9e2","cmd":"org.apache.cloudstack.api.command.user.template.DeleteTemplateCmd","jobstatus":2,"jobprocstatus":0,"jobresultcode":530,"jobresulttype":"object","jobresult":{"errorcode":530,"errortext":"Acct[7-childuser1] does not have permission to launch instances from Tmpl[206-VHD-206-6-3e83bd51-45e4-38ee-baec-c69bc03e17f2"},"created":"2013-07-03T16:04:38+0530","jobid":"24118872-2e94-4923-b8a2-b214a9887172"} }
> MS log shows :
> 2013-07-03 16:04:38,131 DEBUG [cloud.api.ApiServlet] (catalina-exec-23:null) ===START===  10.146.0.12 -- GET  command=deleteTemplate&id=6a6f87b9-8ab9-4b8f-a0eb-025c7a05d205&zoneid=f5bac28a-d422-4e1f-aed4-f6fc1d50b25a&response=json&sessionkey=huC8edrh0luuiRKbDzx5zX7CsdE%3D&projectid=8b2f334b-9b24-49eb-b583-cab1e5fe9094&_=1372847678963
> 2013-07-03 16:04:38,176 DEBUG [cloud.async.AsyncJobManagerImpl] (catalina-exec-23:null) submit async job-92, details: AsyncJobVO {id:92, userId: 6, accountId: 7, sessionKey: null, instanceType: Template, instanceId: 206, cmd: org.apache.cloudstack.api.command.user.template.DeleteTemplateCmd, cmdOriginator: null, cmdInfo: {"id":"6a6f87b9-8ab9-4b8f-a0eb-025c7a05d205","response":"json","sessionkey":"huC8edrh0luuiRKbDzx5zX7CsdE\u003d","ctxUserId":"6","zoneid":"f5bac28a-d422-4e1f-aed4-f6fc1d50b25a","httpmethod":"GET","_":"1372847678963","projectid":"8b2f334b-9b24-49eb-b583-cab1e5fe9094","ctxAccountId":"7","ctxStartEventId":"385"}, cmdVersion: 0, callbackType: 0, callbackAddress: null, status: 0, processStatus: 0, resultCode: 0, result: null, initMsid: 7159676928023, completeMsid: null, lastUpdated: null, lastPolled: null, created: null}
> 2013-07-03 16:04:38,181 DEBUG [cloud.api.ApiServlet] (catalina-exec-23:null) ===END===  10.146.0.12 -- GET  command=deleteTemplate&id=6a6f87b9-8ab9-4b8f-a0eb-025c7a05d205&zoneid=f5bac28a-d422-4e1f-aed4-f6fc1d50b25a&response=json&sessionkey=huC8edrh0luuiRKbDzx5zX7CsdE%3D&projectid=8b2f334b-9b24-49eb-b583-cab1e5fe9094&_=1372847678963
> 2013-07-03 16:04:38,186 DEBUG [cloud.async.AsyncJobManagerImpl] (Job-Executor-23:job-92) Executing org.apache.cloudstack.api.command.user.template.DeleteTemplateCmd for job-92
> 2013-07-03 16:04:38,237 ERROR [cloud.async.AsyncJobManagerImpl] (Job-Executor-23:job-92) Unexpected exception while executing org.apache.cloudstack.api.command.user.template.DeleteTemplateCmd
> com.cloud.exception.PermissionDeniedException: Acct[7-childuser1] does not have permission to launch instances from Tmpl[206-VHD-206-6-3e83bd51-45e4-38ee-baec-c69bc03e17f2
>         at com.cloud.acl.DomainChecker.checkAccess(DomainChecker.java:103)
>         at com.cloud.user.AccountManagerImpl.checkAccess(AccountManagerImpl.java:403)
>         at com.cloud.template.TemplateManagerImpl.deleteTemplate(TemplateManagerImpl.java:1433)
>         at com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
>         at org.apache.cloudstack.api.command.user.template.DeleteTemplateCmd.execute(DeleteTemplateCmd.java:112)
>         at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:155)
>         at com.cloud.async.AsyncJobManagerImpl$1.run(AsyncJobManagerImpl.java:437)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
>         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:166)
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>         at java.lang.Thread.run(Thread.java:679)
> 2013-07-03 16:04:38,239 DEBUG [cloud.async.AsyncJobManagerImpl] (Job-Executor-23:job-92) Complete async job-92, jobStatus: 2, resultCode: 530, result: Error Code: 530 Error text: Acct[7-childuser1] does not have permission to launch instances from Tmpl[206-VHD-206-6-3e83bd51-45e4-38ee-baec-c69bc03e17f2
> 2013-07-03 16:04:38,246 DEBUG [agent.manager.AgentManagerImpl] (AgentManager-Handler-11:null) SeqA 3-9931: Processing Seq 3-9931:  { Cmd , MgmtId: -1, via: 3, Ver: v1, Flags: 11, [{"ConsoleProxyLoadReportCommand":{"_proxyVmId":2,"_loadInfo":"{\n  \"connections\": []\n}","wait":0}}] }
> 2013-07-03 16:04:38,287 DEBUG [agent.manager.AgentManagerImpl] (AgentManager-Handler-11:null) SeqA 3-9931: Sending Seq 3-9931:  { Ans: , MgmtId: 7159676928023, via: 3, Ver: v1, Flags: 100010, [{"AgentControlAnswer":{"result":true,"wait":0}}] }
> 2013-07-03 16:04:39,663 DEBUG [agent.manager.DirectAgentAttache] (DirectAgent-361:null) Ping from 7
> 2013-07-03 16:04:40,846 DEBUG [agent.manager.AgentManagerImpl] (AgentManager-Handler-13:null) SeqA 10-464: Processing Seq 10-464:  { Cmd , MgmtId: -1, via: 10, Ver: v1, Flags: 11, [{"ConsoleProxyLoadReportCommand":{"_proxyVmId":59,"_loadInfo":"{\n  \"connections\": []\n}","wait":0}}] }
> 2013-07-03 16:04:40,860 DEBUG [agent.manager.AgentManagerImpl] (AgentManager-Handler-13:null) SeqA 10-464: Sending Seq 10-464:  { Ans: , MgmtId: 7159676928023, via: 10, Ver: v1, Flags: 100010, [{"AgentControlAnswer":{"result":true,"wait":0}}] }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira