l3 agent rescheduling query is not joining tables

Bug #1359460 reported by Kevin Benton
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Kevin Benton

Bug Description

The code to reschedule the L3 agents cross-references the heartbeat in the agents table but does not join the records between the tables so incorrect results are returned.

Revision history for this message
Kevin Benton (kevinbenton) wrote :

Current code was emitting queries like this.

SELECT routerl3agentbindings.id AS routerl3agentbindings_id, routerl3agentbindings.router_id AS routerl3agentbindings_router_id, routerl3agentbindings.l3_agent_id AS routerl3agentbindings_l3_agent_id
FROM routerl3agentbindings, agents
WHERE agents.heartbeat_timestamp < '2014-08-20 23:21:27.289744' AND agents.admin_state_up;

Changed in neutron:
assignee: nobody → Kevin Benton (kevinbenton)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

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

Changed in neutron:
status: New → In Progress
Changed in neutron:
importance: Undecided → Medium
milestone: none → juno-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/115821
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=30c219f6823b80934a0c0562b048fd33b2e76c76
Submitter: Jenkins
Branch: master

commit 30c219f6823b80934a0c0562b048fd33b2e76c76
Author: Kevin Benton <email address hidden>
Date: Tue Aug 19 15:15:09 2014 -0700

    Join tables in query for down L3 agents

    Join the agent table together with the L3 agent scheduler
    table. This fixes an issue where the query would return
    all admin_state_up L3 agents with router bindings when
    any agent in the database was dead (missed heartbeats)
    instead of just returning the dead L3 agents with bindings.

    Closes-Bug: #1359460
    Change-Id: I29215f81be7e3513155faaad015e24dbf1a1ad5d

Changed in neutron:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: juno-3 → 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.