Bug 2029298
| Summary: | [GSS] Noobaa is not compatible with aws bucket lifecycle rule creation policies | ||
|---|---|---|---|
| Product: | [Red Hat Storage] Red Hat OpenShift Data Foundation | Reporter: | Sonal <sarora> |
| Component: | Multi-Cloud Object Gateway | Assignee: | Liran Mauda <lmauda> |
| Status: | CLOSED ERRATA | QA Contact: | avdhoot <asagare> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 4.8 | CC: | achernet, aindenba, asagare, dzaken, eglottma, etamir, kramdoss, lmauda, mmuench, muagarwa, nbecker, ocs-bugs, odf-bz-bot, olakra, tdesala |
| Target Milestone: | --- | Flags: | lmauda:
needinfo?
(aindenba) lmauda: needinfo? (aindenba) |
| Target Release: | ODF 4.11.0 | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | 4.11.0-66 | Doc Type: | Enhancement |
| Doc Text: |
.Lifecycle policy for object expiration for data buckets
Previously, the Multicloud Object Gateway (MCG) was not aligned with newer lifecycle APIs. With this release update, MCG is now compatible with the lifecycle rest API and supports object expiration for data buckets.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2022-08-24 13:48:26 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 2094357 | ||
|
Description
Sonal
2021-12-06 07:09:04 UTC
Hi Liran,
I have verified bug with OCP(4.11) + ODF(4.11.0-66) build. Butfound that it is partially fixed.
Observations-
1. With prefix attribute, inside filter attribute, the put-lifecycle API method is passed as expected.
$cat expire-lfrule-withoutprefix.json
{
"Rules": [
{
"Expiration": {
"Days": 1,
"ExpiredObjectDeleteMarker": false
},
"ID": "data-expire-withoutprefix",
"Filter": {
"Prefix": ""
},
"Status": "Enabled"
}
]
[auth]$ AWS_ACCESS_KEY_ID=$NOOBAA_ACCESS_KEY AWS_SECRET_ACCESS_KEY=$NOOBAA_SECRET_KEY aws --endpoint https://s3-openshift-storage.apps.asagare-bug202929.qe.rh-ocs.com --no-verify-ssl s3api put-bucket-lifecycle-configuration --bucket test-bucket-cli --lifecycle-configuration file://expire-lfrule-withoutprefix.json
/usr/lib/python3.9/site-packages/urllib3/connectionpool.py:981: InsecureRequestWarning: Unverified HTTPS request is being made to host 's3-openshift-storage.apps.asagare-bug202929.qe.rh-ocs.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
warnings.warn
[auth]$ AWS_ACCESS_KEY_ID=$NOOBAA_ACCESS_KEY AWS_SECRET_ACCESS_KEY=$NOOBAA_SECRET_KEY aws --endpoint https://s3-openshift-storage.apps.asagare-bug202929.qe.rh-ocs.com --no-verify-ssl s3api get-bucket-lifecycle-configuration --bucket test-bucket-cli
/usr/lib/python3.9/site-packages/urllib3/connectionpool.py:981: InsecureRequestWarning: Unverified HTTPS request is being made to host 's3-openshift-storage.apps.asagare-bug202929.qe.rh-ocs.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
warnings.warn(
{
"Rules": [
{
"Expiration": {
"Days": 1
},
"ID": "data-expire-withoutprefix",
"Filter": {
"Prefix": ""
},
"Status": "Enabled"
}
]
}
2. For delete marker, the Noobaa is giving error whether we add Days parameter or not.
[auth]$ cat expire-lfrule-delmark.json
{
"Rules": [
{
"Expiration": {
"ExpiredObjectDeleteMarker": true
},
"ID": "data-expire-deletemark",
"Prefix": "",
"Status": "Enabled"
}
]
}
[auth]$ AWS_ACCESS_KEY_ID=$NOOBAA_ACCESS_KEY AWS_SECRET_ACCESS_KEY=$NOOBAA_SECRET_KEY aws --endpoint https://s3-openshift-storage.apps.asagare-bug202929.qe.rh-ocs.com --no-verify-ssl s3api put-bucket-lifecycle-configuration --bucket test-bucket-cli --lifecycle-configuration file://expire-lfrule-delmark.json
/usr/lib/python3.9/site-packages/urllib3/connectionpool.py:981: InsecureRequestWarning: Unverified HTTPS request is being made to host 's3-openshift-storage.apps.asagare-bug202929.qe.rh-ocs.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
warnings.warn(
An error occurred (InvalidArgument) when calling the PutBucketLifecycleConfiguration operation: Invalid Argument
-----------------------------------------------------
After updating file with Days parameter.
[auth]$ AWS_ACCESS_KEY_ID=$NOOBAA_ACCESS_KEY AWS_SECRET_ACCESS_KEY=$NOOBAA_SECRET_KEY aws --endpoint https://s3-openshift-storage.apps.asagare-bug202929.qe.rh-ocs.com --no-verify-ssl s3api put-bucket-lifecycle-configuration --bucket test-bucket-cli --lifecycle-configuration file://expire-lfrule-delmark.json
/usr/lib/python3.9/site-packages/urllib3/connectionpool.py:981: InsecureRequestWarning: Unverified HTTPS request is being made to host 's3-openshift-storage.apps.asagare-bug202929.qe.rh-ocs.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
warnings.warn(
An error occurred (InvalidArgument) when calling the PutBucketLifecycleConfiguration operation: Invalid Argument
[auth]$ cat expire-lfrule-delmark.json
{
"Rules": [
{
"Expiration": {
"Days": 1,
"ExpiredObjectDeleteMarker": true
},
"ID": "data-expire-deletemarkdays",
"Prefix": "",
"Status": "Enabled"
}
]
}
Hence Creating new BZ for delete marker.
Thanks All, for clarifying the things. So understood that it was decided not to support ExpiredObjectDeleteMarker and scope for this epic was prefix and tags only. Delete markers were not. Marking this bug as verified as With prefix attribute, inside filter attribute, the put-lifecycle API method is passed as expected. Hi Sonal, Thanks for the confirmation. I have also tested in Vmware environment. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Important: Red Hat OpenShift Data Foundation 4.11.0 security, enhancement, & bugfix update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2022:6156 |