Bug 2099749

Summary: [RFE]For Delete Marker Noobaa is not compatible with aws bucket lifecycle rule creation policies.
Product: [Red Hat Storage] Red Hat OpenShift Data Foundation Reporter: avdhoot <asagare>
Component: Multi-Cloud Object GatewayAssignee: Nimrod Becker <nbecker>
Status: NEW --- QA Contact: krishnaram Karthick <kramdoss>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.11CC: nbecker, odf-bz-bot
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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:

Description avdhoot 2022-06-21 15:49:49 UTC
Description of problem (please be detailed as possible and provide log
snippests):

Noobaa is not following the latest AWS API guidelines for lifecycle retention rules for Delete Marker Parameter.


1. For delete marker, the Noobaa is giving error whether we add  Days parameter or not.

Steps:

A. Create s3 bucket :
    
B. Added Expiration rule without Days parameter.

[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
-----------------------------------------------------

C.

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"
      }
   ]
}



Version of all relevant components (if applicable):
OCS 4.11.0

Does this issue impact your ability to continue to work with the product
(please explain in detail what is the user impact)?
No

Is there any workaround available to the best of your knowledge?
No

Rate from 1 - 5 the complexity of the scenario you performed that caused this
bug (1 - very simple, 5 - very complex)?


Can this issue reproducible?
Yes

Can this issue reproduce from the UI?
No

If this is a regression, please provide more details to justify this:
NA

Steps to Reproduce:
Mentioned above


Actual results:
The Noobaa is giving error whether we add  Days parameter or not

Expected results:
For delete marker, without Days parameter it should work which isrequired as per AWS API

Additional info:
NA