Cannot attach a volume to a bare-metal instance

Bug #1208707 reported by Arata Notsu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Arata Notsu

Bug Description

virt/baremetal/volume_driver.py calls db api directly then fails.

2013-08-06 15:59:47.239 ERROR nova.compute [req-117555a1-bb81-43ec-9eee-ce976729093b demo demo] No db access allowed in nova-compute: File "/usr/lib/python2.7/dist-packages/eventlet/greenpool.py", line 80, in _spawn_n_impl
    func(*args, **kwargs)
  File "/opt/stack/nova/nova/openstack/common/rpc/amqp.py", line 421, in _process_data
    **args)
  File "/opt/stack/nova/nova/openstack/common/rpc/dispatcher.py", line 172, in dispatch
    result = getattr(proxyobj, method)(ctxt, **kwargs)
  File "/opt/stack/nova/nova/exception.py", line 77, in wrapped
    return f(self, context, *args, **kw)
  File "/opt/stack/nova/nova/compute/manager.py", line 216, in decorated_function
    return function(self, context, *args, **kwargs)
  File "/opt/stack/nova/nova/compute/manager.py", line 245, in decorated_function
    return function(self, context, *args, **kwargs)
  File "/opt/stack/nova/nova/compute/manager.py", line 3424, in attach_volume
    mountpoint, instance)
  File "/opt/stack/nova/nova/compute/manager.py", line 3456, in _attach_volume
    mountpoint)
  File "/opt/stack/nova/nova/virt/baremetal/driver.py", line 357, in attach_volume
    instance, mountpoint)
  File "/opt/stack/nova/nova/virt/baremetal/volume_driver.py", line 225, in attach_volume
    fixed_ips = nova_db_api.fixed_ip_get_by_instance(ctx, instance['uuid'])
  File "/opt/stack/nova/nova/db/api.py", line 496, in fixed_ip_get_by_instance
    return IMPL.fixed_ip_get_by_instance(context, instance_uuid)
  File "/opt/stack/nova/nova/cmd/compute.py", line 47, in __call__
    stacktrace = "".join(traceback.format_stack())

Arata Notsu (arata776)
tags: added: baremetal
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/40362

Changed in nova:
assignee: nobody → Arata Notsu (arata776)
status: New → In Progress
tags: added: havana-rc-potential
Changed in nova:
importance: Undecided → High
importance: High → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/50274

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/50298

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/50628

Thierry Carrez (ttx)
tags: added: havana-backport-potential
removed: havana-rc-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/50274
Committed: http://github.com/openstack/nova/commit/ab44f97c2ee64b9897be0964e0d9fbc95026bd14
Submitter: Jenkins
Branch: master

commit ab44f97c2ee64b9897be0964e0d9fbc95026bd14
Author: Arata Notsu <email address hidden>
Date: Tue Oct 8 18:58:49 2013 +0900

    baremetal: Use network API to get fixed IPs

    Previously baremetal volume driver used DB API to get fixed ips and
    DBNotAllowed was raised.

    Change-Id: Ie2281311af1b60f55b5b719a2e2df6316bbaa9f6
    Partial-Bug: #1208707

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/50298
Committed: http://github.com/openstack/nova/commit/eb3e455459558ab567409133e03f823aaa0f782d
Submitter: Jenkins
Branch: master

commit eb3e455459558ab567409133e03f823aaa0f782d
Author: Arata Notsu <email address hidden>
Date: Tue Oct 8 20:20:01 2013 +0900

    baremetal: Add missing method to volume driver

    Added get_hypervisor_version(), which is called by underlying
    LibvirtVolumeDrivers. Also added tests roughly checking if the
    underlying drivers can be loaded and be called without error.

    Partial-Bug: #1208707
    Change-Id: Ida6b6800d1ef518c6e76d6b2ab4ac2f795a744ca

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/50628
Committed: http://github.com/openstack/nova/commit/fbe3c734a8675ed36d7e021584612d1413444667
Submitter: Jenkins
Branch: master

commit fbe3c734a8675ed36d7e021584612d1413444667
Author: Arata Notsu <email address hidden>
Date: Wed Oct 9 22:14:38 2013 +0900

    baremetal: Make volume driver use a correct source device

    attach_volume() have to take the source device path from returning of
    LibVirtVolumeDriver.connect_volume() rather than connection_info.

    It also adds a test for attach_volume().

    Change-Id: I3bee80560342104e2df614066301171624497a04
    Closes-Bug: #1208707

Changed in nova:
status: In Progress → Fix Committed
Changed in nova:
milestone: none → icehouse-2
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-2 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.