nova-api-metadata requires db access when configured with nova-network

Bug #1306009 reported by Vish Ishaya
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Dan Smith
Icehouse
Fix Released
Medium
Dan Smith

Bug Description

When nova-network is being used, nova-api-metadata requires db access which in some configurations means the compute nodes still connect to the database.

It connects to the db when trying to map the fixed ip address to an instance uuid:

fixed_ip = network.API().get_fixed_ip_by_address(ctxt, address)

This should be changed to do an rpc call to conductor.

Dan Smith (dansmith)
tags: added: icehouse-backport-potential
Revision history for this message
Vish Ishaya (vishvananda) wrote :
Changed in nova:
status: New → In Progress
assignee: nobody → Dan Smith (danms)
Dan Smith (danms)
Changed in nova:
milestone: none → juno-1
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/86643
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=79ab96e34ba5b8dd3e4e542dd3a7f65624b13367
Submitter: Jenkins
Branch: master

commit 79ab96e34ba5b8dd3e4e542dd3a7f65624b13367
Author: Dan Smith <email address hidden>
Date: Thu Apr 10 09:26:08 2014 -0700

    Fix network-api direct database hits in metadata server

    The metadata server was using a couple of methods from the network
    api that caused direct-to-database accesses. Those are no longer
    necessary with the object modeling of network resources. This patch
    converts those to use objects and avoid the direct database
    traffic.

    Change-Id: Iea48f74387afa35af3889eebdfa1af169a52ad1d
    Closes-bug: #1306009

Changed in nova:
status: In Progress → Fix Committed
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/87348

Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/87348
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=20d0cef99376ca622294536485a5987385a717e3
Submitter: Jenkins
Branch: master

commit 20d0cef99376ca622294536485a5987385a717e3
Author: Dan Smith <email address hidden>
Date: Mon Apr 14 11:13:32 2014 -0700

    Remove metadata's network-api dependence on the database

    This makes the metadata server use instance.info_cache for getting
    an instance's info cache instead of going direct to the network-api
    (and thus, the database) for it. It also converts the network-api
    implementation of get_fixed_ip_by_address() to use and return an
    object. Since that translates to the same DB call in the end, none
    of the network tests need to change.

    Change-Id: Iab444b1669628604f7d96d9550eb684645c554cb
    Closes-bug: #1306009

Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix proposed to nova (stable/icehouse)

Fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/89422

Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to nova (stable/icehouse)

Reviewed: https://review.openstack.org/89422
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=395ec823a540e0f2e25b29001edc6b8142b14103
Submitter: Jenkins
Branch: stable/icehouse

commit 395ec823a540e0f2e25b29001edc6b8142b14103
Author: Dan Smith <email address hidden>
Date: Mon Apr 14 11:13:32 2014 -0700

    Remove metadata's network-api dependence on the database

    This makes the metadata server use instance.info_cache for getting
    an instance's info cache instead of going direct to the network-api
    (and thus, the database) for it. It also converts the network-api
    implementation of get_fixed_ip_by_address() to use and return an
    object. Since that translates to the same DB call in the end, none
    of the network tests need to change.

    Conflicts:

            nova/tests/network/test_api.py

    Change-Id: Iab444b1669628604f7d96d9550eb684645c554cb
    Closes-bug: #1306009
    (cherry picked from commit 20d0cef99376ca622294536485a5987385a717e3)

tags: added: in-stable-icehouse
Alan Pevec (apevec)
tags: removed: icehouse-backport-potential in-stable-icehouse
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: juno-1 → 2014.2
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.