-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can create container with wrong policy that doesn't work after that on put #1704
Comments
Container creation is detached from the network state completely. Placement policy is an unchanged operator over network map sets, so described scenario is completely valid. The creator can't predict can network satisfy his placement rules or not. Another example: one can create a container with "valid" policy which won't work after the epoch tick. |
I think we may try to construct a container in the |
Also it would be nice to have a separate command to print current nodes in container. |
Blocked by #1793. |
Closed via #1704. Container create can fail if there are no nodes to select from. |
Reopening for this task #1704 (comment) |
Validate policy before container creation Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
…s for container, grouped by replica (nspcc-dev#1704) Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
Steps
Expected result
We can't create container with wrong policy
Current behaviour
We can create container but can't put object to it after that.
root@az:~# neofs-cli --rpc-endpoint 172.26.160.159:8080 -w /etc/neofs/storage/wallet.json container create --policy "REP 1 IN LOC_MOW SELECT 1 FROM LOC_MOW FILTER 'UN-LOCODE' EQ 'RU MOW' AS LOC_MOW" Enter password > container ID: CTw3xRmXHYvvpTK5ECx8uZbaBDd7oJmJANLa8JRZDSch root@az:~# neofs-cli --rpc-endpoint 172.26.160.159:8080 -w /etc/neofs/storage/wallet.json object put --file /tmp/object.sample --cid CTw3xRmXHYvvpTK5ECx8uZbaBDd7oJmJANLa8JRZDSch Enter password > 13578240 / 135266304 [=============>----------------------------------------------------------------------------------------------------------------------------] 10.04% 1s rpc error: client failure: status: code = 1024 message = selector not found: REPLICA 'LOC_MOW'
root@az:~# neofs-cli --endpoint localhost:8091 -w /etc/neofs/storage/wallet.json control netmap-snapshot
Enter password >
Epoch: 146
Node 1: s2vW4EGK7MeLo25Xko84UM9br6rThhQ1SUsuuBvtn5C7 ONLINE [/dns4/node1.neofs/tcp/8080]
Continent: Europe
Country: Russia
CountryCode: RU
Deployed: YACZROKH
Location: Moskva
Price: 10
SubDiv: Moskva
SubDivCode: MOW
UN-LOCODE: RU MOW
Node 2: v8UZzuh1h3ztah8yy6yFWju2ANcggDP9PFs4rMfi3TjE ONLINE [/dns4/node2.neofs/tcp/8080]
Continent: Europe
Country: Russia
CountryCode: RU
Deployed: YACZROKH
Location: Saint Petersburg (ex Leningrad)
Price: 10
SubDiv: Sankt-Peterburg
SubDivCode: SPE
UN-LOCODE: RU LED
Node 3: 26nMT18EeporTymzapViVjRpttNsqcXAbNnhUXp69PLwW ONLINE [/dns4/node4.neofs/tcp/8080]
Continent: Europe
Country: Finland
CountryCode: FI
Deployed: YACZROKH
Location: Helsinki (Helsingfors)
Price: 10
SubDiv: Uusimaa
SubDivCode: 18
UN-LOCODE: FI HEL
The text was updated successfully, but these errors were encountered: