Ask Your Question
2

Cannot attached Ceph volume block to instance

asked 2014-10-12 03:05:44 -0500

senyapsudah gravatar image

updated 2014-10-12 03:49:57 -0500

hi guys,

i'm trying to get openstack to work with ceph. i manage to create volume block using openstack dahsboard but when i try to attached the volume to a running instance, it gives me an error on the dashboard "unable to attached volume:.

i have try searching around the logs for clues but i couldn't find anything related to the fail action to attached the volume. can someone help me on how to and where should i look for clues related to this failure. fyi, i'm able to create,edit and delete volume block from dahsboard without any issue.

openstack: icehouse ceph:firefly

please find below are my nova.conf

[DEFAULT]
#libvirt_type=qemu
debug=true
verbose=true
auth_strategy = keystone
dhcpbridge_flagfile=/etc/nova/nova.conf
dhcpbridge=/usr/bin/nova-dhcpbridge
logdir=/var/log/nova
state_path=/var/lib/nova
lock_path=/var/lock/nova
force_dhcp_release=True
iscsi_helper=tgtadm
libvirt_use_virtio_for_bridges=True
connection_type=libvirt
root_helper=sudo nova-rootwrap /etc/nova/rootwrap.conf
verbose=True
ec2_private_dns_show_ip=True
api_paste_config=/etc/nova/api-paste.ini
#volumes_path=/var/lib/nova/volumes
enabled_apis=ec2,osapi_compute,metadata
scheduler_default_filters=AllHostsFilter

rpc_backend = rabbit
rabbit_host = localhost
rabbit_password = guest

allow_resize_to_same_host = True
allow_migrate_to_same_host = True
allow_instance_snapshots = True


metadata_host=192.168.8.41
metadata_listen=0.0.0.0
metadata_listen_port=8775
metadata_manager=nova.api.manager.MetadataManager
metadata_port=8775

my_ip = localhost
vncserver_listen = 0.0.0.0
vncserver_proxyclient_address = localhost
novncproxy_base_url = http://192.168.8.41:6080/vnc_auto.html

glance_host = localhost

network_api_class = nova.network.neutronv2.api.API
neutron_url = http://localhost:9696
neutron_auth_strategy = keystone
neutron_admin_tenant_name = service
neutron_admin_username = neutron
neutron_admin_password = abc
neutron_admin_auth_url = http://localhost:35357/v2.0
linuxnet_interface_driver = nova.network.linux_net.LinuxOVSInterfaceDriver
firewall_driver = nova.virt.firewall.NoopFirewallDriver
security_group_api = neutron
service_neutron_metadata_proxy = true
neutron_metadata_proxy_shared_secret=abc123


#libvirt_images_type=rbd
#libvirt_images_rbd_pool=vms
#libvirt_images_rbd_ceph_conf=/etc/ceph/ceph.conf

volume_driver=nova.volume.driver.RBDDriver
rbd_pool=volumes
#images_type = rbd
rbd_user=cinder
rbd_secret_uuid=4cceac22-1a44-497a-8bc0-d49bbf7144df


backup_driver=cinder.backup.drivers.ceph
backup_ceph_conf=/etc/ceph/ceph.conf
backup_ceph_user=cinder-backup
backup_ceph_chunk_size=134217728
backup_ceph_pool=backups
backup_ceph_stripe_unit=0
backup_ceph_stripe_count=0
restore_discard_excess_bytes=true

libvirt_inject_password=false
libvirt_inject_key=false
libvirt_inject_partition=-2

[database]
connection = mysql://nova:abc@localhost/nova

[keystone_authtoken]
auth_uri = http://localhost:5000
auth_host = localhost
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = nova
admin_password = abc
root@testgraph:/etc/init#

this is my cinder.conf

[DEFAULT]
rootwrap_config = /etc/cinder/rootwrap.conf
api_paste_confg = /etc/cinder/api-paste.ini
#iscsi_helper = tgtadm
#volume_name_template = volume-%s
#volume_group = cinder-volumes
verbose = True
auth_strategy = keystone
state_path = /var/lib/cinder
lock_path = /var/lock/cinder
volumes_dir = /var/lib/cinder/volumes

rpc_backend = rabbit
rabbit_host = localhost
rabbit_port = 5672
rabbit_userid = guest
rabbit_password = guest

volume_driver=cinder.volume.drivers.rbd.RBDDriver
rbd_pool=volumes
rbd_ceph_conf=/etc/ceph/ceph.conf
rbd_flatten_volume_from_snapshot=false
rbd_max_clone_depth=5
glance_api_version=2
rbd_user=cinder
rbd_secret_uuid=4cceac22-1a44-497a-8bc0-d49bbf7144df

[database]
connection = mysql://cinder:abc@localhost/cinder

[keystone_authtoken]
auth_uri = http://localhost:5000
auth_host = localhost
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = cinder
admin_password = abc

i'm currently testing internally before i move it to productions.

thanks senyapsudah

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
3

answered 2014-10-12 05:18:19 -0500

jtaguinerd gravatar image

Hi, First thing I noticed, you defined volume_driver in nova.conf and cinder.conf. You should remove the one in nova.conf

I've deployed openstack with ceph as the backend a number of times, so my suggestion is to make sure that you have:

  • created ceph client keyrings for volumes pool
  • copied the keyrings and ceph.conf to your cinder-volume nodes
  • installed the client command line tools (ceph-common) in you cinder-volume nodes
  • created and defined libvirt secret key in your nova-compute node
  • updated your cinder.conf to the appropriate volume_driver (cinder.volume.drivers.rbd.RBDDriver)

If you think you have done all those then last suggestion is to try to attach the volume with debug via cli. Try

nova --debug volume-attach <server uuid=""> <volume uuid=""> <device path=""> Example: nova --debug volume-attach 3700f06c-fbf5-435c-a577-785090e1dd08 594c9fb6-b598-421f-8dd8-4906d0704e14 /dev/vdc

Hope that helps :)

edit flag offensive delete link more

Comments

thanks a lot..u save my day. issue resolve after i remove the volume_driver

senyapsudah gravatar imagesenyapsudah ( 2014-10-12 06:59:04 -0500 )edit

Glad to be of help :)

jtaguinerd gravatar imagejtaguinerd ( 2014-10-12 09:04:44 -0500 )edit
2

answered 2014-10-12 03:45:22 -0500

SamYaple gravatar image

Please provide some additional information. Namely cinder.conf and check if the ceph volume is actually created (sounds like it is) Also check you have setup the libvirt secret on the compute host properly.

edit flag offensive delete link more

Comments

i have edit my question with some more info.

senyapsudah gravatar imagesenyapsudah ( 2014-10-12 03:50:25 -0500 )edit

issue resolved.

senyapsudah gravatar imagesenyapsudah ( 2014-10-12 06:59:29 -0500 )edit

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

1 follower

Stats

Asked: 2014-10-12 03:05:44 -0500

Seen: 2,143 times

Last updated: Oct 12 '14