Passing an incorrect zone name to euca-create-volume results in a volume stuck in the "creating" state
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Invalid
|
High
|
Chuck Short | ||
nova (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
What happens:
I have two regions and one availability zone (AZ) for my Essex cluster. When creating a volume I accidentally used the region name instead of the AZ name. This resulted in a volume being stuck in the "creating" state which I cannot delete.
What I expect:
I expect two things:
1. The volume creation should fail (it currently does)
2. The volume to go into an "error" state (it does not currently do this)
Reasoning:
Having the volume go into an error state informs the user that there was a problem and does not leave them wondering if they should wait longer in case the command hasn't completed.
Steps to reproduce:
1. user@laptop:~$ euca-create-volume -s 2 # command requires a zone
These required options are missing: zone
2. user@laptop:~$ euca-create-volume -s 2 -z lcy-2 # accidentally pass a non-existant zone name
VOLUME vol-00000001 2 lcy-2 creating 2012-06-
3. user@laptop:~$ euca-describe-
VOLUME vol-00000001 2 lcy-2 creating 2012-06-
4. The nova-scheduler log file shows the following.
2012-06-21 13:58:41 WARNING nova.scheduler.
2012-06-21 13:58:41 ERROR nova.rpc.amqp [req-63af9b42-
2012-06-21 13:58:41 TRACE nova.rpc.amqp Traceback (most recent call last):
2012-06-21 13:58:41 TRACE nova.rpc.amqp File "/usr/lib/
2012-06-21 13:58:41 TRACE nova.rpc.amqp rval = node_func(
2012-06-21 13:58:41 TRACE nova.rpc.amqp File "/usr/lib/
2012-06-21 13:58:41 TRACE nova.rpc.amqp context, ex, *args, **kwargs)
2012-06-21 13:58:41 TRACE nova.rpc.amqp File "/usr/lib/
2012-06-21 13:58:41 TRACE nova.rpc.amqp self.gen.next()
2012-06-21 13:58:41 TRACE nova.rpc.amqp File "/usr/lib/
2012-06-21 13:58:41 TRACE nova.rpc.amqp return driver_
2012-06-21 13:58:41 TRACE nova.rpc.amqp File "/usr/lib/
2012-06-21 13:58:41 TRACE nova.rpc.amqp raise exception.
2012-06-21 13:58:41 TRACE nova.rpc.amqp NoValidHost: No valid host was found. Is the appropriate service running?
Successful volume creation:
1. user@laptop:~$ euca-describe-
AVAILABILIT
2. user@laptop:~$ euca-create-volume -s 2 -z nova # create the volume passing in the correct AZ name
VOLUME vol-00000003 2 nova creating 2012-06-
3. agy@agy-laptop:~$ euca-describe-
VOLUME vol-00000001 2 lcy-2 creating 2012-06-
VOLUME vol-00000002 2 lcy-2 creating 2012-06-
VOLUME vol-00000003 2 nova available 2012-06-
Note the two volumes that have failed and will not complete and the correctly created volume.
Ideally, I would like the API server to reject the command and return an informative error message to the user before attempting to create the volume.
Operating System Information (all machines):
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_
DISTRIB_
DISTRIB_
Package Information (API/Controller):
$ dpkg-query --show nova-*
nova-api 2012.1-0ubuntu2.1
nova-cert 2012.1-0ubuntu2.1
nova-common 2012.1-0ubuntu2.1
nova-doc 2012.1-0ubuntu2.1
nova-network 2012.1-0ubuntu2.1
nova-objectstore 2012.1-0ubuntu2.1
nova-scheduler 2012.1-0ubuntu2.1
Package Information (Volume Node):
$ dpkg-query --show nova-*
nova-common 2012.1-0ubuntu2.3
nova-volume 2012.1-0ubuntu2.3
Hi Andrew,
Thank you very much for your bug report.
This is indeed an existing problem in nova, could reproduce easily. Don't know if it's an architectural decision or if it's a bug per se.
Handling over to Chuck Short for further analysis.