Skip to content
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

tests: add tests for network config change via neofs-adm #628

Merged
merged 1 commit into from
Sep 7, 2023

Conversation

evgeniiz321
Copy link
Contributor

@evgeniiz321 evgeniiz321 commented Sep 6, 2023

The following issues were found:

  1. ContainerAliasFee is not shown in netmap netinfo:
COMMAND: neofs-cli --config ./TemporaryDir/empty-password.yml netmap netinfo --rpc-endpoint 's01.neofs.devenv:8080' --wallet '../neofs-dev-env/services/storage/wallet01.json'
RETCODE: 0

STDOUT:
Epoch: 5
Network magic: [net 0x3c2d] 15405
Time per block: 1s
NeoFS network configuration (system)
  Audit fee: 10000
  Storage price: 100000000
  Container fee: 1000
  EigenTrust alpha: 0.1
  Number of EigenTrust iterations: 4
  Epoch duration: 240
  Inner Ring candidate fee: 10000000000
  Maximum object size: 524288
  Withdrawal fee: 100000000
  Homomorphic hashing disabled: false
  Maintenance mode allowed: false
NeoFS network configuration (other)
  SystemDNS: 636f6e7461696e6572

STDERR:

Start / End / Elapsed	 01:58:25.658936 / 01:58:25.679838 / 0:00:00.020902

I'm not sure if this is by design or not, but still.

  1. There is the force param, but I'm not sure what is the use case for it. But nevertheless, if I set some unknown_key=120 with this force flag, I get some strange value afterwards:
COMMAND: neofs-cli --config ./TemporaryDir/empty-password.yml netmap netinfo --rpc-endpoint 's01.neofs.devenv:8080' --wallet '../neofs-dev-env/services/storage/wallet01.json'
RETCODE: 0

STDOUT:
Epoch: 5
Network magic: [net 0x3c2d] 15405
Time per block: 1s
NeoFS network configuration (system)
  Audit fee: 10000
  Storage price: 100000000
  Container fee: 1000
  EigenTrust alpha: 0.1
  Number of EigenTrust iterations: 4
  Epoch duration: 240
  Inner Ring candidate fee: 10000000000
  Maximum object size: 524288
  Withdrawal fee: 100000000
  Homomorphic hashing disabled: false
  Maintenance mode allowed: false
NeoFS network configuration (other)
  SystemDNS: 636f6e7461696e6572
  unknown_key: 313230

unknown_key: 313230, although I set it to 120. Not sure, how the code should parse unknown values. Perhaps it is better to interpret everything as a string.

  1. If I set some known key to invalid value, I got error like this:
COMMAND: neofs-adm --config /home/runner/work/neofs-node/neofs-node/neofs-testcases/venv.local-pytest/../../neofs-dev-env/neofs-adm.yml morph set-config --rpc-endpoint 'http://morph-chain.neofs.devenv:30333' --alphabet-wallets '../neofs-dev-env/services/ir' HomomorphicHashingDisabled=0.2
RETCODE: 1

STDOUT:
Error: could not parse HomomorphicHashingDisabled's value '0.2' as bool: strconv.ParseBool: parsing "0.2": invalid syntax

The error message seems to me a bit awkward.

Allure - allure-0.tar.gz

Signed-off-by: Evgeniy Zayats <zayatsevgeniy@nspcc.io>
@roman-khimov
Copy link
Member

As for 2: I'd say it's not a bug, you have to use force for it, so likely you know what you're doing and parameter is passed as is in this case (and displayed in hex, who knows what's inside?) Maybe some documentation can be improved for adm to explain it, file an issue for node.

3: The main thing is that it works as intended (value reject), but the message can be improved, file an issue as well.

@vvarg229 vvarg229 merged commit a6f8426 into nspcc-dev:master Sep 7, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants