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

Storage node can register in the network with any status #1796

Closed
cthulhu-rider opened this issue Sep 19, 2022 · 0 comments · Fixed by #1798
Closed

Storage node can register in the network with any status #1796

cthulhu-rider opened this issue Sep 19, 2022 · 0 comments · Fixed by #1798
Assignees
Labels
bug Something isn't working neofs-ir Inner Ring node application issues U4 Nothing urgent

Comments

@cthulhu-rider
Copy link
Contributor

cthulhu-rider commented Sep 19, 2022

Storage nodes register in the NeoFS network via sending the bootstrap requests. Alphabet (subset of Inner Ring) validates the information provided by each storage node and decides access to the network. Network map consists of online storage nodes only.

Expected Behavior

  • Inner Ring allows storage nodes to join the network with ONLINE state
  • Inner Ring disallows storage nodes to join the network any state other than ONLINE

Current Behavior

Inner Ring accepts storage nodes with any state.

Possible Solution

Check the state during validation.

Steps to Reproduce (for bugs)

  1. cut/comment the instruction
    ni.SetOnline()
  2. build dirty image of storage node app make bin/neofs-node && make image-dirty-storage
  3. run NeoFS Developer Environment with the built version using make up/basic
  4. exec $ neofs-cli --endpoint s01.neofs.devenv:8081 --wallet services/storage/wallet01.json control netmap-snapshot
  5. see offline nodes in the network map
Epoch: 2
Node 1: eQEUoc2DRn4oNnNUxs8iviWJYrYS4mTBsgQqjJ44aFyJ OFFLINE [/dns4/s01.neofs.devenv/tcp/8080]
	Continent: Europe
	Country: Russia
	CountryCode: RU
	Location: Moskva
	Price: 22
	SubDiv: Moskva
	SubDivCode: MOW
	UN-LOCODE: RU MOW
	User-Agent: NeoFS\/0.26
Node 2: o5H2uGUa7cwBvb1GSx62SUL8Mkpp4PbgB1oUstPgnfo8 OFFLINE [/dns4/s03.neofs.devenv/tcp/8080]
	Continent: Europe
	Country: Sweden
	CountryCode: SE
	Location: Stockholm
	Price: 11
	SubDiv: Stockholms l�n
	SubDivCode: AB
	UN-LOCODE: SE STO
	User-Agent: NeoFS\/0.26
Node 3: 249VqsrQDNv8X7bYHTUH86ZqRJKogJnAeovMmCqMqM3u6 OFFLINE [/dns4/s04.neofs.devenv/tcp/8082/tls /dns4/s04.neofs.devenv/tcp/8080]
	Continent: Europe
	Country: Finland
	CountryCode: FI
	Location: Helsinki (Helsingfors)
	Price: 44
	SubDiv: Uusimaa
	SubDivCode: 18
	UN-LOCODE: FI HEL
	User-Agent: NeoFS\/0.26
Node 4: 2Bsv2nitVMDi9S77fuYNqDeYtRHcxAmp1J6Q7Hx79Wwem OFFLINE [/dns4/s02.neofs.devenv/tcp/8080]
	Continent: Europe
	Country: Russia
	CountryCode: RU
	Location: Saint Petersburg (ex Leningrad)
	Price: 33
	SubDiv: Sankt-Peterburg
	SubDivCode: SPE
	UN-LOCODE: RU LED
	User-Agent: NeoFS\/0.26

Regression

No. Bug is very old.

Your Environment

  • NeoFS Storage node: neofs-node@v0.32.0
  • NeoFS CLI: neofs-cli@v0.32.0
  • NeoFS Developer Environment: neofs-dev-env@c4ceb1c5854816cebcf23580853fda294c2d2c60
@cthulhu-rider cthulhu-rider added bug Something isn't working triage neofs-ir Inner Ring node application issues labels Sep 19, 2022
@cthulhu-rider cthulhu-rider self-assigned this Sep 19, 2022
@alexchetaev alexchetaev added the U3 Regular label Sep 19, 2022
cthulhu-rider pushed a commit to cthulhu-rider/neofs-node that referenced this issue Sep 19, 2022
… only

In previous implementation Inner Ring allowed storage nodes with any
state to register in the network. According to the current design, only
nodes with ONLINE state are allowed to enter the network map.

Create new `state` sub-package of `nodevalidation` package of Inner Ring
application. Define `state.NetMapCandidateValidator` type and provide
`NodeValidator` interface required by the Inner Ring's processor of
`Netmap` contract's notification events. Embed new validator into the
one used by the Inner Ring application.

From now all `AddPeer` notifications with node state other than `ONLINE`
will be denied.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
cthulhu-rider pushed a commit to cthulhu-rider/neofs-node that referenced this issue Sep 28, 2022
… only

In previous implementation Inner Ring allowed storage nodes with any
state to register in the network. According to the current design, only
nodes with ONLINE state are allowed to enter the network map.

Create new `state` sub-package of `nodevalidation` package of Inner Ring
application. Define `state.NetMapCandidateValidator` type and provide
`NodeValidator` interface required by the Inner Ring's processor of
`Netmap` contract's notification events. Embed new validator into the
one used by the Inner Ring application.

From now all `AddPeer` notifications with node state other than `ONLINE`
will be denied.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
@alexchetaev alexchetaev added U4 Nothing urgent 2022Q3 and removed U3 Regular labels Sep 30, 2022
cthulhu-rider pushed a commit to cthulhu-rider/neofs-node that referenced this issue Sep 30, 2022
… only

In previous implementation Inner Ring allowed storage nodes with any
state to register in the network. According to the current design, only
nodes with ONLINE state are allowed to enter the network map.

Create new `state` sub-package of `nodevalidation` package of Inner Ring
application. Define `state.NetMapCandidateValidator` type and provide
`NodeValidator` interface required by the Inner Ring's processor of
`Netmap` contract's notification events. Embed new validator into the
one used by the Inner Ring application.

From now all `AddPeer` notifications with node state other than `ONLINE`
will be denied.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
cthulhu-rider pushed a commit to cthulhu-rider/neofs-node that referenced this issue Oct 4, 2022
… only

In previous implementation Inner Ring allowed storage nodes with any
state to register in the network. According to the current design, only
nodes with ONLINE state are allowed to enter the network map.

Create new `state` sub-package of `nodevalidation` package of Inner Ring
application. Define `state.NetMapCandidateValidator` type and provide
`NodeValidator` interface required by the Inner Ring's processor of
`Netmap` contract's notification events. Embed new validator into the
one used by the Inner Ring application.

From now all `AddPeer` notifications with node state other than `ONLINE`
will be denied.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
aprasolova pushed a commit to aprasolova/neofs-node that referenced this issue Oct 19, 2022
… only

In previous implementation Inner Ring allowed storage nodes with any
state to register in the network. According to the current design, only
nodes with ONLINE state are allowed to enter the network map.

Create new `state` sub-package of `nodevalidation` package of Inner Ring
application. Define `state.NetMapCandidateValidator` type and provide
`NodeValidator` interface required by the Inner Ring's processor of
`Netmap` contract's notification events. Embed new validator into the
one used by the Inner Ring application.

From now all `AddPeer` notifications with node state other than `ONLINE`
will be denied.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working neofs-ir Inner Ring node application issues U4 Nothing urgent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants