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