Ask Your Question
0

Can't attach volume to an instance

asked 2017-05-09 05:50:38 -0500

Ekalaya gravatar image

updated 2017-05-26 22:47:26 -0500

I have managed to deploy Openstack on 6 machines using Landscape Autopilot. I can create instances (without volume) and other things.

It seems works well until I try to attach volume to an instance through Horizon or Openstack client CLI. It always failed. In Horizon, there are no error messages.

Similar problem happens when I try to create an instance with volume. In this case, there was an error message said:

"Error: Failed to perform requested operation on instance "xxxxxx" the instance has an error status: Please try again later [Error: No valid host was found. There are not enough hosts available]"

For additional informations I was using Ubuntu 16.04, MAAS version 2.1.3, Juju version 2.1.2 and conjure-up as tools to deploy Openstack.

Please help me. It has been 1 month since I managed to deploy Openstack, this problem has not been solved at all.

UPDATED
Here is the output of cinder service-list:

emtres01@maas:~$ cinder service-list 
+------------------+---------------------+------+---------+-------+ 
|      Binary      |         Host        | Zone |  Status | State |  
+------------------+---------------------+------+---------+-------+ 
| cinder-scheduler | juju-b6bb75-1-lxd-3 | nova | enabled |   up  | 
|  cinder-volume   |     cinder@CEPH     | nova | enabled |   up  | 
+------------------+---------------------+------+---------+-------+ 
emtres01@maas:~$

and here is the nova.log that showed up when I tried to attach volume to an instance

2017-05-13 01:46:26.346 374296 ERROR nova.virt.libvirt.driver [req-c2ea4390-c703-4981-ad28-4dce61d6d7de ae67e9e8fc51406fb890389fd06e44af 18483cc44c884278b94bf3bb41421175 - - -] [instance: 6d58f5b7-dbd0-4ae5-9c40-fd902a0d9a63] Failed to attach volume at mountpoint: /dev/vdb
2017-05-13 01:46:26.346 374296 ERROR nova.virt.libvirt.driver [instance: 6d58f5b7-dbd0-4ae5-9c40-fd902a0d9a63] Traceback (most recent call last):
2017-05-13 01:46:26.346 374296 ERROR nova.virt.libvirt.driver [instance: 6d58f5b7-dbd0-4ae5-9c40-fd902a0d9a63]   File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 1232, in attach_volume
2017-05-13 01:46:26.346 374296 ERROR nova.virt.libvirt.driver [instance: 6d58f5b7-dbd0-4ae5-9c40-fd902a0d9a63]     guest.attach_device(conf, persistent=True, live=live)
2017-05-13 01:46:26.346 374296 ERROR nova.virt.libvirt.driver [instance: 6d58f5b7-dbd0-4ae5-9c40-fd902a0d9a63]   File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/guest.py", line 304, in attach_device
2017-05-13 01:46:26.346 374296 ERROR nova.virt.libvirt.driver [instance: 6d58f5b7-dbd0-4ae5-9c40-fd902a0d9a63]     device_xml = conf.to_xml()
2017-05-13 01:46:26.346 374296 ERROR nova.virt.libvirt.driver [instance: 6d58f5b7-dbd0-4ae5-9c40-fd902a0d9a63]   File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/config.py", line 77, in to_xml
2017-05-13 01:46:26.346 374296 ERROR nova.virt.libvirt.driver [instance: 6d58f5b7-dbd0-4ae5-9c40-fd902a0d9a63]     root = self.format_dom()
2017-05-13 01:46:26.346 374296 ERROR nova.virt.libvirt.driver [instance: 6d58f5b7-dbd0-4ae5-9c40-fd902a0d9a63]   File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/config.py", line 765, in format_dom
2017-05-13 01:46:26.346 374296 ERROR nova.virt.libvirt.driver [instance: 6d58f5b7-dbd0-4ae5-9c40-fd902a0d9a63]     uuid=self.auth_secret_uuid))
2017-05-13 01:46:26.346 374296 ERROR nova.virt.libvirt.driver [instance: 6d58f5b7-dbd0-4ae5-9c40-fd902a0d9a63]   File "src/lxml/lxml.etree.pyx", line 2998, in lxml.etree.Element (src/lxml/lxml.etree.c:80607)
2017-05-13 01:46:26.346 374296 ERROR nova.virt.libvirt.driver [instance: 6d58f5b7-dbd0-4ae5-9c40-fd902a0d9a63]   File "src/lxml/apihelpers.pxi", line 135, in lxml.etree._makeElement (src/lxml/lxml.etree.c:17604)
2017-05-13 01:46:26.346 374296 ERROR nova.virt.libvirt.driver [instance: 6d58f5b7-dbd0-4ae5-9c40-fd902a0d9a63]   File "src/lxml/apihelpers.pxi", line ...
(more)
edit retag flag offensive close merge delete

Comments

You need to look for errors and other information in log files, in particular the nova compute log on the relevant compute node, and perhaps cinder api and cinder volume logs. It may help to temporarily switch on debug logging.

Bernd Bausch gravatar imageBernd Bausch ( 2017-05-09 22:54:25 -0500 )edit

How can I turn debug logging facility on? I am sorry, I am new to openstack. Thank you for your comment

Ekalaya gravatar imageEkalaya ( 2017-05-10 01:32:18 -0500 )edit
1

You set debug = yes in the nova.conf and cinder.conf files.

I suggest you read the user and admin guides, as a minimum, on docs.openstack.org. You would also learn a lot by going through an installation tutorial.

Bernd Bausch gravatar imageBernd Bausch ( 2017-05-10 02:38:57 -0500 )edit

What is the output of cinder service-list?

eblock gravatar imageeblock ( 2017-05-10 03:09:03 -0500 )edit

I will try debug logging facility later and report it here.

Ekalaya gravatar imageEkalaya ( 2017-05-10 04:10:30 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-05-10 12:26:04 -0500

See my comment at https://ask.openstack.org/en/question.... I am very confident the Ceph configuration in cinder.conf is the answer.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

2 followers

Stats

Asked: 2017-05-09 05:50:38 -0500

Seen: 696 times

Last updated: May 26 '17