← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 851073] Re: nova/volume/driver.py _create_volume will fail if volume exists

 

No longer relevant since nova-volume has been removed

** Changed in: nova
       Status: Confirmed => Invalid

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/851073

Title:
  nova/volume/driver.py _create_volume will fail if volume exists

Status in OpenStack Compute (Nova):
  Invalid

Bug description:
  I just ran euca-create-volume on a machine that I'd re-installed nova (and wiped DB on).
  The volume named 'volume-00000001' still existed from a previous install, so when I did it this time it failed, and I see a trace like:

  2011-09-15 11:54:59,249 DEBUG nova.utils [-] Running cmd (subprocess): sudo lvcreate -L 1G -n volume-00000001 nova-volumes from (pid=1119) execute /home/ubuntu/src/nova/nova/utils.py:165
  2011-09-15 11:54:59,340 DEBUG nova.utils [-] Result was 5 from (pid=1119) execute /home/ubuntu/src/nova/nova/utils.py:180
  2011-09-15 11:54:59,342 ERROR nova.volume.driver [-] Recovering from a failed execute.  Try number 2
  (nova.volume.driver): TRACE: Traceback (most recent call last):
  (nova.volume.driver): TRACE:   File "/home/ubuntu/src/nova/nova/volume/driver.py", line 77, in _try_execute
  (nova.volume.driver): TRACE:     self._execute(*command, **kwargs)
  (nova.volume.driver): TRACE:   File "/home/ubuntu/src/nova/nova/utils.py", line 188, in execute
  (nova.volume.driver): TRACE:     cmd=' '.join(cmd))
  (nova.volume.driver): TRACE: ProcessExecutionError: Unexpected error while running command.
  (nova.volume.driver): TRACE: Command: sudo lvcreate -L 1G -n volume-00000001 nova-volumes
  (nova.volume.driver): TRACE: Exit code: 5
  (nova.volume.driver): TRACE: Stdout: ''
  (nova.volume.driver): TRACE: Stderr: '  Logical volume "volume-00000001" already exists in volume group "nova-volumes"\n'
  (nova.volume.driver): TRACE:

  
  The issue is fairly clear, 
    Logical volume "volume-00000001" already exists in volume group "nova-volumes"

  I'm not sure how this should be handled.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/851073/+subscriptions