Project

General

Profile

Actions

Bug #77564

closed
SP LS

rgw: GET/HEAD Object returns x-amz-expiration for current version when versionId specified in the request

Bug #77564: rgw: GET/HEAD Object returns x-amz-expiration for current version when versionId specified in the request

Added by Saravanan Palanisamy 5 months ago. Updated 3 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
-
Due date:
% Done:

0%

Source:
Community (dev)
Backport:
squid tentacle umbrella
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Tags (freeform):
lifecycle, versioning
Fixed In:
v21.3.0-1289-g5dac2a7669
Released In:
Upkeep Timestamp:
2026-08-28T01:51:35+00:00

Description

Summary:

HEAD Object / GET Object with an explicit versionId on the current (latest) version returns a x-amz-expiration header referencing a NoncurrentVersionExpiration rule.

Steps to Reproduce:

  1. Versioned bucket, lifecycle with only NoncurrentVersionExpiration: { NoncurrentDays: 60 }
  2. Upload an object, confirm IsLatest: true .
  3. aws s3api head-object --bucket B --key K --version-id <current-version-id>

Observed:

{
  "Expiration": "expiry-date=\"Wed, 19 Aug 2026 00:00:00 GMT\",
rule-id=\"delete-noncurrent-versions-after-60-days\"",
  "VersionId": "7CqMGQ..8QU7IWr2MHc9VoT.Ripdiqf",
}

Related issues 3 (0 open — 3 closed)

Copied to rgw - Backport #78565: squid: rgw: GET/HEAD Object returns x-amz-expiration for current version when versionId specified in the requestResolvedLumir Sliva

Actions
Copied to rgw - Backport #78566: umbrella: rgw: GET/HEAD Object returns x-amz-expiration for current version when versionId specified in the requestResolvedLumir Sliva

Actions
Copied to rgw - Backport #78567: tentacle: rgw: GET/HEAD Object returns x-amz-expiration for current version when versionId specified in the requestResolvedLumir Sliva

Actions

SP Updated by Saravanan Palanisamy 5 months ago Actions #1

s3_expiration_header() in src/rgw/rgw_lc.cc:2729:

const LCExpiration& rule_expiration =
(obj_key.instance.empty()) ? expiration : noncur_expiration;

The check is: does an instance ID exist? — not: is this version noncurrent ?

When --version-id is supplied for the current version, obj_key.instance is non-empty , so the code picks noncur_expiration unconditionally. There is no is_latest check.

LS Updated by Lumir Sliva 5 months ago Actions #2

  • Status changed from New to In Progress
  • Assignee set to Lumir Sliva

LS Updated by Lumir Sliva 5 months ago Actions #3

  • Pull request ID set to 69642

CB Updated by Casey Bodley 5 months ago Actions #4

  • Status changed from In Progress to Fix Under Review
  • Tags (freeform) set to lifecycle versioning

CB Updated by Casey Bodley 5 months ago Actions #5

  • Backport set to squid tentacle umbrella

CB Updated by Casey Bodley 4 months ago Actions #6

  • Status changed from Fix Under Review to Pending Backport
  • Target version deleted (v22.0.0)

UB Updated by Upkeep Bot 4 months ago Actions #7

  • Merge Commit set to 5dac2a76694b18c0dd43fd555ff6874892556e6c
  • Fixed In set to v21.3.0-1289-g5dac2a7669
  • Upkeep Timestamp set to 2026-07-22T12:56:43+00:00

UB Updated by Upkeep Bot 4 months ago Actions #8

  • Copied to Backport #78565: squid: rgw: GET/HEAD Object returns x-amz-expiration for current version when versionId specified in the request added

UB Updated by Upkeep Bot 4 months ago Actions #9

  • Copied to Backport #78566: umbrella: rgw: GET/HEAD Object returns x-amz-expiration for current version when versionId specified in the request added

UB Updated by Upkeep Bot 4 months ago Actions #10

  • Copied to Backport #78567: tentacle: rgw: GET/HEAD Object returns x-amz-expiration for current version when versionId specified in the request added

UB Updated by Upkeep Bot 4 months ago Actions #11

  • Tags (freeform) changed from lifecycle versioning to lifecycle versioning backport_processed

UB Updated by Upkeep Bot 3 months ago Actions #12

  • Status changed from Pending Backport to Resolved
  • Upkeep Timestamp changed from 2026-07-22T12:56:43+00:00 to 2026-08-27T18:42:26+00:00

UB Updated by Upkeep Bot 3 months ago Actions #13

  • Tags (freeform) changed from lifecycle versioning backport_processed to lifecycle, versioning
  • Upkeep Timestamp changed from 2026-08-27T18:42:26+00:00 to 2026-08-28T01:51:35+00:00
Actions

Also available in: PDF Atom