You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cloudstack.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2014/11/13 22:55:34 UTC

[jira] [Commented] (CLOUDSTACK-7909) Enabling the cluster from disabled state is changing the capacity_state to enabled even for disabled hosts in op_host_capacity table

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

ASF subversion and git services commented on CLOUDSTACK-7909:
-------------------------------------------------------------

Commit ade305be20021d20a881693625864f46a335ea98 in cloudstack's branch refs/heads/master from [~nitinme]
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=ade305b ]

CLOUDSTACK-7909: Change the capacity_state in op_host_Capacity table only on explicit enabling/disabling of the host and remove the logic for changing it when cluster/pod/zone is enabled/disabled. Also add the logic in capacity checker thread so that previous  changes finally get consistent with this new model and also its good to have it for sanity reasons.


> Enabling the cluster from disabled state is changing the capacity_state to enabled even for disabled hosts in op_host_capacity  table
> -------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-7909
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7909
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>    Affects Versions: 4.5.0
>            Reporter: Nitin Mehta
>            Assignee: Nitin Mehta
>             Fix For: 4.6.0
>
>
> steps:
> 1. Deployed CS with 1 zone,1pod,1 cluster and 2 hosts host1 and host2 say.
> 2. disabled host1 .So in op_host_capacity table  capacity_state will be disabled for disable host.
> mysql> select * from op_host_capacity where host_id in (1,6);
> +----+---------+----------------+--------+------------+---------------+-------------------+----------------+---------------+----------------+---------------------+---------------------+
> | id | host_id | data_center_id | pod_id | cluster_id | used_capacity | reserved_capacity | total_capacity | capacity_type | capacity_state | update_time         | created             |
> +----+---------+----------------+--------+------------+---------------+-------------------+----------------+---------------+----------------+---------------------+---------------------+
> | 10 |       1 |              1 |      1 |          1 |    2013265920 |                 0 |    16001266176 |             0 | Disabled       | 2014-11-11 09:53:21 | 2014-11-10 08:07:42 |
> | 11 |       1 |              1 |      1 |          1 |          2000 |                 0 |           9576 |             1 | Disabled       | 2014-11-10 14:40:19 | 2014-11-10 08:07:42 |
> | 12 |       6 |              1 |      1 |          1 |    6442450944 |                 0 |    16001266176 |             0 | Enabled        | 2014-11-11 09:53:21 | 2014-11-10 09:04:31 |
> | 13 |       6 |              1 |      1 |          1 |          6000 |                 0 |           9580 |             1 | Enabled        | 2014-11-11 09:10:55 | 2014-11-10 09:04:31 |
> +----+---------+----------------+--------+------------+---------------+-------------------+----------------+---------------+----------------+---------------------+---------------------+
> 4 rows in set (0.00 sec)
> 3. Now disable the cluster .It will make  capacity_state to disabled for all hosts
> mysql> select * from op_host_capacity where host_id in (1,6);
> +----+---------+----------------+--------+------------+---------------+-------------------+----------------+---------------+----------------+---------------------+---------------------+
> | id | host_id | data_center_id | pod_id | cluster_id | used_capacity | reserved_capacity | total_capacity | capacity_type | capacity_state | update_time         | created             |
> +----+---------+----------------+--------+------------+---------------+-------------------+----------------+---------------+----------------+---------------------+---------------------+
> | 10 |       1 |              1 |      1 |          1 |    2013265920 |                 0 |    16001266176 |             0 | Disabled       | 2014-11-11 09:53:21 | 2014-11-10 08:07:42 |
> | 11 |       1 |              1 |      1 |          1 |          2000 |                 0 |           9576 |             1 | Disabled       | 2014-11-10 14:40:19 | 2014-11-10 08:07:42 |
> | 12 |       6 |              1 |      1 |          1 |    6442450944 |                 0 |    16001266176 |             0 | Disabled       | 2014-11-11 09:53:21 | 2014-11-10 09:04:31 |
> | 13 |       6 |              1 |      1 |          1 |          6000 |                 0 |           9580 |             1 | Disabled       | 2014-11-11 09:10:55 | 2014-11-10 09:04:31 |
> +----+---------+----------------+--------+------------+---------------+-------------------+----------------+---------------+----------------+---------------------+---------------------+
> 4 rows in set (0.00 sec)
> 4. Enable the cluster back.
> Here capacity_state is changed to Enabled even for disabled hosts.
> mysql> select * from op_host_capacity where host_id in (1,6);
> +----+---------+----------------+--------+------------+---------------+-------------------+----------------+---------------+----------------+---------------------+---------------------+
> | id | host_id | data_center_id | pod_id | cluster_id | used_capacity | reserved_capacity | total_capacity | capacity_type | capacity_state | update_time         | created             |
> +----+---------+----------------+--------+------------+---------------+-------------------+----------------+---------------+----------------+---------------------+---------------------+
> | 10 |       1 |              1 |      1 |          1 |    2013265920 |                 0 |    16001266176 |             0 | Enabled        | 2014-11-11 10:03:21 | 2014-11-10 08:07:42 |
> | 11 |       1 |              1 |      1 |          1 |          2000 |                 0 |           9576 |             1 | Enabled        | 2014-11-10 14:40:19 | 2014-11-10 08:07:42 |
> | 12 |       6 |              1 |      1 |          1 |    6442450944 |                 0 |    16001266176 |             0 | Enabled        | 2014-11-11 10:03:21 | 2014-11-10 09:04:31 |
> | 13 |       6 |              1 |      1 |          1 |          6000 |                 0 |           9580 |             1 | Enabled        | 2014-11-11 09:10:55 | 2014-11-10 09:04:31 |
> +----+---------+----------------+--------+------------+---------------+-------------------+----------------+---------------+----------------+---------------------+---------------------+
> 4 rows in set (0.00 sec)
> attaching the dumps and logs



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