The create_cloned_volum method creates a temp snapshot and
when it's done it uses the standard snapshot_delete method
in the LVM driver.
A change was added that logs a statement using the object[id],
but we weren't actually setting this on our temp object so we
would get a trace fo key DNE. This change adds an id key to
our temp object.
Fixes bug:
1125457
Change-Id: I4d886f2738a3c394a3a3a6373045669cf6bf8aaf
"""Creates a clone of the specified volume."""
LOG.info(_('Creating clone of volume: %s') % src_vref['id'])
volume_name = FLAGS.volume_name_template % src_vref['id']
+ temp_id = 'tmp-snap-%s' % src_vref['id']
temp_snapshot = {'volume_name': volume_name,
'size': src_vref['size'],
'volume_size': src_vref['size'],
- 'name': 'clone-snap-%s' % src_vref['id']}
+ 'name': 'clone-snap-%s' % src_vref['id'],
+ 'id': temp_id}
self.create_snapshot(temp_snapshot)
self._create_volume(volume['name'], self._sizestr(volume['size']))
try: