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

[multinode] Show appropriate error in case if user trying add node with wrong data #4199

Open
profclems opened this issue Sep 21, 2021 · 25 comments · May be fixed by #4293
Open

[multinode] Show appropriate error in case if user trying add node with wrong data #4199

profclems opened this issue Sep 21, 2021 · 25 comments · May be fixed by #4293
Labels
Bug Something isn't working Good First Issue Good for newcomers hacktoberfest SNO Storage Node

Comments

@profclems
Copy link
Member

On adding action with wrong ID we have 404 (show "Wrong node ID. Please double check")

On adding with wrong key or IP -> 400 (show "Wrong IP address or API key. Please double check")
Let's show user errors for that action, because now we do not show anything and it might be confusing for user

see attachment

image

@profclems profclems added SNO Storage Node Bug Something isn't working labels Sep 21, 2021
@profclems profclems added this to Backlog 🗒 in Storage Node via automation Sep 21, 2021
@Pranav2612000
Copy link

Hey. I'll like to work on this issue. Is it still open?

@profclems
Copy link
Member Author

Hi @Pranav2612000, yes this is still open.

Let me explain this issue better; When a user is adding a node and there is an error or the details are incorrect, the errors are not displayed to the user but you can find them in the console.
So to fix this, we need to print the errors on the UI.

Multinode UI code can be found here https://github.com/storj/storj/tree/main/web/multinode

@Pranav2612000
Copy link

Thank you. I am working on setting up the repository and trying to reproduce the issue. Will let you know if I am stuck somewhere and need help.

@profclems
Copy link
Member Author

You can check #4202 (comment) on how to setup the multinode dashboard instead of running the whole Storj-sim since you're working on only the multinode dashboard.

Also, some test nodes you can add to your multinode dashboard here: #4202 (comment)

@Pranav2612000
Copy link

Thanks. I'll go through it.

@Pranav2612000
Copy link

Hey, I am facing an error with the installation. I am unable to install the go packages.
I am using 1.15 version of go

pranav@mrsassasin:~/go$ go version
go version go1.15.5 linux/amd64

Also, GOPATH is set and the corresponding value is added to the PATH variable

pranav@mrsassasin:~/go$ echo $GOPATH
/home/pranav/go
pranav@mrsassasin:~/go$ echo $PATH
/home/pranav/.local/bin:/home/pranav/bin:/home/pranav/.local/bin:/home/pranav/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/go/bin:/home/pranav/.npm-global/bin:/home/pranav/bin:/home/pranav/bin:/usr/local/go/bin:/home/pranav/.npm-global/bin:/home/pranav/go/bin

When I run

go install -v ./cmd/...

It just creates a pkg/ folder at the $GOPATH location. But nothing in the bin/ folder

Thank you for the help

@stefanbenten
Copy link
Contributor

@Pranav2612000 Go 1.15 is not supported anymore (always latest two minor versions, now being 1.16 and 1.17).

@Pranav2612000
Copy link

Oh. Okay. Let me try to update go to the latest version and try again.
Also should the documentation be updated to reflect this? Specifically this - https://github.com/storj/storj/blob/main/CONTRIBUTING.md#install-required-packages ?

@Pranav2612000
Copy link

Thank you @stefanbenten . Updating the go version fixed the issue.
Another weird issue I faced while running go install

bits/libc-header-start.h: No such file or directory

Due to this, the multinode executable wasn't created. I fixed this by installing the packages -

sudo apt-get install gcc-multilib g++-multilib

@Pranav2612000
Copy link

Thank you everyone. Was able to have the setup ready. Starting with the task. I just had one question.

The error responses received when the API key, the node ID or the IP Address are incorrect, are cryptic enough and cannot be shown directly to the UI. So for this task, we'll just check the response status, and if its 400 we'll show a browser alert ( or do we have a better alert component ?) showing the text "Wrong node ID. Please double check". And if the response status is 404 we'll show the alert with the text "Wrong IP address or API key. Please double check".

Right?

I think is already answered in the first comment, but just wanted to get it clarified once. Pardon me.

@Pranav2612000
Copy link

Hey! Any help with this?

@profclems
Copy link
Member Author

@Pranav2612000 sorry for getting back to you late on this.

The error responses received when the API key, the node ID or the IP Address are incorrect, are cryptic enough and cannot be shown directly to the UI. So for this task, we'll just check the response status, and if its 400 we'll show a browser alert ( or do we have a better alert component ?) showing the text "Wrong node ID. Please double check". And if the response status is 404 we'll show the alert with the text "Wrong IP address or API key. Please double check".

Right?

You're right but instead of using the browser alert, a toast notification component would be a better option.

@Pranav2612000
Copy link

Sure. Got it. Thanks.

@profclems
Copy link
Member Author

Hi @Pranav2612000, would you still have time to work on this?
Do you need help or clarification on anything? Do not hesitate to ping me on anything. Thank you

@Pranav2612000
Copy link

Yeah. Sorry. I'll work on it.

Do we already have a toast notification component or will I need to create a new one?

@profclems
Copy link
Member Author

@Pranav2612000 we don't have a toast notification component for the multinode dashboard. You can create one.

It would help resolve other notification issues.

@Pranav2612000
Copy link

What's your opinion on using a library for the notifications( E.g vue-toasted, vue-notification )? Or do you want it to be built from scratch?

@profclems
Copy link
Member Author

Hi @Pranav2612000, using a library should be fine as long as it is actively maintained. Thanks!

@Pranav2612000
Copy link

image

@profclems What do you think of this notification style?

@profclems
Copy link
Member Author

@Pranav2612000 this looks good! Kindly open a PR whenever you're ready

@Pranav2612000 Pranav2612000 linked a pull request Nov 24, 2021 that will close this issue
10 tasks
@Pranav2612000
Copy link

I've opened one.

@RishmithaRaheem
Copy link

@Pranav2612000 Hi, I am new to open source contribution. Can you help me set up the multi node dashboard ?

@Pranav2612000
Copy link

Pranav2612000 commented Mar 2, 2022 via email

@RishmithaRaheem
Copy link

Is this issue still open ?

@storjrobot
Copy link

This issue has been mentioned on Storj Community Forum (official). There might be relevant details there:

https://forum.storj.io/t/multinode-addition-doesnt-work/26983/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Good First Issue Good for newcomers hacktoberfest SNO Storage Node
Projects
Status: No status
Storage Node
Backlog 🗒
Development

Successfully merging a pull request may close this issue.

5 participants