Listing instances with a marker that is in the build_requests table and the ip/ip6 filters results in an error

Bug #1777458 reported by Matt Riedemann
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Matt Riedemann
Queens
Fix Committed
Medium
Matt Riedemann

Bug Description

This is very similar to bug 1773945 but has a specific recreate:

1. create server
2. while it's a build request (before scheduling), immediately list servers with the id from server in #1 as the marker and filter using the 'ip' filter - it doesn't matter what the value is

Due to change https://review.openstack.org/#/c/539469/ this will bypass the build_requests table because of the ip filter and then attempt to look for the marker in the cell database instances tables, and not find it and fail with a 400 error.

If you do this on top of change https://review.openstack.org/#/c/575556/ then it's a 500 error.

Matt Riedemann (mriedem)
Changed in nova:
assignee: nobody → Matt Riedemann (mriedem)
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/576161

Changed in nova:
status: Triaged → In Progress
Matt Riedemann (mriedem)
Changed in nova:
importance: High → Medium
Matt Riedemann (mriedem)
tags: added: cells
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/576161
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=8cea14abf30c40da4ce5ffcfb4fb37dd79083255
Submitter: Zuul
Branch: master

commit 8cea14abf30c40da4ce5ffcfb4fb37dd79083255
Author: Matt Riedemann <email address hidden>
Date: Mon Jun 18 10:27:43 2018 -0400

    Fix regression when listing build_requests with marker and ip filter

    Change Ic02206e887e3fea7752d615bbed680510c482097 attempted
    to optimize the GET /servers flow by skipping filtering on
    build requests if the ip or ip6 filters were used, since
    servers that are not yet scheduled (build requests) can't have
    ips. However, if a marker is provided and the marker is in the
    build_requests table, we fail to look there and then check the
    cells for the marker, which won't exist and result in a 400
    MarkerNotFound error.

    This fixes the issue by *not* skipping build requests if there
    is a marker specified. A functional test is added which will
    show the 400 MarkerNotFound error if the code fix is removed.

    Change-Id: Ibdd157d06252c3c0219539ec798c8d9d3a8ae26f
    Closes-Bug: #1777458

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.openstack.org/579561

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/queens)

Reviewed: https://review.openstack.org/579561
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=f1cb6f1647025539093dc2cdd52da3ed129a6f5c
Submitter: Zuul
Branch: stable/queens

commit f1cb6f1647025539093dc2cdd52da3ed129a6f5c
Author: Matt Riedemann <email address hidden>
Date: Mon Jun 18 10:27:43 2018 -0400

    Fix regression when listing build_requests with marker and ip filter

    Change Ic02206e887e3fea7752d615bbed680510c482097 attempted
    to optimize the GET /servers flow by skipping filtering on
    build requests if the ip or ip6 filters were used, since
    servers that are not yet scheduled (build requests) can't have
    ips. However, if a marker is provided and the marker is in the
    build_requests table, we fail to look there and then check the
    cells for the marker, which won't exist and result in a 400
    MarkerNotFound error.

    This fixes the issue by *not* skipping build requests if there
    is a marker specified. A functional test is added which will
    show the 400 MarkerNotFound error if the code fix is removed.

    Change-Id: Ibdd157d06252c3c0219539ec798c8d9d3a8ae26f
    Closes-Bug: #1777458
    (cherry picked from commit 8cea14abf30c40da4ce5ffcfb4fb37dd79083255)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 18.0.0.0b3

This issue was fixed in the openstack/nova 18.0.0.0b3 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 17.0.6

This issue was fixed in the openstack/nova 17.0.6 release.

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.