Cinder host manager doesn't remove disabled/stopped service from host_state_map
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
Fix Released
|
Undecided
|
Haomai Wang |
Bug Description
when I have a bad cinder-volume service,
cinder-manage service list
cinder-volume localhost nova enabled :-) 2013-06-19 07:20:17
cinder-scheduler localhost nova enabled :-) 2013-06-19 07:20:17
cinder-volume other nova enabled XXX 2013-06-19 07:20:17
cinder-scheduler other nova enabled XXX 2013-06-19 07:20:17
#######
SO it is very easy to reproduce it:
step 1: change our hostname to others "hostname other"
step 2 : restart all cinder service : "cinder-api, cinder-scheduler, cinder-volume"
step 3 : cinder-manage service list
Then you can get some bad cinder-volume service as above.
#######
When running "cinder create 1"
cinder scheduler will log an warning:
Traceback (most recent call last):
2013-06-18 04:01:38.771 54708 TRACE cinder.
2013-06-18 04:01:38.771 54708 TRACE cinder.
2013-06-18 04:01:38.771 54708 TRACE cinder.
2013-06-18 04:01:38.771 54708 TRACE cinder.
2013-06-18 04:01:38.771 54708 TRACE cinder.
2013-06-18 04:01:38.771 54708 TRACE cinder.
2013-06-18 04:01:38.771 54708 TRACE cinder.
2013-06-18 04:01:38.771 54708 TRACE cinder.
2013-06-18 04:01:38.771 54708 TRACE cinder.
2013-06-18 04:01:38.771 54708 TRACE cinder.
2013-06-18 04:01:38.771 54708 TRACE cinder.
2013-06-18 04:01:38.771 54708 TRACE cinder.
2013-06-18 04:01:38.771 54708 TRACE cinder.
2013-06-18 04:01:38.771 54708 TRACE cinder.
2013-06-18 04:01:38.771 54708 TRACE cinder.
2013-06-18 04:01:38.771 54708 TRACE cinder.
2013-06-18 04:01:38.771 54708 TRACE cinder.
Possible solution is to remove disabled/stopped service from host_state_map() or simple clear the whole map.
#######
for service in volume_services:
if not utils.service_
if _host:
host = service['host']
#######
The reason is that get_all_host_states method is use to get all service state and cinder scheduler choose the cinder-volume service from them.
Then when cinder-volume service is down or disabled, the state of bad one need remove from host_state_map list.
description: | updated |
tags: | added: cinder-scheduler |
description: | updated |
Changed in cinder: | |
status: | Incomplete → New |
description: | updated |
Changed in cinder: | |
status: | Incomplete → New |
description: | updated |
Changed in cinder: | |
status: | New → Incomplete |
status: | Incomplete → New |
Changed in cinder: | |
assignee: | nobody → Haomai Wang (haomai) |
summary: |
- cinder/scheduler/host_manager.py , line 268, in get_all_host_states + Cinder host manager doesn't remove disabled/stopped service from + host_state_map |
description: | updated |
Changed in cinder: | |
status: | In Progress → Fix Committed |
Changed in cinder: | |
milestone: | none → havana-2 |
status: | Fix Committed → Fix Released |
Changed in cinder: | |
milestone: | havana-2 → 2013.2 |
Please provide more information on how to reproduce this bug. What you have pointed out is not relevant (to the issue).