Project

General

Profile

Actions

Bug #54016

open

The decode_json of default placement in zonegroup does not match dump function

Added by zhiming zhang about 2 years ago. Updated over 1 year ago.

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

0%

Source:
Tags:
backport_processed
Backport:
octopus pacific quincy
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

In RGWZoneGroup::dump method
encode_json("default_placement", default_placement, f);
this will call
void encode_json(const char *name, const rgw_placement_rule& r, Formatter *f) {
encode_json(name, r.to_str(), f);
}

std::string to_str() const {
if (standard_storage_class()) {
return name;
}
return to_str_explicit();
}
std::string to_str_explicit() const {
return name + "/" + storage_class;
}
so, "default_placement" contains placement name and storage class.

But in RGWZoneGroup::decode_json method
JSONDecoder::decode_json("default_placement", default_placement.name, obj);
JSONDecoder::decode_json("default_storage_class", default_placement.storage_class, obj);
"default_placement" just decode to placement name, and there is no "default_storage_class".


Related issues 3 (0 open3 closed)

Copied to rgw - Backport #54078: quincy: The decode_json of default placement in zonegroup does not match dump functionResolvedCory SnyderActions
Copied to rgw - Backport #54079: pacific: The decode_json of default placement in zonegroup does not match dump functionRejectedActions
Copied to rgw - Backport #54080: octopus: The decode_json of default placement in zonegroup does not match dump functionRejectedActions
Actions #2

Updated by Casey Bodley about 2 years ago

  • Status changed from New to Fix Under Review
  • Pull request ID set to 44785
Actions #3

Updated by Casey Bodley about 2 years ago

  • Assignee set to Casey Bodley
Actions #4

Updated by Casey Bodley about 2 years ago

  • Backport set to octopus pacific quincy
Actions #5

Updated by Casey Bodley about 2 years ago

  • Status changed from Fix Under Review to Pending Backport
Actions #6

Updated by Backport Bot about 2 years ago

  • Copied to Backport #54078: quincy: The decode_json of default placement in zonegroup does not match dump function added
Actions #7

Updated by Backport Bot about 2 years ago

  • Copied to Backport #54079: pacific: The decode_json of default placement in zonegroup does not match dump function added
Actions #8

Updated by Backport Bot about 2 years ago

  • Copied to Backport #54080: octopus: The decode_json of default placement in zonegroup does not match dump function added
Actions #9

Updated by Backport Bot over 1 year ago

  • Tags set to backport_processed
Actions

Also available in: Atom PDF