[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-5343?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13841833#comment-13841833
 ] 

Prachi Damle commented on CLOUDSTACK-5343:
------------------------------------------

I cannot reproduce this on 4.3 or master.

Steps I did and logs:

1. Created an account and set its volume limit to 1
2. Logged in to that user account
3. Check the limit:

2013-12-06 14:38:06,996 INFO  [a.c.c.a.ApiServer] 
(714492401@qtp-1568679750-9:ctx-e6290d24 ctx-b179055b) (userId=4 accountId=4 
sessionId=1mzx1vwqzgu08zsvzs302end) 127.0.0.1 -- GET 
command=listAccounts&response=json&sessionkey=bWDWTB4fHt8vuWnScvNMMEBvNSk%3D&listAll=true&page=1&pagesize=20&_=1386369486905
 200 { "listaccountsresponse" : { "count":1 ,"account" : [  
{"id":"e8ccdec2-1122-41de-b3c0-334fde896028","name":"useracct2","accounttype":0,"domainid":"d62936cf-5dfa-11e3-aa10-0ba1073e21ea","domain":"ROOT","receivedbytes":0,"sentbytes":0,"vmlimit":"20","vmtotal":0,"vmavailable":"20","iplimit":"20","iptotal":1,"ipavailable":"13","volumelimit":"1","volumetotal":0,"volumeavailable":"1","snapshotlimit":"20","snapshottotal":0,"snapshotavailable":"20","templatelimit":"20","templatetotal":0,"templateavailable":"20","projectlimit":"Unlimited","projecttotal":0,"projectavailable":"Unlimited","networklimit":"20","networktotal":1,"networkavailable":"19","vpclimit":"20","vpctotal":0,"vpcavailable":"20","cpulimit":"40","cputotal":0,"cpuavailable":"40","memorylimit":"40960","memorytotal":0,"memoryavailable":"40960","primarystoragelimit":"200","primarystoragetotal":40,"primarystorageavailable":"160","secondarystoragelimit":"400","secondarystoragetotal":0,"secondarystorageavailable":"400","state":"enabled","user":[{"id":"bb826f5e-72d2-41e5-9339-3b74f4f63386","username":"user2","firstname":"u","lastname":"s","email":"[email protected]","created":"2013-12-06T14:07:19-0800","state":"enabled","account":"useracct2","accounttype":0,"domainid":"d62936cf-5dfa-11e3-aa10-0ba1073e21ea","domain":"ROOT","accountid":"e8ccdec2-1122-41de-b3c0-334fde896028","iscallerchilddomain":false,"isdefault":false}],"isdefault":false}
 ] } }


3. Deploy a VM with no data disk. Only ROOT disk gets created.

2013-12-06 14:39:05,048 INFO  [a.c.c.a.ApiServer] 
(2124842917@qtp-1568679750-6:ctx-f89c45d7 ctx-5d72cd56) (userId=4 accountId=4 
sessionId=1mzx1vwqzgu08zsvzs302end) 127.0.0.1 -- GET 
command=deployVirtualMachine&response=json&sessionkey=bWDWTB4fHt8vuWnScvNMMEBvNSk%3D&zoneid=c386be0f-603f-45ee-8e11-efeb3403fdda&templateid=d4465acb-5dfa-11e3-aa10-0ba1073e21ea&hypervisor=XenServer&serviceofferingid=6b596854-21ce-4d12-9a68-8882b8ebbd23&networkids=999e0fb4-2af9-4161-ab94-2eb1d9996550&displayname=u2v3&name=u2v3&_=1386369544638
 200 { "deployvirtualmachineresponse" : 
{"id":"d8c8dcf4-f4b9-4b85-82ab-6b0ee5189440","jobid":"bb1a730f-dff1-4110-8b0c-0df77b512f83"}
 }

4. VM gets deployed, list Volumes:

2013-12-06 14:40:50,407 INFO  [a.c.c.a.ApiServer] 
(2124842917@qtp-1568679750-6:ctx-6cdcef8c ctx-8869b663) (userId=4 accountId=4 
sessionId=1mzx1vwqzgu08zsvzs302end) 127.0.0.1 -- GET 
command=listVolumes&response=json&sessionkey=bWDWTB4fHt8vuWnScvNMMEBvNSk%3D&listAll=true&page=1&pagesize=20&_=1386369650283
 200 { "listvolumesresponse" : { "count":1 ,"volume" : [  
{"id":"fb1a7f83-a279-469e-8c05-f8521dc09245","name":"ROOT-19","zoneid":"c386be0f-603f-45ee-8e11-efeb3403fdda","zonename":"lab","type":"ROOT","deviceid":0,"virtualmachineid":"d8c8dcf4-f4b9-4b85-82ab-6b0ee5189440","vmname":"u2v3","vmdisplayname":"u2v3","vmstate":"Running","size":21474836480,"created":"2013-12-06T14:39:04-0800","state":"Ready","account":"useracct2","domainid":"d62936cf-5dfa-11e3-aa10-0ba1073e21ea","domain":"ROOT","storagetype":"shared","destroyed":false,"serviceofferingid":"6b596854-21ce-4d12-9a68-8882b8ebbd23","serviceofferingname":"Small
 Instance","serviceofferingdisplaytext":"Small 
Instance","isextractable":true,"tags":[],"displayvolume":true} ] } }

5. List account to check volumeTotal. It is 1.

2013-12-06 14:40:55,823 INFO  [a.c.c.a.ApiServer] 
(2124842917@qtp-1568679750-6:ctx-5a5fe6d7 ctx-f3262ab1) (userId=4 accountId=4 
sessionId=1mzx1vwqzgu08zsvzs302end) 127.0.0.1 -- GET 
command=listAccounts&response=json&sessionkey=bWDWTB4fHt8vuWnScvNMMEBvNSk%3D&listAll=true&page=1&pagesize=20&_=1386369655722
 200 { "listaccountsresponse" : { "count":1 ,"account" : [  
{"id":"e8ccdec2-1122-41de-b3c0-334fde896028","name":"useracct2","accounttype":0,"domainid":"d62936cf-5dfa-11e3-aa10-0ba1073e21ea","domain":"ROOT","receivedbytes":0,"sentbytes":0,"vmlimit":"20","vmtotal":1,"vmavailable":"19","iplimit":"20","iptotal":1,"ipavailable":"13","volumelimit":"1","volumetotal":1,"volumeavailable":"0","snapshotlimit":"20","snapshottotal":0,"snapshotavailable":"20","templatelimit":"20","templatetotal":0,"templateavailable":"20","vmrunning":1,"projectlimit":"Unlimited","projecttotal":0,"projectavailable":"Unlimited","networklimit":"20","networktotal":1,"networkavailable":"19","vpclimit":"20","vpctotal":0,"vpcavailable":"20","cpulimit":"40","cputotal":1,"cpuavailable":"39","memorylimit":"40960","memorytotal":512,"memoryavailable":"40448","primarystoragelimit":"200","primarystoragetotal":60,"primarystorageavailable":"140","secondarystoragelimit":"400","secondarystoragetotal":0,"secondarystorageavailable":"400","state":"enabled","user":[{"id":"bb826f5e-72d2-41e5-9339-3b74f4f63386","username":"user2","firstname":"u","lastname":"s","email":"[email protected]","created":"2013-12-06T14:07:19-0800","state":"enabled","account":"useracct2","accounttype":0,"domainid":"d62936cf-5dfa-11e3-aa10-0ba1073e21ea","domain":"ROOT","accountid":"e8ccdec2-1122-41de-b3c0-334fde896028","iscallerchilddomain":false,"isdefault":false}],"isdefault":false}
 ] } }

6. It mean we count the ROOt disk

7. Try creating data disk. It fails:
2013-12-06 14:41:09,280 INFO  [a.c.c.a.ApiServer] 
(714492401@qtp-1568679750-9:ctx-f570d54d ctx-72a74f18) (userId=4 accountId=4 
sessionId=1mzx1vwqzgu08zsvzs302end) 127.0.0.1 -- GET 
command=createVolume&response=json&sessionkey=bWDWTB4fHt8vuWnScvNMMEBvNSk%3D&name=data1&zoneId=c386be0f-603f-45ee-8e11-efeb3403fdda&diskOfferingId=95b34b05-68a2-4fe3-a6f3-85775716216b&_=1386369669102
 535 Maximum number of resources of type 'volume' for account name=useracct2 in 
domain id=1 has been exceeded.


> Volume limit applied to project/account does not count root disks
> -----------------------------------------------------------------
>
>                 Key: CLOUDSTACK-5343
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-5343
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>          Components: Storage Controller
>    Affects Versions: 4.3.0
>            Reporter: Gaurav Aradhye
>            Assignee: Prachi Damle
>             Fix For: 4.3.0
>
>
> 1. Create any project or account.
> 2. Set the volume limit as 1.
> 3. Deploy an instance without data disk in project/account.
> 4. Now you can see the root disk in the volumes, but if you list the 
> account/project, then the volume count still shows as 0.
> 5. Now add new data disk.
> 6. Check volume count, now it shows it as 1 (But it should have shown as 2, 
> and it should have failed at this stage only saying limit exceeded.)
> 7. Add another data disk (Now it will fail)



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to