Comment 5 for bug 1271162

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/76734
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=be340fbd74e0778e04c6e96210947cdb9379fdef
Submitter: Jenkins
Branch: master

commit be340fbd74e0778e04c6e96210947cdb9379fdef
Author: Zhiteng Huang <email address hidden>
Date: Thu Feb 27 09:58:17 2014 +0800

    Don't clear host_state_map when scheduling

    host_state_map was added to scheduler for the purpose of caching latest
    host_state in memory for scheduler. With this cache, scheduler has the
    latest host_state (e.g. free_capacity, allocated_capacity, etc) of hosts
    even hosts haven't reported their updated status to scheduler.

    Unfortunately, this cache is flushed when scheduling pulling all available
    volume services from DB in current implementation, which is a bug.

    This change remove the host_state_map.clear() so that scheduler is able to
    maintain an up-to-date (well, mostly) view of all volume services in memory.
    Also, added code to remove non-active host from the cache every time when
    scheduler handles a new request. Multi-line docstrings in cinder/scheduler/
    host_manager.py are also fixed.

    Change-Id: Ib47be483fa26631a1483721e2ae6d972994e150f
    Fixes-bug: 1271162