Action rename-volume-host fails if backend to be renamed does not exist
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Cinder Charm |
Fix Committed
|
Undecided
|
dongdong tao |
Bug Description
In a Cloud upgraded from trusty/mitaka to xenial/queens with stepped upgrades and finally to bionic/queens, there are some older volumes that have wrong host attribute equal to cinder@
When trying to create a snapshot of that volumes or creating a new volume from a snapshot, this fails with:
2022-01-04 12:35:40.750 69884 ERROR cinder.
If I update manually the host on the DB to cinder@
To fix that I tried to use the rename-volume-host action:
$ juju run-action cinder/7 rename-volume-host currenthost=
unit-cinder-7:
UnitId: cinder/7
id: "11352"
message: Cannot update host attribute from cinder@
cinder@
results: {}
status: failed
timing:
completed: 2022-01-05 12:34:59 +0000 UTC
enqueued: 2022-01-05 12:34:56 +0000 UTC
started: 2022-01-05 12:34:56 +0000 UTC
This is happening because the charm checks if currenthost exists in hosts from "cinder-manage service list":
# cinder-manage service list
Binary Host Zone Status State Updated At RPC Version Object Version Cluster
cinder-scheduler cinder nova enabled :-) 2022-01-05 12:41:50 3.10 1.35
cinder-backup cinder nova enabled :-) 2022-01-05 12:41:49 2.1 1.35
cinder-volume cinder-
cinder-volume cinder@cinder-ceph nova enabled :-) 2022-01-05 12:41:48 3.15 1.35
and the host is not there but actually from documentation [0] I understand that action is intended to fix that kind of issues when a backend is removed or renamed but that fails and then charm should not check if currenthost is there or not. Also currenthost is passed in the format:
host_uuid@
And can not be == to host in cinder-manage service list where you have only host_uuid@
0. https:/
summary: |
- Action rename-volume-host fails if backend to be replace does not exist + Action rename-volume-host fails if backend to be replaced does not exist |
summary: |
- Action rename-volume-host fails if backend to be replaced does not exist + Action rename-volume-host fails if backend to be renamed does not exist |
description: | updated |
tags: | added: sts |
Changed in charm-cinder: | |
assignee: | nobody → dongdong tao (taodd) |
status: | New → In Progress |
Another question will be given that I have the following available pools:
$ cinder get-pools ----+-- ------- ------- ------- ------- --+ ----+-- ------- ------- ------- ------- --+ cinder- ceph#cinder- ceph | ----+-- ------- ------- ------- ------- --+ ----+-- ------- ------- ------- ------- ------+ ----+-- ------- ------- ------- ------- ------+ ssd@ssd- storage# ssd-storage | ----+-- ------- ------- ------- ------- ------+
+------
| Property | Value |
+------
| name | cinder@
+------
+------
| Property | Value |
+------
| name | cinder-
+------
can I workaround the snapshot creation issue using a query directly on the DB like the following?
update volumes set host="cinder@ cinder- ceph#cinder- ceph" where host="cinder@ cinder- ceph#cinder. volume. drivers. rbd.RBDDriver" ;