[openstack-dev] Is volume attachment to an LXC instance is broken?

David Kang dkang at isi.edu
Tue Sep 4 20:18:12 UTC 2012



 mysql DB shows that 'root_device_name' of an LXC instance is set as "/dev/a".
I believe it is a bug.
Let me file it as a bug.

 David

----- Original Message -----
> This looks like a recent bug. Lxc may not be setting root_device_path
> in the block device mapping table. It is now using root_device_path to
> set the path for the volumes. We may need to supply a fallback if it
> isn't set.
> 
> Vish
> 
> On Sep 4, 2012, at 11:00 AM, David Kang <dkang at isi.edu> wrote:
> 
> >
> >  Is volume attachment to an LXC instance is broken?
> >
> >  I'm trying to run the following command:
> > $ euca-attach-volume vol-00000007 -i i-0000000b -d /dev/vdc
> >
> > It fails and the nova-compute log is copied and pasted below.
> > The error message is :
> >   "InvalidDevicePath: The supplied device path (/dev/a) is invalid."
> > The device name given is "/dev/vdc", but it looks like that
> > get_device_name_for_instance()
> > changes it to '/dev/a'.
> > And it ends up the error of "InvalidDevicePath".
> >
> > Is it bug or my mistake?
> > I pulled the nova from github on August 29th.
> > And the followings are configured in /etc/nova/nova.conf file.
> >   use_cow_images=True
> >   libvirt_type=lxc
> >
> >  Thanks,
> >  David
> >
> > ------------- log of nova-compute ---------------
> >
> > 2012-09-04 13:37:46 DEBUG nova.utils
> > [req-79250a0b-6c11-4afc-a0a4-75736d3853c5 admin admin] Got semaphore
> > "f3fb4350-a72e-404f-a21f-10f333fe67e8" for method "do_reserve"...
> > from (pid=13108) inner /usr/local/nova/nova/utils.py:712
> > 2012-09-04 13:37:46 DEBUG nova.utils
> > [req-79250a0b-6c11-4afc-a0a4-75736d3853c5 admin admin] Attempting to
> > grab semaphore "compute_resources" for method
> > "update_load_stats_for_instance"... from (pid=13108) inner
> > /usr/local/nova/nova/utils.py:708
> > 2012-09-04 13:37:46 DEBUG nova.utils
> > [req-79250a0b-6c11-4afc-a0a4-75736d3853c5 admin admin] Got semaphore
> > "compute_resources" for method "update_load_stats_for_instance"...
> > from (pid=13108) inner /usr/local/nova/nova/utils.py:712
> > 2012-09-04 13:37:46 ERROR nova.openstack.common.rpc.amqp [-]
> > Exception during message handling
> > 2012-09-04 13:37:46 TRACE nova.openstack.common.rpc.amqp Traceback
> > (most recent call last):
> > 2012-09-04 13:37:46 TRACE nova.openstack.common.rpc.amqp File
> > "/usr/local/nova/nova/openstack/common/rpc/amqp.py", line 275, in
> > _process_data
> > 2012-09-04 13:37:46 TRACE nova.openstack.common.rpc.amqp rval =
> > self.proxy.dispatch(ctxt, version, method, **args)
> > 2012-09-04 13:37:46 TRACE nova.openstack.common.rpc.amqp File
> > "/usr/local/nova/nova/openstack/common/rpc/dispatcher.py", line 145,
> > in dispatch
> > 2012-09-04 13:37:46 TRACE nova.openstack.common.rpc.amqp return
> > getattr(proxyobj, method)(ctxt, **kwargs)
> > 2012-09-04 13:37:46 TRACE nova.openstack.common.rpc.amqp File
> > "/usr/local/nova/nova/exception.py", line 117, in wrapped
> > 2012-09-04 13:37:46 TRACE nova.openstack.common.rpc.amqp temp_level,
> > payload)
> > 2012-09-04 13:37:46 TRACE nova.openstack.common.rpc.amqp File
> > "/usr/lib64/python2.6/contextlib.py", line 23, in __exit__
> > 2012-09-04 13:37:46 TRACE nova.openstack.common.rpc.amqp
> > self.gen.next()
> > 2012-09-04 13:37:46 TRACE nova.openstack.common.rpc.amqp File
> > "/usr/local/nova/nova/exception.py", line 92, in wrapped
> > 2012-09-04 13:37:46 TRACE nova.openstack.common.rpc.amqp return
> > f(*args, **kw)
> > 2012-09-04 13:37:46 TRACE nova.openstack.common.rpc.amqp File
> > "/usr/local/nova/nova/compute/manager.py", line 211, in
> > decorated_function
> > 2012-09-04 13:37:46 TRACE nova.openstack.common.rpc.amqp pass
> > 2012-09-04 13:37:46 TRACE nova.openstack.common.rpc.amqp File
> > "/usr/lib64/python2.6/contextlib.py", line 23, in __exit__
> > 2012-09-04 13:37:46 TRACE nova.openstack.common.rpc.amqp
> > self.gen.next()
> > 2012-09-04 13:37:46 TRACE nova.openstack.common.rpc.amqp File
> > "/usr/local/nova/nova/compute/manager.py", line 204, in
> > decorated_function
> > 2012-09-04 13:37:46 TRACE nova.openstack.common.rpc.amqp return
> > function(self, context, *args, **kwargs)
> > 2012-09-04 13:37:46 TRACE nova.openstack.common.rpc.amqp File
> > "/usr/local/nova/nova/compute/manager.py", line 237, in
> > decorated_function
> > 2012-09-04 13:37:46 TRACE nova.openstack.common.rpc.amqp
> > instance_uuid, e, sys.exc_info())
> > 2012-09-04 13:37:46 TRACE nova.openstack.common.rpc.amqp File
> > "/usr/lib64/python2.6/contextlib.py", line 23, in __exit__
> > 2012-09-04 13:37:46 TRACE nova.openstack.common.rpc.amqp
> > self.gen.next()
> > 2012-09-04 13:37:46 TRACE nova.openstack.common.rpc.amqp File
> > "/usr/local/nova/nova/compute/manager.py", line 226, in
> > decorated_function
> > 2012-09-04 13:37:46 TRACE nova.openstack.common.rpc.amqp return
> > function(self, context, *args, **kwargs)
> > 2012-09-04 13:37:46 TRACE nova.openstack.common.rpc.amqp File
> > "/usr/local/nova/nova/compute/manager.py", line 2057, in
> > reserve_block_device_name
> > 2012-09-04 13:37:46 TRACE nova.openstack.common.rpc.amqp return
> > do_reserve()
> > 2012-09-04 13:37:46 TRACE nova.openstack.common.rpc.amqp File
> > "/usr/local/nova/nova/utils.py", line 733, in inner
> > 2012-09-04 13:37:46 TRACE nova.openstack.common.rpc.amqp retval =
> > f(*args, **kwargs)
> > 2012-09-04 13:37:46 TRACE nova.openstack.common.rpc.amqp File
> > "/usr/local/nova/nova/compute/manager.py", line 2051, in do_reserve
> > 2012-09-04 13:37:46 TRACE nova.openstack.common.rpc.amqp device)
> > 2012-09-04 13:37:46 TRACE nova.openstack.common.rpc.amqp File
> > "/usr/local/nova/nova/compute/utils.py", line 56, in
> > get_device_name_for_instance
> > 2012-09-04 13:37:46 TRACE nova.openstack.common.rpc.amqp raise
> > exception.InvalidDevicePath(path=mappings['root'])
> > 2012-09-04 13:37:46 TRACE nova.openstack.common.rpc.amqp
> > InvalidDevicePath: The supplied device path (/dev/a) is invalid.
> > 2012-09-04 13:37:46 TRACE nova.openstack.common.rpc.amqp
> > 2012-09-04 13:37:46 ERROR nova.openstack.common.rpc.common [-]
> > Returning exception The supplied device path (/dev/a) is invalid. to
> > caller
> > 2012-09-04 13:37:46 ERROR nova.openstack.common.rpc.common [-]
> > ['Traceback (most recent call last):\n', ' File
> > "/usr/local/nova/nova/openstack/common/rpc/amqp.py", line 275, in
> > _process_data\n rval = self.proxy.dispatch(ctxt, version, method,
> > **args)\n', ' File
> > "/usr/local/nova/nova/openstack/common/rpc/dispatcher.py", line 145,
> > in dispatch\n return getattr(proxyobj, method)(ctxt, **kwargs)\n', '
> > File "/usr/local/nova/nova/exception.py", line 117, in wrapped\n
> > temp_level, payload)\n', ' File
> > "/usr/lib64/python2.6/contextlib.py", line 23, in __exit__\n
> > self.gen.next()\n', ' File "/usr/local/nova/nova/exception.py", line
> > 92, in wrapped\n return f(*args, **kw)\n', ' File
> > "/usr/local/nova/nova/compute/manager.py", line 211, in
> > decorated_function\n pass\n', ' File
> > "/usr/lib64/python2.6/contextlib.py", line 23, in __exit__\n
> > self.gen.next()\n', ' File
> > "/usr/local/nova/nova/compute/manager.py", line 204, in
> > decorated_function\n return function(self!
> , context, *args, **kwargs)\n', ' File
> "/usr/local/nova/nova/compute/manager.py", line 237, in
> decorated_function\n instance_uuid, e, sys.exc_info())\n', ' File
> "/usr/lib64/python2.6/contextlib.py", line 23, in __exit__\n
> self.gen.next()\n', ' File "/usr/local/nova/nova/compute/manager.py",
> line 226, in decorated_function\n return function(self, context,
> *args, **kwargs)\n', ' File "/usr/local/nova/nova/compute/manager.py",
> line 2057, in reserve_block_device_name\n return do_reserve()\n', '
> File "/usr/local/nova/nova/utils.py", line 733, in inner\n retval =
> f(*args, **kwargs)\n', ' File
> "/usr/local/nova/nova/compute/manager.py", line 2051, in do_reserve\n
> device)\n', ' File "/usr/local/nova/nova/compute/utils.py", line 56,
> in get_device_name_for_instance\n raise
> exception.InvalidDevicePath(path=mappings[\'root\'])\n',
> 'InvalidDevicePath: The supplied device path (/dev/a) is invalid.\n']
> >
> >
> >
> > ----------------------
> > Dr. Dong-In "David" Kang
> > Computer Scientist
> > USC/ISI
> >
> > _______________________________________________
> > OpenStack-dev mailing list
> > OpenStack-dev at lists.openstack.org
> > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> 
> 
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev



More information about the OpenStack-dev mailing list