It is not possible to create a container with a three-part domain #56

Closed
opened 2023-12-01 09:08:58 +00:00 by r.loginov · 1 comment
Member

Expected Behavior

It is suggested that it is possible to create a container with a name like <some_name>.<some_name>.<some_tld_name>, example: сats.kapusta.ns.

An example of a test that should pass: https://git.frostfs.info/r.loginov/frostfs-contract/src/branch/example-test/tests/nns_test.go#L316

Current Behavior

Now, when trying to create a container with a domain like <some_name>.<some_name>.<some_tld_name>, the error “invalid domain name format” occurs.

Steps to Reproduce

$ frostfs-cli container create --basic-acl public-read-write --await --rpc-endpoint s01.frostfs.devenv:8080 -w <path_to_wallet> --nns-name cats --nns-zone kapusta.ns
## Expected Behavior It is suggested that it is possible to create a container with a name like **<some_name>.<some_name>.<some_tld_name>**, example: **сats.kapusta.ns.** An example of a test that should pass: https://git.frostfs.info/r.loginov/frostfs-contract/src/branch/example-test/tests/nns_test.go#L316 ## Current Behavior Now, when trying to create a container with a domain like **<some_name>.<some_name>.<some_tld_name>**, the error “invalid domain name format” occurs. ## Steps to Reproduce ``` $ frostfs-cli container create --basic-acl public-read-write --await --rpc-endpoint s01.frostfs.devenv:8080 -w <path_to_wallet> --nns-name cats --nns-zone kapusta.ns ```
r.loginov added the
bug
label 2023-12-01 09:08:58 +00:00
fyrchik was assigned by r.loginov 2023-12-01 09:08:58 +00:00
Owner

It seems the problem is here

fragments := splitAndCheck(name, false)

For some reason isAvailable only works for domains with <=2 fragments

if l > 2 && !allowMultipleFragments {

It seems the problem is here https://git.frostfs.info/TrueCloudLab/frostfs-contract/src/commit/a1b61d3949581f4d65b0d32a33d98ba9c193dc2a/nns/nns_contract.go#L222 For some reason isAvailable only works for domains with <=2 fragments https://git.frostfs.info/TrueCloudLab/frostfs-contract/src/commit/a1b61d3949581f4d65b0d32a33d98ba9c193dc2a/nns/nns_contract.go#L726
elebedeva was assigned by fyrchik 2023-12-05 14:02:23 +00:00
fyrchik removed their assignment 2023-12-05 14:02:32 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 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-contract#56
No description provided.