Actions
Bug #54016
openThe decode_json of default placement in zonegroup does not match dump function
% Done:
0%
Source:
Tags:
backport_processed
Backport:
octopus pacific quincy
Regression:
No
Severity:
3 - minor
Reviewed:
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".
Updated by zhiming zhang about 2 years ago
Updated by Casey Bodley about 2 years ago
- Status changed from New to Fix Under Review
- Pull request ID set to 44785
Updated by Casey Bodley about 2 years ago
- Backport set to octopus pacific quincy
Updated by Casey Bodley about 2 years ago
- Status changed from Fix Under Review to Pending Backport
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
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
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