Creating Volume stays in creating status and the rest are in error

Asked by Theodotos Andreou

I have setup a folsom single node machine in Ubuntu server 12.04. I used these scripts here:

https://github.com/dimtdv/folsom-single-node

I used the above procedure after my failure to use the procedure described in Appandix B of the official guide:

http://docs.openstack.org/trunk/openstack-compute/install/apt/content/ap_installingfolsomubuntuprecise.html

I can create instances but I cannot create volumes. The first volume I created has stayed in the "Creating" status forever. Whenever I try to delete it I get a "You do not have permission to delete volume: test1" even though I am an admin.

If I try to create another volume the volume is apparently created but it stays in "Error" status. I can delete this volume but not the first one.

This is an excerpt from the logs when I try to create a new volume:

http://paste.ubuntu.com/1526710/

Any ideas?

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Solved by:
Keith Tobin
Solved:
Last query:
Last reply:

This question was reopened

Revision history for this message
Keith Tobin (keith-tobin) said :
#1

I had a look at logs and their is not much info, you need to get the nova and volume/cinder logs, and post here.
Where logs are stored, depends on your config, have a look at config files for nova and volume/cinder to help figure. Please also post logs for nova and volume/cinder, it will help.

Revision history for this message
Theodotos Andreou (theodotos) said :
#2

I do not have cinder installed. I am using nova-volume.

The log files are under /var/log/nova:

nova-api.log:
http://paste.ubuntu.com/1537174/

nova-compute.log:
http://paste.ubuntu.com/1537182/

nova-volumes.log is empty so here is nova-volumes.log.1:
http://paste.ubuntu.com/1537184/

I created a volume 10 minutes ago. It's name is "testing-vol" and the volume id is "60f9bd63-b020-4092-96c5-e312690827f9"

I hope they tell you something more because I couldn't find anything useful with them. On the other hand I am an openstack newbie so... :)

Revision history for this message
Keith Tobin (keith-tobin) said :
#3

In nova-volume.log.1 there is a exception/error at line 200. I am focusing in on

Volume_name_template

In the nova.conf file as having some sort of proble, but at this point I am not 100% sure, I need more info.

Can you post the nova.conf file.

Revision history for this message
Keith Tobin (keith-tobin) said :
#4

In you nova config find the volume_name_volume and comment it out #, then restart nova.
This will fix the problem, please le me know that it works.

Revision history for this message
Theodotos Andreou (theodotos) said :
#5

There are is no volume_name_volume in nova.conf but most likely is a typo and you meant volume_name_template. I commented it out, restarted all nova services, just in case, and now when I create a new volume I get status "Available". I will do some more tests later but we can mark this as "Solved" for now.

Keith I am so grateful for your time spend on the solution of this problem. Thank you very much and kudos to the community and organizations that develop and support open

P.S. I still have a volume in "Creating" status which I cannot delete. I get" Error: You do not have permission to delete volume: test1" but this is rather an annoyance than e real problem

Revision history for this message
Theodotos Andreou (theodotos) said :
#6

Thanks Keith Tobin, that solved my question.

Revision history for this message
Theodotos Andreou (theodotos) said :
#7

Alas! This change break the system! Now I can create volumes but not instances. If I create an instance it stays in the error state. If I enable the "volume_name_template" directive I can create instances but not volumes.

What a mess! Any ideas?

Revision history for this message
Keith Tobin (keith-tobin) said :
#8

Can you tell me what line that I got you to comment out is set to, volume_name_template is?

Revision history for this message
Best Keith Tobin (keith-tobin) said :
#9

It seems that the config file has the wrong template, here is what the the template should be

volume_name_template=volume-%s

My concern is that the template you have seems to expect a volume as a number, this could suggest that there is version mismatch between nova and volume code bases. This type of template would have being used in older versions of Openstack when volume Ids were numbers, as you can see from the cinder fulsom template it is now a string I'd.

If you still have problems, give me as much info as you can on what versions of Openstack you installed and how you installed.

Revision history for this message
Theodotos Andreou (theodotos) said :
#10

OK I changed it to your proposed setup.

#volume_name_template=volume-%08x
volume_name_template=volume-%s

Restarted and everything seems OK now. I can create instances and volumes and I can even boot an instance from volume.

Dear Keith, thanks again for the awesome support!

Revision history for this message
Theodotos Andreou (theodotos) said :
#11

Thanks Keith Tobin, that solved my question.

Revision history for this message
Theodotos Andreou (theodotos) said :
#12

Regarding the stale volume in "Creating" state you can simply delete it from the database:

  mysql> use nova;
  mysql> delete from volumes where status = 'Creating';

Revision history for this message
Subhranshu Dwivedi (subhranshu) said :
#13

I have a twelve node MAAS JUJU Openstack deplyment,

Same issue, could not add volume, stays in creating state,

Any suggestions?

Revision history for this message
Theodotos Andreou (theodotos) said :
#14

Have you tried Keith Tobin suggestion? (Post #9)