1. Create snapshot in error state (e.g. set error status manually in DB);
2. Delete snapshot;
[Expected result]
Snapshot is deleted
[Actual result]
2012-08-29 12:52:00 DEBUG cinder.utils req-4e02cc27-1c7a-4cc7-a0ec-175cf8824eda 972d30e2667a41b0b8944d705d2762b0 a239c1e7b014435aa90d17aabbc0f3ca Running cmd (subprocess): sudo /usr/local/bin/cinder-rootwrap /etc/cinder/rootwrap.conf lvdisplay cinder-shares/_snapshot-f3f4087c-47c5-43eb-86dc-db9174bbc968 from (pid=9611) execute /opt/stack/cinder/cinder/utils.py:205
Running cmd (subprocess): sudo /usr/local/bin/cinder-rootwrap /etc/cinder/rootwrap.conf lvdisplay cinder-shares/_snapshot-f3f4087c-47c5-43eb-86dc-db9174bbc968
2012-08-29 12:52:00 DEBUG cinder.utils req-4e02cc27-1c7a-4cc7-a0ec-175cf8824eda 972d30e2667a41b0b8944d705d2762b0 a239c1e7b014435aa90d17aabbc0f3ca Result was 5 from (pid=9611) execute /opt/stack/cinder/cinder/utils.py:221
Result was 5
2012-08-29 12:52:00 ERROR cinder.volume.driver req-4e02cc27-1c7a-4cc7-a0ec-175cf8824eda 972d30e2667a41b0b8944d705d2762b0 a239c1e7b014435aa90d17aabbc0f3ca Recovering from a failed execute. Try number 2
2012-08-29 12:52:00 TRACE cinder.volume.driver Traceback (most recent call last):
2012-08-29 12:52:00 TRACE cinder.volume.driver File "/opt/stack/cinder/cinder/volume/driver.py", line 96, in _try_execute
2012-08-29 12:52:00 TRACE cinder.volume.driver self._execute(*command, **kwargs)
2012-08-29 12:52:00 TRACE cinder.volume.driver File "/opt/stack/cinder/cinder/utils.py", line 228, in execute
2012-08-29 12:52:00 TRACE cinder.volume.driver cmd=' '.join(cmd))
2012-08-29 12:52:00 TRACE cinder.volume.driver ProcessExecutionError: Unexpected error while running command.
2012-08-29 12:52:00 TRACE cinder.volume.driver Command: sudo /usr/local/bin/cinder-rootwrap /etc/cinder/rootwrap.conf lvdisplay cinder-shares/_snapshot-f3f4087c-47c5-43eb-86dc-db9174bbc968
2012-08-29 12:52:00 TRACE cinder.volume.driver Exit code: 5
2012-08-29 12:52:00 TRACE cinder.volume.driver Stdout: ''
2012-08-29 12:52:00 TRACE cinder.volume.driver Stderr: ' One or more specified logical volume(s) not found.\n'
2012-08-29 12:52:00 TRACE cinder.volume.driver
Recovering from a failed execute. Try number 2
2012-08-29 12:52:00 TRACE cinder.volume.driver Traceback (most recent call last):
2012-08-29 12:52:00 TRACE cinder.volume.driver File "/opt/stack/cinder/cinder/volume/driver.py", line 96, in _try_execute
2012-08-29 12:52:00 TRACE cinder.volume.driver self._execute(*command, **kwargs)
2012-08-29 12:52:00 TRACE cinder.volume.driver File "/opt/stack/cinder/cinder/utils.py", line 228, in execute
2012-08-29 12:52:00 TRACE cinder.volume.driver cmd=' '.join(cmd))
2012-08-29 12:52:00 TRACE cinder.volume.driver ProcessExecutionError: Unexpected error while running command.
2012-08-29 12:52:00 TRACE cinder.volume.driver Command: sudo /usr/local/bin/cinder-rootwrap /etc/cinder/rootwrap.conf lvdisplay cinder-shares/_snapshot-f3f4087c-47c5-43eb-86dc-db9174bbc968
2012-08-29 12:52:00 TRACE cinder.volume.driver Exit code: 5
2012-08-29 12:52:00 TRACE cinder.volume.driver Stdout: ''
2012-08-29 12:52:00 TRACE cinder.volume.driver Stderr: ' One or more specified logical volume(s) not found.\n'
2012-08-29 12:52:00 TRACE cinder.volume.driver
I'm not quite sure how setting the column in the DB leads to the lv missing? There were a number of issues with tgts that have been fixed and following your steps I was unable to reproduce this.
It could be there's a missing item in the sequence but I suspect this is yet another version of the persistent targets bug.