Comment 3 for bug 1011150

Revision history for this message
Mark McLoughlin (markmc) wrote : Re: [nova-volume] Volume stuck in Deleting status forever when deleting a volume and restarting nova-volume service

In delete_volume() we do:

        self._copy_volume('/dev/zero', self.local_path(volume), size_in_g)
        self._try_execute('lvremove', '-f', "%s/%s" %
                          (FLAGS.volume_group,
                           self._escape_snapshot(volume['name'])),
                          run_as_root=True)

however, if the service shuts down before this completes, we have no logic to re-start the operation when the service re-starts

We probably need to hook a finish_deleting_volumes() thing into VolumeManager's init_host()

Applies to Cinder too