Project

General

Profile

Actions

Bug #64653

open

Notification FilterRules for S3key, S3Metadata & S3Tags spit incorrect json output

Added by Krunal Chheda 2 months ago. Updated about 2 months ago.

Status:
Pending Backport
Priority:
Low
Assignee:
Target version:
-
% Done:

0%

Source:
Community (dev)
Tags:
notifications backport_processed
Backport:
squid
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Currently if both prefix & suffix filter rules are set and if try to do a `radosgw-admin notification get` & capture the json output it complains incorrect json, as there are multiple keys with same name. The key name for prefix and suffix is same `FilterRule`. As per aws doc, filter rule is a repeated xml tag, and those tags are converted to key for json, however for json the key needs to be unique. So change the layout of FilterRule and make it a array.While setting the Rules and sending the s3 request, the rules are send as array, so return the rules as array as well.
For example this is the output when both prefix and suffix are set for S3Key, and when its captured in json string it complains about same key

                "S3Key": {
                    "FilterRule": {
                        "Name": "prefix",
                        "Value": "health" 
                    },
                    "FilterRule": {
                        "Name": "suffix",
                        "Value": "old" 
                    }
                },

Related issues 1 (0 open1 closed)

Copied to rgw - Backport #64954: squid: Notification FilterRules for S3key, S3Metadata & S3Tags spit incorrect json outputResolvedKrunal ChhedaActions
Actions #1

Updated by Krunal Chheda 2 months ago

  • Source set to Community (dev)
  • Tags set to notifications
Actions #2

Updated by Krunal Chheda 2 months ago

  • Status changed from New to Fix Under Review
Actions #3

Updated by Casey Bodley about 2 months ago

  • Status changed from Fix Under Review to Pending Backport
  • Backport set to squid
Actions #4

Updated by Backport Bot about 2 months ago

  • Copied to Backport #64954: squid: Notification FilterRules for S3key, S3Metadata & S3Tags spit incorrect json output added
Actions #5

Updated by Backport Bot about 2 months ago

  • Tags changed from notifications to notifications backport_processed
Actions

Also available in: Atom PDF