I request the bug reporter to close the bug as this bug is already fixed in mitaka version and here is my analysis on this bug and the delta between liberty and the mitaka
Analysis:
In Liberty:
There is no proper volume attach/detach handling in compute/api.py in liberty. Also, there is no local cleanup of the bdm table.
Fix in Mitaka:
Here, 3 new methods are included to handle volume attach/detach in /compute/api.py.
1) _attach_volume_shelved_offloaded - This method handles attaching volumes in shelved offloaded state.
2) _detach_volume_shelved_offloaded - This method handles detaching volumes in shelved offloaded state on terminate_connection call.
3) _local_cleanup_bdm_volumes - This method deletes the bdm record and takes care of cleanup of volumes
The same as above is even mentioned in the latest release notes of Mitaka version in new features list:
'''It is possible to call attach and detach volume API operations for instances which are in shelved and shelved_offloaded state. For an instance in shelved_offloaded state Nova will set to None the value for the device_name field, the right value for that field will be set once the instance will be unshelved as it will be managed by a specific compute manager.'''
I request the bug reporter to close the bug as this bug is already fixed in mitaka version and here is my analysis on this bug and the delta between liberty and the mitaka
Analysis:
In Liberty:
There is no proper volume attach/detach handling in compute/api.py in liberty. Also, there is no local cleanup of the bdm table.
Fix in Mitaka: volume_ shelved_ offloaded - This method handles attaching volumes in shelved offloaded state. volume_ shelved_ offloaded - This method handles detaching volumes in shelved offloaded state on terminate_ connection call. cleanup_ bdm_volumes - This method deletes the bdm record and takes care of cleanup of volumes
Here, 3 new methods are included to handle volume attach/detach in /compute/api.py.
1) _attach_
2) _detach_
3) _local_
The same as above is even mentioned in the latest release notes of Mitaka version in new features list:
'''It is possible to call attach and detach volume API operations for instances which are in shelved and shelved_offloaded state. For an instance in shelved_offloaded state Nova will set to None the value for the device_name field, the right value for that field will be set once the instance will be unshelved as it will be managed by a specific compute manager.'''
REFFERED FILES:
/opt/stack/ nova/nova/ compute/ api.py nova/nova/ compute/ manager. py nova/nova/ test/unit/ compute/ test_compute. py
/opt/stack/
/opt/stack/