libvirt driver: Failed to attach new interface to VM

Bug #1212565 reported by Ryota Mibu
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Cyril Roelandt
Grizzly
Fix Released
Undecided
Unassigned

Bug Description

The "nova interface-attach" command fails in nova-compute with libvirt/KVM driver due to missing arguments.

Related commit: https://review.openstack.org/#q,I63c1fb51ea637d461755b309c7464f4b4d49a4b2,n,z

It fails with the following response:
$ nova interface-attach --net-id 6d2b5fb2-1f4b-4b3f-b670-93a897c3721b vm
ERROR: The server could not comply with the request since it is either malformed or otherwise incorrect. (HTTP 400) (Request-ID: req-95a70e59-a401-4e42-bdb7-6d4711ebb92a)

Error message in nova-compute log:
2013-08-15 16:10:17.971 27780 DEBUG nova.openstack.common.rpc.amqp [-] Making synchronous call on conductor ... multicall /opt/stack/nova/nova/openstack/common/rpc/amqp.py:583
2013-08-15 16:10:17.971 27780 DEBUG nova.openstack.common.rpc.amqp [-] MSG_ID is 82cd88f9957d45dd92e34c9f45cd7819 multicall /opt/stack/nova/nova/openstack/common/rpc/amqp.py:586
2013-08-15 16:10:17.972 27780 DEBUG nova.openstack.common.rpc.amqp [-] UNIQUE_ID is b9ba88875ff74c09b5362565a6e4d25c. _add_unique_id /opt/stack/nova/nova/openstack/common/rpc/amqp.py:337

/nova/compute/manager.py", line 3054, in attach_interface
2013-08-15 16:03:29.265 27780 TRACE nova.openstack.common.rpc.amqp self.driver.attach_
interface(instance, image_meta, legacy_net_info)
2013-08-15 16:03:29.265 27780 TRACE nova.openstack.common.rpc.amqp File "/opt/stack/nova
/nova/exception.py", line 117, in wrapped
2013-08-15 16:03:29.265 27780 TRACE nova.openstack.common.rpc.amqp temp_level, payload
)
2013-08-15 16:03:29.265 27780 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python
2.7/contextlib.py", line 24, in __exit__
2013-08-15 16:03:29.265 27780 TRACE nova.openstack.common.rpc.amqp self.gen.next()
2013-08-15 16:03:29.265 27780 TRACE nova.openstack.common.rpc.amqp File "/opt/stack/nova
/nova/exception.py", line 94, in wrapped
2013-08-15 16:03:29.265 27780 TRACE nova.openstack.common.rpc.amqp return f(self, cont
ext, *args, **kw)
2013-08-15 16:03:29.265 27780 TRACE nova.openstack.common.rpc.amqp File "/opt/stack/nova
/nova/virt/libvirt/driver.py", line 1052, in attach_interface
2013-08-15 16:03:29.265 27780 TRACE nova.openstack.common.rpc.amqp image_meta)
2013-08-15 16:03:29.265 27780 TRACE nova.openstack.common.rpc.amqp TypeError: get_config()
 takes exactly 6 arguments (5 given)
2013-08-15 16:03:29.265 27780 TRACE nova.openstack.common.rpc.amqp
2013-08-15 16:03:29.268 ERROR nova.openstack.common.rpc.common [req-95a70e59-a401-4e42-bdb
7-6d4711ebb92a demo demo] Returning exception get_config() takes exactly 6 arguments (5 gi
ven) to caller
2013-08-15 16:03:29.268 ERROR nova.openstack.common.rpc.common [req-95a70e59-a401-4e42-bdb
7-6d4711ebb92a demo demo] ['Traceback (most recent call last):\n', ' File "/opt/stack/nov
a/nova/openstack/common/rpc/amqp.py", line 430, in _process_data\n rval = self.proxy.di
spatch(ctxt, version, method, **args)\n', ' File "/opt/stack/nova/nova/openstack/common/r
pc/dispatcher.py", line 133, in dispatch\n return getattr(proxyobj, method)(ctxt, **kwa
rgs)\n', ' File "/opt/stack/nova/nova/compute/manager.py", line 3054, in attach_interface
\n self.driver.attach_interface(instance, image_meta, legacy_net_info)\n', ' File "/op
t/stack/nova/nova/exception.py", line 117, in wrapped\n temp_level, payload)\n', ' Fil
e "/usr/lib/python2.7/contextlib.py", line 24, in __exit__\n self.gen.next()\n', ' Fil
e "/opt/stack/nova/nova/exception.py", line 94, in wrapped\n return f(self, context, *a
rgs, **kw)\n', ' File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 1052, in attach
_interface\n image_meta)\n', 'TypeError: get_config() takes exactly 6 arguments (5 give
n)\n']

Tags: libvirt
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/grizzly)

Fix proposed to branch: stable/grizzly
Review: https://review.openstack.org/42280

Ryota Mibu (r-mibu)
tags: added: grizzly-backport-potential
Revision history for this message
Ryota Mibu (r-mibu) wrote :

This bug is in stable/grizzly.

I also confirmed the same problem in master branch.

tags: removed: grizzly-backport-potential
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/42284

Revision history for this message
Alan Pevec (apevec) wrote :
Changed in nova:
assignee: nobody → Cyril Roelandt (cyril-roelandt)
Changed in nova:
assignee: Cyril Roelandt (cyril-roelandt) → Xavier Queralt (xqueralt)
status: New → In Progress
Changed in nova:
assignee: Xavier Queralt (xqueralt) → Cyril Roelandt (cyril-roelandt)
Changed in nova:
assignee: Cyril Roelandt (cyril-roelandt) → Xavier Queralt (xqueralt)
Alan Pevec (apevec)
Changed in nova:
assignee: Xavier Queralt (xqueralt) → Cyril Roelandt (cyril-roelandt)
status: In Progress → Fix Committed
status: Fix Committed → In Progress
Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → havana-3
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/grizzly)

Reviewed: https://review.openstack.org/43261
Committed: http://github.com/openstack/nova/commit/873ccbb260cb85a66ca7502c477f0b749d4bb81f
Submitter: Jenkins
Branch: stable/grizzly

commit 873ccbb260cb85a66ca7502c477f0b749d4bb81f
Author: Cyril Roelandt <email address hidden>
Date: Mon Jul 15 08:19:30 2013 +0000

    libvirt: fix {attach,detach}_interface()

    * The get_config() method now takes 6 arguments, instead of 5
      previously. This change has been introduced by commit 08f8773b.

    * LibvirtConnTestCase: add the test_attach_interface_get_config() and
      test_detach_interface_get_config() methods to prevent future
      failures.

    Fixes bug #1212565

    (cherry picked from commit ff4863cca3012b2060bff788456c1b98b03d46d5)

    Conflicts:
     nova/tests/test_libvirt.py
     nova/virt/libvirt/driver.py

    Change-Id: I4e874f59595c3afe820103a27036519df1a126ff

Thierry Carrez (ttx)
Changed in nova:
milestone: havana-3 → 2013.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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