The default placement_policy section specified in the config does not work as expected #98

Closed
opened 2023-04-24 17:33:18 +00:00 by a.bogatyrev · 1 comment

The default placement_policy section specified in the config does not work as expected:

placement_policy:
   default: 'REP 2 CBF 2 SELECT 2 FROM *'
   region_mapping: /etc/frostfs/s3/placement-policy.json
  # Default policy of placing containers in FrostFS
  # If a user sends a request `CreateBucket` and doesn't define policy for placing of a container in FrostFS, the S3 Gateway
  # will put the container with default policy.

config example link

Attempt to create a bucket with location declared in placement-policy.json has been completed successfully:

$ aws --no-verify-ssl s3api create-bucket --bucket test-bucket-location-01 --endpoint http://192.168.203.21:8084 --create-bucket-configuration 'LocationConstraint=load-1-4'
$

Attempt to create a bucket with default location has been failed:

$ aws --no-verify-ssl s3api create-bucket --bucket test-bucket-location-02 --endpoint http://192.168.203.21:8084 --create-bucket-configuration 'LocationConstraint=default'

An error occurred (InvalidLocationConstraint) when calling the CreateBucket operation: The specified location (Region) constraint is not valid.
The default placement_policy section specified in the config does not work as expected: ``` placement_policy: default: 'REP 2 CBF 2 SELECT 2 FROM *' region_mapping: /etc/frostfs/s3/placement-policy.json ``` ``` # Default policy of placing containers in FrostFS # If a user sends a request `CreateBucket` and doesn't define policy for placing of a container in FrostFS, the S3 Gateway # will put the container with default policy. ``` [config example link](https://git.frostfs.info/TrueCloudLab/frostfs-s3-gw/src/branch/master/config/config.yaml#L123) Attempt to create a bucket with location declared in placement-policy.json has been completed successfully: ``` $ aws --no-verify-ssl s3api create-bucket --bucket test-bucket-location-01 --endpoint http://192.168.203.21:8084 --create-bucket-configuration 'LocationConstraint=load-1-4' $ ``` Attempt to create a bucket with default location has been failed: ``` $ aws --no-verify-ssl s3api create-bucket --bucket test-bucket-location-02 --endpoint http://192.168.203.21:8084 --create-bucket-configuration 'LocationConstraint=default' An error occurred (InvalidLocationConstraint) when calling the CreateBucket operation: The specified location (Region) constraint is not valid. ```
a.bogatyrev added the
P1
label 2023-04-24 17:33:18 +00:00
a.bogatyrev removed the
P1
label 2023-04-24 17:34:44 +00:00

This seems to be the correct behavior, since without specifying a location, the bucket is correctly created with the default storage police. The issue can be closed.

This seems to be the correct behavior, since without specifying a location, the bucket is correctly created with the `default` storage police. The issue can be closed.
Sign in to join this conversation.
No Milestone
No Assignees
1 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#98
There is no content yet.