s3api needs to check whether versioning is enabled in more places

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

Bug Description

Seen in the wild as part of a GET w/ version-id request:

Apr 22 10:19:27 node proxy-server: version-aware operations require that the container is versioned:
Traceback (most recent call last):
  File ".../swift/common/middleware/s3api/s3api.py", line 303, in __call__
    resp = self.handle_request(req)
  File ".../swift/common/middleware/s3api/s3api.py", line 339, in handle_request
    res = handler(req)
  File ".../swift/common/middleware/s3api/controllers/obj.py", line 126, in GET
    return self.GETorHEAD(req)
  File ".../swift/common/middleware/s3api/controllers/obj.py", line 92, in GETorHEAD
    resp = req.get_response(self.app, query=query)
  File ".../swift/common/middleware/s3api/s3request.py", line 1401, in get_response
    headers, body, query)
  File ".../swift/common/middleware/s3api/s3request.py", line 1374, in _get_response
    raise BadSwiftRequest(err_msg.decode('utf8'))
BadSwiftRequest: version-aware operations require that the container is versioned (txn: tx931a2d07d70a4b4d8778e-005ea01a2f)

Revision history for this message
clayg (clay-gerrard) wrote :

Yeah can confirm, s3 is just gunna 404

$ aws s3api get-object --bucket test.clayg.info --key README.md --profile clayg killme.out --version-id "oi1YxBCnzt_z7ioBQAucPNgmv8KWRtAn"

An error occurred (NoSuchVersion) when calling the GetObject operation: The specified version does not exist.

We're throwing a 5XX after a bunch of retries

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

Reviewed: https://review.opendev.org/722552
Committed: https://git.openstack.org/cgit/openstack/swift/commit/?id=1af995f0e81994671583ce0fff4135164be11b6a
Submitter: Zuul
Branch: master

commit 1af995f0e81994671583ce0fff4135164be11b6a
Author: Tim Burke <email address hidden>
Date: Thu Apr 23 17:21:22 2020 -0700

    s3api: Check whether versioning is enabled more

    Previously, attempting to GET, HEAD, or DELETE an object with a non-null
    version-id would cause 500s, with logs complaining about how

        version-aware operations require that the container is versioned

    Now, we'll early-return with a 404 (on GET or HEAD) or 204 (on DELETE).

    Change-Id: I46bfd4ae7d49657a94734962c087f350e758fead
    Closes-Bug: 1874295

Changed in swift:
status: In Progress → Fix Released
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/735381

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

Reviewed: https://review.opendev.org/735381
Committed: https://git.openstack.org/cgit/openstack/swift/commit/?id=481f126e6b59689599f438e5d27f7328f5b3e813
Submitter: Zuul
Branch: feature/losf

commit 51a587ed8dd5700b558ad26d70dcb7facc0f91e4
Author: Tim Burke <email address hidden>
Date: Tue Jun 16 11:34:01 2020 -0700

    Use ensure-pip role

    Hopefully this will fix the currently-broken probe test gate?

    Depends-On: https://review.opendev.org/#/c/736070/
    Change-Id: Ib652534b35236fdb6bcab131c7dc08a079bf72f6

commit 79811df34c84b416ce9f445926b31a23a32ea1a4
Author: Tim Burke <email address hidden>
Date: Fri Apr 10 22:02:57 2020 -0700

    Use ini_file to update timeout instead of crudini

    crudini seems to have trouble on py3 -- still not sure *why* it's using
    py3 for the losf job, though...

    Change-Id: Id98055994c8d59e561372417c9eb4aec969afc6a

commit e4586fdcde5267f39056bb1b5f413a411bb8e7a0
Author: Tim Burke <email address hidden>
Date: Tue Jun 9 10:50:07 2020 -0700

    memcached: Plumb logger into MemcacheRing

    This way proxies log memcached errors in the normal way instead of
    to the root logger (which eventually gets them out on STDERR).

    If no logger is provided, fall back to the root logger behavior.

    Change-Id: I2f7b3e7d5b976fab07c9a2d0a9b8c0bd9a840dfd

commit 1dfa41dada30c139129cb2771b0d68c95fd84e32
Author: Tim Burke <email address hidden>
Date: Tue Apr 28 10:45:27 2020 -0700

    swift-get-nodes: Allow users to specify either quoted or unquoted paths

    Now that we can have null bytes in Swift paths, we need a way for
    operators to be able to locate such containers and objects. Our usual
    trick of making sure the name is properly quoted for the shell won't
    suffice; running something like

       swift-get-nodes /etc/swift/container.ring.gz $'AUTH_test/\0versions\0container'

    has the path get cut off after "AUTH_test/" because of how argv works.

    So, add a new option, --quoted, to let operators indicate that they
    already quoted the path.

    Drive-bys:

      * If account, container, or object are explicitly blank, treat them
        as though they were not provided. This provides better errors when
        account is explicitly blank, for example.
      * If account, container, or object are not provided or explicitly
        blank, skip printing them. This resolves abiguities about things
        like objects whose name is actually "None".
      * When displaying account, container, and object, quote them (since
        they may contain newlines or other control characters).

    Change-Id: I3d10e121b403de7533cc3671604bcbdecb02c795
    Related-Change: If912f71d8b0d03369680374e8233da85d8d38f85
    Closes-Bug: #1875734
    Closes-Bug: #1875735
    Closes-Bug: #1875736
    Related-Bug: #1791302

commit 1b6c8f7fdf630458affe2778fc7be86df3ef1674
Author: Tim Burke <email address hidden>
Date: Fri Jun 5 16:36:32 2020 -0700

    Remove etag-quoter from 2.25.0 release notes

    This was released in 2.24.0, which already has a release note for it.

    Change-Id: I9837df281ec8baa19e8e4a7976f415e8add4a2da

commi...

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.