Bug 2028776 - Upload to MCG bucket with set quota fails
Summary: Upload to MCG bucket with set quota fails
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat OpenShift Data Foundation
Classification: Red Hat Storage
Component: Multi-Cloud Object Gateway
Version: 4.9
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Nimrod Becker
QA Contact: Raz Tamir
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-12-03 09:38 UTC by Filip Balák
Modified: 2023-08-09 16:49 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-12-06 13:34:33 UTC
Embargoed:


Attachments (Terms of Use)

Description Filip Balák 2021-12-03 09:38:02 UTC
Description of problem (please be detailed as possible and provide log
snippests):
Due to a change done between versions v4.9.0-158.ci and 4.9.0-202.ci upload to MCG S3 bucket with set quota is failing with error:

E           ocs_ci.ocs.exceptions.CommandFailed: Error during execution of command: oc -n openshift-storage rsh function-awscli-relay-pod-ad064b4ca8c14d sh -c "AWS_CA_BUNDLE=/cert/service-ca.crt AWS_ACCESS_KEY_ID=* AWS_SECRET_ACCESS_KEY=* AWS_DEFAULT_REGION=us-east-2 aws s3 --endpoint=https://s3.openshift-storage.svc:443 cp /tmp/testfile s3://s3-bucket-1f61188d79b34bb9b6fc64a83c1f0c/testfile1".
E           Error is Error in configuration:
E           * context was not found for specified context: default/api-j-103vuf1cs36-t4a-qe-rh-ocs-com:6443/kube:admin
E           * cluster has no server defined

Version of all relevant components (if applicable):
OCS 4.9.0-249.ci
OCP 4.9.0-0.nightly-2021-11-29-233413

Does this issue impact your ability to continue to work with the product
(please explain in detail what is the user impact)?
Automated test test_noobaa_bucket_quota (https://github.com/red-hat-storage/ocs-ci/blob/master/tests/manage/monitoring/prometheus/test_noobaa.py#L23) is failing

Can this issue reproducible?
Yes

If this is a regression, please provide more details to justify this:
In previous OCS versions the test passes.

Steps to Reproduce:
1. Create MCG S3 bucket
2. Update bucket quota with RPC call containing data:
(
        "bucket_api",
        "update_bucket",
        {"name": <bucket name>, "quota": {"unit": "GIGABYTE", "size": 2}},
)
3. Upload file to the bucket.
$ aws s3 --endpoint=https://s3.openshift-storage.svc:443 cp /tmp/testfile s3://<bucket name>/testfile1

Actual results:
Upload fails with error:
Error is Error in configuration:
* context was not found for specified context: default/api-j-103vuf1cs36-t4a-qe-rh-ocs-com:6443/kube:admin
* cluster has no server defined

Expected results:
Upload works as in previous instances.

Additional info:
Test logs: http://magna002.ceph.redhat.com/ocsci-jenkins/openshift-clusters/j-103vuf1cs36-t4a/j-103vuf1cs36-t4a_20211125T120728/logs/ocs-ci-logs-1637846152/by_outcome/failed/tests/manage/monitoring/prometheus/test_noobaa.py/test_noobaa_bucket_quota/logs


Note You need to log in before you can comment on or make changes to this bug.