Create-bucket operation doesn't logging #162

Closed
opened 2023-07-06 07:16:38 +00:00 by anikeev-yadro · 3 comments
Member

Expected Behavior

S3-gw should logging all operations in logging:debug.

Current Behavior

S3-gw doesn't logging create-bucket operations with any results.

Steps to Reproduce (for bugs)

1.Trun on debug logs:

root@aanikeev-node1:~# cat /etc/frostfs/s3/conf.d/90_logger.yml
logger:
  level: debug

2.Try to create bucket and check that bucket exist. Logs doesn't contains any logs about it.

anikeev@NB-1670:~/.aws$ aws --no-verify-ssl s3api create-bucket --bucket sync-rep-bucket50 --endpoint-url https://172.26.161.37 --object-lock-enabled-for-bucket --acl public-read-write
urllib3/connectionpool.py:1045: InsecureRequestWarning: Unverified HTTPS request is being made to host '172.26.161.37'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
anikeev@NB-1670:~/.aws$
anikeev@NB-1670:~/.aws$ aws --no-verify-ssl s3api list-buckets --endpoint-url https://172.26.161.37
urllib3/connectionpool.py:1045: InsecureRequestWarning: Unverified HTTPS request is being made to host '172.26.161.37'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
{
    "Buckets": [
        {
            "Name": "sync-rep-bucket3",
            "CreationDate": "2023-07-05T12:54:37+00:00"
        },
        {
            "Name": "sync-rep-bucket50",
            "CreationDate": "2023-07-06T06:54:24+00:00"
        },

4.Try to create bucket with the same name. We expect error in logs, but nothing.

anikeev@NB-1670:~/.aws$ aws --no-verify-ssl s3api create-bucket --bucket sync-rep-bucket50 --endpoint-url https://172.26.161.37 --object-lock-enabled-for-bucket --acl public-read-write
urllib3/connectionpool.py:1045: InsecureRequestWarning: Unverified HTTPS request is being made to host '172.26.161.37'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings

An error occurred (BucketAlreadyOwnedByYou) when calling the CreateBucket operation (reached max retries: 0): Your previous request to create the named bucket succeeded and you already own it.

5.Try to put object

anikeev@NB-1670:~/.aws$ aws --no-verify-ssl s3api put-object --bucket sync-rep-bucket50 --key new-object --body credentials --endpoint-url https://172.26.161.37
urllib3/connectionpool.py:1045: InsecureRequestWarning: Unverified HTTPS request is being made to host '172.26.161.37'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
{
    "ETag": "3e486de13470bedda53a644a9de92e9a4d7fe020833a8a733a6fab7791cbeafb"
}

6.Log contains masseages about it

Jul 06 06:59:50 aanikeev-node1 frostfs-s3-gw[382]: 2023-07-06T06:59:50.368Z        info        api/router.go:158        request start        {"request_id": "a160e97e-8846-49db-998d-db88a66ac0f4", "method": "PutObject", "bucket": "sync-rep-bucket50", "object": "new-object", "host": "172.26.161.37", "remote_host": "127.0.0.1"}
Jul 06 06:59:50 aanikeev-node1 frostfs-s3-gw[382]: 2023-07-06T06:59:50.385Z        info        layer/layer.go:734        resolve bucket        {"request_id": "a160e97e-8846-49db-998d-db88a66ac0f4", "method": "PutObject", "bucket": "sync-rep-bucket50", "object": "new-object", "cid": "3HitYYHhz2eLFvcfbhe8q1MmNj8WRfvFGJ5XfcDewAub"}
Jul 06 06:59:50 aanikeev-node1 frostfs-s3-gw[382]: 2023-07-06T06:59:50.417Z        debug        layer/object.go:243        put object        {"request_id": "a160e97e-8846-49db-998d-db88a66ac0f4", "method": "PutObject", "bucket": "sync-rep-bucket50", "object": "new-object", "cid": "3HitYYHhz2eLFvcfbhe8q1MmNj8WRfvFGJ5XfcDewAub", "oid": "5uBcgYZ2tLJvZKKixuhnkuqTjC7tmLdYaCFJw6nHSVcq"}
Jul 06 06:59:50 aanikeev-node1 frostfs-s3-gw[382]: 2023-07-06T06:59:50.435Z        info        api/router.go:237        request end        {"request_id": "a160e97e-8846-49db-998d-db88a66ac0f4", "method": "PutObject", "bucket": "sync-rep-bucket50", "object": "new-object", "status": 200, "description": "OK"}

Regression

yes

Version

FrostFS S3 Gateway
Version: v0.27.0-rc.1-70-g499f4c64
GoVersion: go1.19.7

Your Environment

Virtual
4 nodes

## Expected Behavior S3-gw should logging all operations in `logging:debug`. ## Current Behavior S3-gw doesn't logging `create-bucket` operations with any results. ## Steps to Reproduce (for bugs) 1.Trun on debug logs: ``` root@aanikeev-node1:~# cat /etc/frostfs/s3/conf.d/90_logger.yml logger: level: debug ``` 2.Try to create bucket and check that bucket exist. Logs doesn't contains any logs about it. ``` anikeev@NB-1670:~/.aws$ aws --no-verify-ssl s3api create-bucket --bucket sync-rep-bucket50 --endpoint-url https://172.26.161.37 --object-lock-enabled-for-bucket --acl public-read-write urllib3/connectionpool.py:1045: InsecureRequestWarning: Unverified HTTPS request is being made to host '172.26.161.37'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings anikeev@NB-1670:~/.aws$ anikeev@NB-1670:~/.aws$ aws --no-verify-ssl s3api list-buckets --endpoint-url https://172.26.161.37 urllib3/connectionpool.py:1045: InsecureRequestWarning: Unverified HTTPS request is being made to host '172.26.161.37'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings { "Buckets": [ { "Name": "sync-rep-bucket3", "CreationDate": "2023-07-05T12:54:37+00:00" }, { "Name": "sync-rep-bucket50", "CreationDate": "2023-07-06T06:54:24+00:00" }, ``` 4.Try to create bucket with the same name. We expect error in logs, but nothing. ``` anikeev@NB-1670:~/.aws$ aws --no-verify-ssl s3api create-bucket --bucket sync-rep-bucket50 --endpoint-url https://172.26.161.37 --object-lock-enabled-for-bucket --acl public-read-write urllib3/connectionpool.py:1045: InsecureRequestWarning: Unverified HTTPS request is being made to host '172.26.161.37'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings An error occurred (BucketAlreadyOwnedByYou) when calling the CreateBucket operation (reached max retries: 0): Your previous request to create the named bucket succeeded and you already own it. ``` 5.Try to put object ``` anikeev@NB-1670:~/.aws$ aws --no-verify-ssl s3api put-object --bucket sync-rep-bucket50 --key new-object --body credentials --endpoint-url https://172.26.161.37 urllib3/connectionpool.py:1045: InsecureRequestWarning: Unverified HTTPS request is being made to host '172.26.161.37'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings { "ETag": "3e486de13470bedda53a644a9de92e9a4d7fe020833a8a733a6fab7791cbeafb" } ``` 6.Log contains masseages about it ``` Jul 06 06:59:50 aanikeev-node1 frostfs-s3-gw[382]: 2023-07-06T06:59:50.368Z info api/router.go:158 request start {"request_id": "a160e97e-8846-49db-998d-db88a66ac0f4", "method": "PutObject", "bucket": "sync-rep-bucket50", "object": "new-object", "host": "172.26.161.37", "remote_host": "127.0.0.1"} Jul 06 06:59:50 aanikeev-node1 frostfs-s3-gw[382]: 2023-07-06T06:59:50.385Z info layer/layer.go:734 resolve bucket {"request_id": "a160e97e-8846-49db-998d-db88a66ac0f4", "method": "PutObject", "bucket": "sync-rep-bucket50", "object": "new-object", "cid": "3HitYYHhz2eLFvcfbhe8q1MmNj8WRfvFGJ5XfcDewAub"} Jul 06 06:59:50 aanikeev-node1 frostfs-s3-gw[382]: 2023-07-06T06:59:50.417Z debug layer/object.go:243 put object {"request_id": "a160e97e-8846-49db-998d-db88a66ac0f4", "method": "PutObject", "bucket": "sync-rep-bucket50", "object": "new-object", "cid": "3HitYYHhz2eLFvcfbhe8q1MmNj8WRfvFGJ5XfcDewAub", "oid": "5uBcgYZ2tLJvZKKixuhnkuqTjC7tmLdYaCFJw6nHSVcq"} Jul 06 06:59:50 aanikeev-node1 frostfs-s3-gw[382]: 2023-07-06T06:59:50.435Z info api/router.go:237 request end {"request_id": "a160e97e-8846-49db-998d-db88a66ac0f4", "method": "PutObject", "bucket": "sync-rep-bucket50", "object": "new-object", "status": 200, "description": "OK"} ``` ## Regression yes ## Version ``` FrostFS S3 Gateway Version: v0.27.0-rc.1-70-g499f4c64 GoVersion: go1.19.7 ``` ## Your Environment Virtual 4 nodes
anikeev-yadro added the
bug
label 2023-07-06 07:16:38 +00:00
Owner

@anikeev-yadro Isn't it the same nginx issue like in #161?

@anikeev-yadro Isn't it the same nginx issue like in https://git.frostfs.info/TrueCloudLab/frostfs-s3-gw/issues/161?
Member

Yes, it is.

Yes, it is.
Author
Member

Yes, suggest to close this too.

Yes, suggest to close this too.
Sign in to join this conversation.
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-s3-gw#162
No description provided.