Object controller accidentally overwrites headers list

Bug #1875538 reported by Tim Burke
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
Fix Released
Critical
Unassigned

Bug Description

Not sure how we haven't seen this before, but

ERROR Unhandled exception in request:
Traceback (most recent call last):
  File ".../swift/proxy/server.py", line 570, in handle_request
    return handler(req)
  File ".../swift/proxy/controllers/base.py", line 291, in wrapped
    return func(*a, **kw)
  File ".../swift/proxy/controllers/obj.py", line 264, in GET
    return self.GETorHEAD(req)
  File ".../swift/proxy/controllers/obj.py", line 252, in GETorHEAD
    resp = self._get_or_head_response(req, node_iter, partition, policy)
  File ".../swift/proxy/controllers/obj.py", line 2449, in _get_or_head_response
    headers.extend(getter.source_headers)
AttributeError: 'HeaderKeyDict' object has no attribute 'extend'

The trouble is a few lines earlier: https://github.com/openstack/swift/blob/2.25.0/swift/proxy/controllers/obj.py#L2444 overwrites the list we were building of headers from various backends with a single HeaderKeyDict.

This came in with https://github.com/openstack/swift/commit/3189410 -- we should backport the fix to ussuri and train.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to swift (master)

Reviewed: https://review.opendev.org/723736
Committed: https://git.openstack.org/cgit/openstack/swift/commit/?id=4c8512afb16c831f9d58b58457aa9b2adfda88df
Submitter: Zuul
Branch: master

commit 4c8512afb16c831f9d58b58457aa9b2adfda88df
Author: Tim Burke <email address hidden>
Date: Mon Apr 27 14:04:51 2020 -0700

    Use separate name for HeaderKeyDict var vs list of response headers

    Closes-Bug: #1875538
    Change-Id: I1bcef61157594329f6978f7380bf7293aa1ca65e
    Related-Change: Ia832e9bab13167948f01bc50aa8a61974ce189fb

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

Reviewed: https://review.opendev.org/724395
Committed: https://git.openstack.org/cgit/openstack/swift/commit/?id=bb0e2f1712bb5203404cea652139e01d868931c2
Submitter: Zuul
Branch: stable/ussuri

commit bb0e2f1712bb5203404cea652139e01d868931c2
Author: Tim Burke <email address hidden>
Date: Mon Apr 27 14:04:51 2020 -0700

    Use separate name for HeaderKeyDict var vs list of response headers

    Closes-Bug: #1875538
    Change-Id: I1bcef61157594329f6978f7380bf7293aa1ca65e
    Related-Change: Ia832e9bab13167948f01bc50aa8a61974ce189fb

tags: added: in-stable-ussuri
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to swift (stable/train)

Reviewed: https://review.opendev.org/724396
Committed: https://git.openstack.org/cgit/openstack/swift/commit/?id=2e50b58170047007e843eef52b411bf164c6eafa
Submitter: Zuul
Branch: stable/train

commit 2e50b58170047007e843eef52b411bf164c6eafa
Author: Tim Burke <email address hidden>
Date: Mon Apr 27 14:04:51 2020 -0700

    Use separate name for HeaderKeyDict var vs list of response headers

    Closes-Bug: #1875538
    Change-Id: I1bcef61157594329f6978f7380bf7293aa1ca65e
    Related-Change: Ia832e9bab13167948f01bc50aa8a61974ce189fb

tags: added: in-stable-train
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to swift (feature/losf)

Fix proposed to branch: feature/losf
Review: https://review.opendev.org/728491

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to swift (feature/losf)
Download full text (8.3 KiB)

Reviewed: https://review.opendev.org/728491
Committed: https://git.openstack.org/cgit/openstack/swift/commit/?id=414ca6bb6c7ffe12a1f7c4f65526bb0bf98b4b49
Submitter: Zuul
Branch: feature/losf

commit 0fd23ee5466d5dd0a69c918bc7a206e697a4eecc
Author: Tim Burke <email address hidden>
Date: Wed May 13 00:24:08 2020 -0700

    Fix pep8 job

    New flake8 came out with new & improved rules. Ignore E741; it would be
    too much churn. Fix the rest.

    Change-Id: I9125c8c53423232309a75cbcc5b695b378864c1b

commit fe74ec04897d1ffae6e2808ed54a2f0761187d5e
Author: Tim Burke <email address hidden>
Date: Mon May 4 21:35:58 2020 -0700

    py27: Suppress UnicodeWarnings in ShardRange setters

    Previously, we'd see warnings like

       UnicodeWarning: Unicode equal comparison failed to convert both
       arguments to Unicode - interpreting them as being unequal

    when setting lower/upper bounds with non-ascii byte strings.

    Change-Id: I328f297a5403d7e59db95bc726428a3f92df88e1

commit 630c9ef809efc8fc05823ad66acac3b293db4f24
Author: Tim Burke <email address hidden>
Date: Mon Feb 3 13:02:58 2020 -0800

    probe tests: Work when fronted by a TLS terminator

    * Add a new config option, proxy_base_url
    * Support HTTPS as well as HTTP connections
    * Monkey-patch eventlet early so we never import an unpatched version
      from swiftclient

    Change-Id: I4945d512966d3666f2738058f15a916c65ad4a6b

commit 0f2da2aee6805afbdadfd1e8fa8e993cd6a0196d
Author: Sean McGinnis <email address hidden>
Date: Wed Apr 29 15:57:08 2020 -0500

    Use local py2 upper-constraints

    The global upper constraints repo will no longer track py2 packages,
    meaning upper constraints for the py2.7 runtime will need to be handled
    locally.

    This adds an in-repo file for upper constraints enforcement using the
    last py27 constraints from openstack/requirements to validate
    functionality.

    Change-Id: I624f914c6155178cbe474f1eae2871e2aef721eb
    Signed-off-by: Sean McGinnis <email address hidden>

commit 69529500700bd3dba575cf0a766737a7184a2121
Author: Andreas Jaeger <email address hidden>
Date: Mon May 4 08:41:48 2020 +0200

    Switch to new grenade job name

    The integrated gate templates has switched to the new grenade name
    (grenade-py3 -> grenade). This repo uses an integrated gate template
    but also listed the job for irrelevant files an extra entry.

    Rename the job following the template change to avoid duplicate
    grenade runs.

    Details:
    - http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014602.html

    Change-Id: I4afc73301965b582fd338012f0ddc60f9b85fbb0

commit cb37d3acd6c876428d1f250d65ef2d01c2a2301a
Author: Tim Burke <email address hidden>
Date: Sun May 3 00:42:09 2020 -0700

    docs: Clean up mount options

    * Stop specifying logbufs=8; that's the default
    * Stop including nodiratime with noatime; the latter implies the former

    Nothing wrong with being explicit, I suppose, but may as well keep the
    mount options to what we can easily explain: we want noatime because
    Swift does not use atime, so we don'...

Read more...

tags: added: in-feature-losf
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.