Choose state 'down' host when scheduler get backup host
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
In Progress
|
Undecided
|
ZhaoYixin |
Bug Description
when I stop all cinder-backup service,
cinder service-list
+------
| Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |
+------
| cinder-backup | stor01 | nova | enabled | down | 2020-10-
| cinder-backup | stor02 | nova | enabled | down | 2020-10-
| cinder-backup | stor03 | nova | enabled | down | 2020-10-
| cinder-backup | stor04 | nova | enabled | down | 2020-10-
| cinder-scheduler | ctl01 | nova | enabled | up | 2020-10-
| cinder-volume | stor01@ceph | nova | enabled | up | 2020-10-
| ...... | ...... | ...... | ...... |...... | ...... | - |
+------
all cinder-backup service state is down.
run command 'cinder backup-create <volume_id> --name backup'
cinder-scheduler still choose one down state cinder-backup host.
#######
Solution is add to judge whether the service is up.
#######
def _list_backup_
"""List all enabled backup services.
:returns: list -- hosts for services that are enabled for backup.
"""
services = []
def _is_good_
if driver is None and az is None:
return True
match_driver = cap['driver_name'] == driver if driver else True
if match_driver:
if not az:
return True
return cap['availabili
return False
for backend, capabilities in self.backup_
if capabilities[
if _is_good_
services.
return services
Changed in cinder: | |
assignee: | nobody → ZHAOYIXIN (zhaoyixinlc) |
description: | updated |
Changed in cinder: | |
status: | New → In Progress |
tags: | added: backup-service |
Fix proposed to branch: master /review. opendev. org/759786
Review: https:/