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

Sudhansu Sahu commented on CLOUDSTACK-9668:
-------------------------------------------

RCA:
Code Issue
If all volumes have been removed from storage_pool then capacity checker does 
not update the op_host_capacity.

StorageManagerImpl.java

{noformat}
public void createCapacityEntry(StoragePoolVO storagePool, short capacityType, 
long allocated) {
..
..
..

} else {
            CapacityVO capacity = capacities.get(0);
            if (capacity.getTotalCapacity() != totalOverProvCapacity || 
allocated != 0L || capacity.getCapacityState() != capacityState) {
                capacity.setTotalCapacity(totalOverProvCapacity);
                capacity.setUsedCapacity(allocated);
                capacity.setCapacityState(capacityState);
                _capacityDao.update(capacity.getId(), capacity);
            }
        }

..
..
{noformat}

> disksizeallocated of PrimaryStorage is different from the total size of a 
> volume
> --------------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-9668
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9668
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>          Components: Management Server
>    Affects Versions: 4.9.0
>            Reporter: Sudhansu Sahu
>            Assignee: Sudhansu Sahu
>
> Disksizeallocated of PrimaryStorage is different from the total size of a 
> volume.
> steps to reproduce:
> 1. create another primary storage( apart from default) with storage tag (say 
> tag1)
> 2. create a disk offering with storage tag as that step1.
> 3. create a data disk with above disk offering.
> 4. attach the disk to vm.
> 5. when capacity checker thread runs it will update the used_capacity. Note 
> down the op_host_capacity details for pool created in step1.
> 6. detach the disk and destroy the volume.
> 7. when capacity checker thread runs it will not update the used_capacity to 
> 0.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to