cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "shweta agarwal (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CLOUDSTACK-3448) RemoveNicFromVMCmd fails in case of projects
Date Wed, 10 Jul 2013 12:17:48 GMT
shweta agarwal created CLOUDSTACK-3448:
------------------------------------------

             Summary: RemoveNicFromVMCmd fails in case of projects
                 Key: CLOUDSTACK-3448
                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-3448
             Project: CloudStack
          Issue Type: Bug
      Security Level: Public (Anyone can view this level - this is the default.)
          Components: Network Controller, Projects
    Affects Versions: 4.2.0
            Reporter: shweta agarwal
            Priority: Critical


Repro steps:
1. Create a domain
2. Create a account in that domain
3. Create a project in that domain
4.Create a VM  with multiple networks in the project
6. Remove one of the network from the VM created in the Project

BUG:
Gets error message:
Unable to modify a vm using network with id 215, permission denied

api:
http://10.147.38.141:8080/client/api?command=removeNicFromVirtualMachine&response=json&sessionkey=wr4cbYy58%2BZqNa1rJq94MF0X0Iw%3D&projectid=7a85c310-193d-4384-b0e4-2a078b30932d&virtualmachineid=f8911651-1b4c-425e-b015-eba6ca748764&nicid=db99325f-dfdc-4756-b6fd-140d550e78d4&_=1373458385082

Response:
{ "queryasyncjobresultresponse" : {"accountid":"c2e8ac5d-e168-4f6f-a88b-7f4d43a0f18e","userid":"3520753d-1b8f-4286-975d-b7bd5b415468","cmd":"org.apache.cloudstack.api.command.user.vm.RemoveNicFromVMCmd","jobstatus":2,"jobprocstatus":0,"jobresultcode":530,"jobresulttype":"object","jobresult":{"errorcode":530,"errortext":"Unable
to modify a vm using network with id 212, permission denied"},"created":"2013-07-10T17:43:06+0530","jobid":"dac85bcc-122e-43e4-8123-659a5aedd571"}
}


MS log shows: 
2013-07-10 17:43:05,858 DEBUG [cloud.api.ApiServlet] (catalina-exec-4:null) ===START===  10.146.0.132
-- GET  command=removeNicFromVirtualMachine&response=json&sessionkey=wr4cbYy58%2BZqNa1rJq94MF0X0Iw%3D&projectid=7a85c310-193d-4384-b0e4-2a078b30932d&virtualmachineid=f8911651-1b4c-425e-b015-eba6ca748764&nicid=db99325f-dfdc-4756-b6fd-140d550e78d4&_=1373458385082
2013-07-10 17:43:06,937 DEBUG [cloud.async.AsyncJobManagerImpl] (catalina-exec-4:null) submit
async job-49, details: AsyncJobVO {id:49, userId: 3, accountId: 3, sessionKey: null, instanceType:
None, instanceId: null, cmd: org.apache.cloudstack.api.command.user.vm.RemoveNicFromVMCmd,
cmdOriginator: null, cmdInfo: {"response":"json","sessionkey":"wr4cbYy58+ZqNa1rJq94MF0X0Iw\u003d","virtualmachineid":"f8911651-1b4c-425e-b015-eba6ca748764","nicid":"db99325f-dfdc-4756-b6fd-140d550e78d4","ctxUserId":"3","httpmethod":"GET","_":"1373458385082","projectid":"7a85c310-193d-4384-b0e4-2a078b30932d","ctxAccountId":"3","ctxStartEventId":"209"},
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-10 17:43:06,941 DEBUG [cloud.api.ApiServlet] (catalina-exec-4:null) ===END===  10.146.0.132
-- GET  command=removeNicFromVirtualMachine&response=json&sessionkey=wr4cbYy58%2BZqNa1rJq94MF0X0Iw%3D&projectid=7a85c310-193d-4384-b0e4-2a078b30932d&virtualmachineid=f8911651-1b4c-425e-b015-eba6ca748764&nicid=db99325f-dfdc-4756-b6fd-140d550e78d4&_=1373458385082
2013-07-10 17:43:06,945 DEBUG [cloud.async.AsyncJobManagerImpl] (Job-Executor-17:job-49) Executing
org.apache.cloudstack.api.command.user.vm.RemoveNicFromVMCmd for job-49
2013-07-10 17:43:06,983 DEBUG [cloud.user.AccountManagerImpl] (Job-Executor-17:job-49) Access
to VM[User|f8911651-1b4c-425e-b015-eba6ca748764] granted to Acct[3-shweta] by DomainChecker_EnhancerByCloudStack_5fedb7bf
2013-07-10 17:43:06,989 ERROR [cloud.async.AsyncJobManagerImpl] (Job-Executor-17:job-49) Unexpected
exception while executing org.apache.cloudstack.api.command.user.vm.RemoveNicFromVMCmd
com.cloud.exception.PermissionDeniedException: Unable to modify a vm using network with id
212, permission denied
        at com.cloud.vm.UserVmManagerImpl.removeNicFromVirtualMachine(UserVmManagerImpl.java:944)
        at org.apache.cloudstack.api.command.user.vm.RemoveNicFromVMCmd.execute(RemoveNicFromVMCmd.java:103)
        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-10 17:43:06,990 DEBUG [cloud.async.AsyncJobManagerImpl] (Job-Executor-17:job-49) Complete
async job-49, jobStatus: 2, resultCode: 530, result: Error Code: 530 Error text: Unable to
modify a vm using network with id 212, permission denied
2013-07-10 17:43:10,032 DEBUG [cloud.api.ApiServlet] (catalina-exec-10:null) ===START=== 
10.146.0.132 -- GET  command=queryAsyncJobResult&jobId=dac85bcc-122e-43e4-8123-659a5aedd571&response=json&sessionkey=wr4cbYy58%2BZqNa1rJq94MF0X0Iw%3D&projectid=7a85c310-193d-4384-b0e4-2a078b30932d&_=1373458389333
2013-07-10 17:43:10,055 DEBUG [cloud.async.AsyncJobManagerImpl] (catalina-exec-10:null) Async
job-49 completed

 

--
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

Mime
View raw message