Attached nova-volumes does not show in VM target

asked 2011-11-01 17:17:52 -0600

chris-mcclung gravatar image

I have setup Openstack all on one machine and are currently trying to setup nova-volume. I can start instances ok and can ssh etc in ok.

I have created a vggroup nova-volumes.

When trying to attach a volume to a VM the volume shows that it is in use after running: euca-attach-volume -i i-00000010 -d /dev/vdb vol-00000002

The Status is: euca-describe-volumes VOLUME vol-00000002 10 nova in-use (proj, cloud1, i-00000010[cloud1], /dev/vdb) 2011-11-01T14:54:51Z

vgdisplay displays for Nova-volumes: Alloc PE / Size 2560 / 10.00 GiB Free PE / Size 951302 / 3.63 TiB VG UUID nBoTgU-nTPQ-AOc6-M7ZE-dRGF-3nXl-kDgeYW

If i do a discovery I get iscsiadm -m discovery -t st -p 192.168.2.200 192.168.2.200:3260,1 iqn.2010-10.org.openstack:volume-00000002

euca-describe-instances RESERVATION r-kectzmil proj default INSTANCE i-00000010 ami-00000002 192.168.22.6 192.168.22.6 running chriskey (proj, cloud1) 0 m1.tiny 2011-11-01T16:13:32Z nova aki-00000001 ami-00000000

However if I run: iscsiadm -m session iscsiadm: No active sessions.

Running fdisk -l on the VM shows no /dev/....

The volume.log shows: 2011-11-01 16:12:42,871 AUDIT nova [-] Starting volume node (version 2011.3-nova-milestone-tarball:tarmac-20110922115702-k9nkvxqzhj130av2) 2011-11-01 16:12:42,872 DEBUG nova.utils [-] Running cmd (subprocess): sudo vgs --noheadings -o name from (pid=2312) execute /usr/lib/python2.7/dist-packages/nova/utils.py:168 2011-11-01 16:12:43,046 DEBUG nova.utils [-] backend <module 'nova.db.sqlalchemy.api'="" from="" '="" usr="" lib="" python2.7="" dist-packages="" nova="" db="" sqlalchemy="" api.pyc'=""> from (pid=2312) __get_backend /usr/lib/python2.7/dist-packages/nova/utils.py:450 2011-11-01 16:12:43,047 INFO nova.db.sqlalchemy [-] Using mysql/eventlet db_pool. 2011-11-01 16:12:43,130 DEBUG nova.volume.manager [-] Re-exporting 1 volumes from (pid=2312) init_host /usr/lib/python2.7/dist-packages/nova/volume/manager.py:89 2011-11-01 16:12:43,132 DEBUG nova.utils [-] Running cmd (subprocess): sudo tgtadm --op new --lld=iscsi --mode=target --tid=1 --targetname=iqn.2010-10.org.openstack:volume-00000002 from (pid=2312) execute /usr/lib/python2.7/dist-packages/nova/utils.py:168 2011-11-01 16:12:43,136 DEBUG nova.utils [-] Running cmd (subprocess): sudo tgtadm --op bind --lld=iscsi --mode=target --initiator-address=ALL --tid=1 from (pid=2312) execute /usr/lib/python2.7/dist-packages/nova/utils.py:168 2011-11-01 16:12:43,140 DEBUG nova.utils [-] Running cmd (subprocess): sudo tgtadm --op new --lld=iscsi --mode=logicalunit --tid=1 --lun=1 --backing-store=/dev/nova-volumes/volume-00000002 from (pid=2312) execute /usr/lib/python2.7/dist-packages/nova/utils.py:168 2011-11-01 16:12:43,168 INFO nova.rpc [-] Connected to AMQP server on 192.168.2.200:5672 2011-11-01 16:12:43,168 DEBUG nova [-] Creating Consumer connection for Service volume from (pid=2312) start /usr/lib/python2.7/dist-packages/nova/service.py:153

compute.log shows:

2011-11-01 16:15:37,297 DEBUG nova.rpc [-] unpacked context: {'user_id': u'novaadmin', 'roles': [u'projec tmanager'], 'timestamp': u'2011-11-01T16:15:37.245193', 'auth_token': None, 'msg_id': None, 'remote_addre ss': u'192.168.2.200', 'strategy': u'noauth', 'is_admin': True ... (more)

edit retag flag offensive close merge delete

8 answers

Sort by ยป oldest newest most voted
0

answered 2011-11-01 17:21:03 -0600

chris-mcclung gravatar image

I am running Ubuntu 11.10 with the ubuntu packages

edit flag offensive delete link more
0

answered 2011-11-02 11:21:30 -0600

chris-mcclung gravatar image

WAD.

edit flag offensive delete link more
0

answered 2011-12-15 01:41:15 -0600

What was the solution to your problem? I'm experiencing the exact same one right now.

The volume says it is attached, but iscsiadm shows no session.

Looking in nova-compute.log, there is the same line about "attaching volume 2 to /dev/vdb". However, after a period of a few minutes, an error does eventually show up:

2011-12-14 17:17:31,391 AUDIT nova.compute.manager [374df4a8-a85e-4352-8b87-06cba81c75d1 trhoden testproj] instance 20: attaching volume 2 to /dev/vdb 2011-12-14 17:17:32,460 ERROR nova.exception [-] Uncaught exception (nova.exception): TRACE: Traceback (most recent call last): (nova.exception): TRACE: File "/usr/lib/pymodules/python2.6/nova/exception.py", line 98, in wrapped (nova.exception): TRACE: return f(args, *kw) (nova.exception): TRACE: File "/usr/lib/pymodules/python2.6/nova/virt/libvirt/connection.py", line 361, in attach_volume (nova.exception): TRACE: virt_dom.attachDevice(xml) (nova.exception): TRACE: File "/usr/lib/python2.6/dist-packages/libvirt.py", line 263, in attachDevice (nova.exception): TRACE: if ret == -1: raise libvirtError ('virDomainAttachDevice() failed', dom=self) (nova.exception): TRACE: libvirtError: operation failed: adding virtio-blk-pci,bus=pci.0,addr=0x8,drive=drive-virtio-disk1,id=virtio-disk1 device failed: Duplicate ID 'virtio-disk1' for device

Wondering if anyone has seen this before.

edit flag offensive delete link more
0

answered 2011-12-16 09:28:51 -0600

chris-mcclung gravatar image

you have to add/use the following line in nova.conf: --iscsi_helper=tgtadm

It seems to be a ubuntu thing since 11.10.

edit flag offensive delete link more
0

answered 2011-12-18 22:37:21 -0600

lorinh gravatar image

Perhaps the default value of that flag should be changed?

edit flag offensive delete link more
0

answered 2011-12-19 09:24:47 -0600

chris-mcclung gravatar image

Makes sense, I think an autoconfig is needed once Openstack has matured more.

Giving it this is my setup x,y,z would cut out a lot of misconfigurations. To make to run properly on one machine using 1 NIC took adding a few non official config options.

edit flag offensive delete link more
0

answered 2011-12-19 22:04:54 -0600

Thanks for the response, Chris.

However, that didn't resolve my problem. I may ask a separate question about my (seemingly unique) issue, rather than hijacking this Solved question.

edit flag offensive delete link more
0

answered 2012-11-07 13:04:46 -0600

i just rebooted my system. Then i have given the commands for restarting the nova services it started.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2011-11-01 17:17:52 -0600

Seen: 127 times

Last updated: Nov 07 '12