Comment 1 for bug 1542169

Revision history for this message
Abhishek Kekane (abhishek-kekane) wrote :

Hi All,

As mentioned in the bug description if admin resets volumes attach status then this problem will be reproducible.

For fixing this issue there are two approaches:

1. log warning and skip that table (similar to nova, https://github.com/openstack/nova/blob/master/nova/db/sqlalchemy/api.py#L6069)

with this approach these records never be deleted as it requires manual intervention and can remain forever in db until there will be any proper solution.

2. Explicitly delete attachment records

When admin resets attach status to detached then explicitly delete attachment records for that volume.

This will not have any consequences on nova side until user deletes the volume. Even in normal scenario (current master) If instance is booted from volume, admin resets the attached status to detached and normal user deletes that volume then, user will not be able to logged in to that console anymore and when user tries to stop and start the instance then starting the instance will fails and vm remains in SHUTOFF state. Similar case with unshelve instance, if instance is shelved then unshelving instance failed and instance will remain in SHELVE_OFFLOADED state forever.

Please let me know your suggestions on the same.