Migration of attached volumes does not delete old volume
Bug #1797181 reported by
Tiago Pasqualini da Silva
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
In Progress
|
High
|
Unassigned |
Bug Description
When migrating an attached volume, after creating the new one, copying the data, attaching the new one, the old never gets deleted and stays 'available'.
The interesting part is that retype with migration of an attached volume works fine.
Steps to reproduce:
1) Create a volume
2) Attach it
3) Migrate it
4) New volume is created, data is copied and attachment is moved
5) Old volume should be deleted, but it stays as available
Tested it on Queens, Rocky and master (Stein), with LVM and NetApp drivers
description: | updated |
Changed in cinder: | |
importance: | Undecided → High |
Changed in cinder: | |
assignee: | nobody → Aleksei Kazaev (kazaev-alex) |
status: | New → In Progress |
Changed in cinder: | |
assignee: | Aleksei Kazaev (kazaev-alex) → Bangari Giri Varshini (bangari514) |
tags: | added: test-coverage |
Changed in cinder: | |
assignee: | Bangari Giri Varshini (bangari514) → nobody |
To post a comment you must log in.
It's the expected behavior of in-used volume migration, and there already was a "_migrate_ volume_ completion" [1] since [2], you need call it to complete the migrations. The tmp volume will be deleted.
BTW, I test this case in my env, this api is valid in V3.
curl -g -i -X POST http:// XXX/volume/ v3/4be2d7fa445d 4faa94fd5c722b3 6417f/volumes/ 6d9a4e2c- 8e37-471f- 8418-10800989a4 9d/action -H "Accept: application/json" -H "Content-Type: application/json" -H "User-Agent: python- cinderclient" -H "X-Auth-Token: $TOKEN" -d '{"os-migrate_ volume_ completion" : {"new_volume": "bf5edf8d- aa89-474d- 80a7-cfd6d9d51a ad"}}'
So, I think what we need to do is : volume_ completion to api-ref
1. Add this migrate_
2. Improve the volume migration doc [3]
3. Add something like cinder migration-complete API to cinder client
[1] https:/ /github. com/openstack/ cinder/ blob/558f7b0/ cinder/ api/contrib/ admin_actions. py#L224 /review. openstack. org/#/c/ 41285/ /docs.openstack .org/cinder/ latest/ admin/blockstor age-volume- migration. html
[2] https:/
[3] https:/