[
https://issues.apache.org/jira/browse/CLOUDSTACK-9366?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15293266#comment-15293266
]
ASF subversion and git services commented on CLOUDSTACK-9366:
-------------------------------------------------------------
Commit 18a6aa89bead3c0b321b759570f3de804d6e8105 in cloudstack's branch
refs/heads/master from [~sudhansu]
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=18a6aa8 ]
CLOUDSTACK-9366: Capacity of one zone-wide primary storage ignored
introduced new capacityType parameter in updateCapacityState method and
necessary changes to add capacity_type clause in sql
also fixed incorrect sql builder logic (unused code path for which it is never
surfaced )
Added marvin test to check host and storagepool capacity when host is disabled
Added conditions to ensure the capacity_type is added only when capacity_type
length is greater than 0.
Added checks in marvin test to ensure the capacity exists for a host before
disabling it.
Added checks to avoid index out of range exception
> Disable a host also disables storage pool capacity
> --------------------------------------------------
>
> Key: CLOUDSTACK-9366
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9366
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Components: Management Server
> Affects Versions: 4.8.0
> Reporter: Sudhansu Sahu
> Assignee: Sudhansu Sahu
>
> Disable and Remove Host operation disables the primary storage capacity.
> Steps to replicate:
> Base Condition: There exists a host and storage pool with same id
> Steps:
> 1. Find a host and storage pool having same id
> 2. Disable the host
> 3. verify that the CPU(1) and MEMORY(0) capacity in op_host_capacity for
> above host is disabled
> 4. verify that the STORAGE(3) capacity in op_host_capacity for storage pool
> with id same as above host is also disabled
> RCA:
> 'host_id' column in 'op_host_capacity' table used for storing both storage
> pool id (for STORAGE capacity) and host id (MEMORY and CPU). While removing a
> HOST we also disable the capacity associated with host.
> Ideally while disabling capacity we should only disable MEMORY and CPU
> capacity, but we are not doing so.
> Code Path:
> ResourceManagerImpl.doDeleteHost() ->
> ResourceManagerImpl.resourceStateTransitTo() ->
> CapacityDaoImpl.updateCapacityState(null, null, null, host.getId(),
> capacityState.toString())
> updateCapacityState is updating disabling all entries which matches the
> host_id. This will also disable a entry having storage pool id same as that
> of host id.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)