adm: Make --namespace flag required #1026

Merged
fyrchik merged 1 commits from achuprov/frostfs-node:bugfix/namespace_require into master 2024-03-05 18:40:50 +00:00
Collaborator

Close #1023

Before:

./bin/frostfs-adm morph frostfsid create-namespace --alphabet-wallets dev/ir/ --rpc-endpoint http:/
/morph-chain.frostfs.devenv:30333 
Password for az wallet > 
create namespace error: could not perform test invocation: script failed (FAULT state) due to an error: at instruction 2839 (THROW): unhandled exception: "namespace already exists"

After:

./bin/frostfs-adm morph frostfsid create-namespace --alphabet-wallets dev/ir/ --rpc-endpoint http://morph-chain.frostfs.devenv:30333 
Error: required flag(s) "namespace" not set

Signed-off-by: Alexander Chuprov a.chuprov@yadro.com

Close #1023 Before: ``` ./bin/frostfs-adm morph frostfsid create-namespace --alphabet-wallets dev/ir/ --rpc-endpoint http:/ /morph-chain.frostfs.devenv:30333 Password for az wallet > create namespace error: could not perform test invocation: script failed (FAULT state) due to an error: at instruction 2839 (THROW): unhandled exception: "namespace already exists" ``` After: ``` ./bin/frostfs-adm morph frostfsid create-namespace --alphabet-wallets dev/ir/ --rpc-endpoint http://morph-chain.frostfs.devenv:30333 Error: required flag(s) "namespace" not set ``` Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
achuprov changed title from [#1023] adm: Make --namespace flag required to adm: Make --namespace flag required 2024-03-05 12:11:37 +00:00
achuprov force-pushed bugfix/namespace_require from fca213a7af to 577aad40b7 2024-03-05 12:14:00 +00:00 Compare
achuprov requested review from storage-core-developers 2024-03-05 12:30:41 +00:00
achuprov requested review from storage-core-committers 2024-03-05 12:30:42 +00:00
fyrchik approved these changes 2024-03-05 12:34:03 +00:00
@ -155,6 +155,7 @@ func initFrostfsIDCreateNamespaceCmd() {
frostfsidCreateNamespaceCmd.Flags().StringP(commonflags.EndpointFlag, commonflags.EndpointFlagShort, "", commonflags.EndpointFlagDesc)
frostfsidCreateNamespaceCmd.Flags().String(namespaceFlag, "", "Namespace name to create")
frostfsidCreateNamespaceCmd.Flags().String(commonflags.AlphabetWalletsFlag, "", commonflags.AlphabetWalletsFlagDesc)
_ = frostfsidCreateNamespaceCmd.MarkFlagRequired(namespaceFlag)

It should be required only for create-namespace, other commands can use root namespace by default (which is, quite conveniently, also an empty string).
cc @aarifullin

It should be required only for `create-namespace`, other commands can use `root` namespace by default (which is, quite conveniently, also an empty string). cc @aarifullin

Other operations should pass on dev-env without namespace, could you recheck this?

Other operations should pass on dev-env without namespace, could you recheck this?
achuprov force-pushed bugfix/namespace_require from 577aad40b7 to f45490cd7c 2024-03-05 13:02:57 +00:00 Compare
achuprov force-pushed bugfix/namespace_require from f45490cd7c to e5d18e7a85 2024-03-05 13:03:57 +00:00 Compare
fyrchik approved these changes 2024-03-05 13:12:49 +00:00
fyrchik added this to the v0.38.0 milestone 2024-03-05 13:12:57 +00:00
fyrchik added the
frostfs-adm
label 2024-03-05 13:13:05 +00:00
dstepanov-yadro approved these changes 2024-03-05 13:41:24 +00:00
acid-ant approved these changes 2024-03-05 15:09:04 +00:00
fyrchik merged commit e5d18e7a85 into master 2024-03-05 18:40:50 +00:00
Sign in to join this conversation.
No reviewers
TrueCloudLab/storage-core-developers
No Milestone
No Assignees
4 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-node#1026
There is no content yet.