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

rename node binary to avoid collisions in path #3051

Open
huttarichard opened this issue Apr 28, 2021 · 6 comments
Open

rename node binary to avoid collisions in path #3051

huttarichard opened this issue Apr 28, 2021 · 6 comments
Assignees
Labels

Comments

@huttarichard
Copy link

huttarichard commented Apr 28, 2021

at this point nodejs is very much popular and most people have nodejs in their path as node.
After go install node will be in go/bin which is usually in PATH as well.

My suggestion is to rename cmd/node to something like cmd/erdnode.
At this point it is still doable. Moreover it is best practice to have all executables with prefix.

Later on it will become pain in the ass for newcomers.

Two arguments here:

  1. to avoid collisions as mentioned
  2. shells (such as bash, fish, zsh) generally allows autocompletion, if binary is found in path it is possible possible to autocomple. This gives you ability to type erd hit tab and see all binaries related to elrond (assumption here is erd prefix for all executables in cmd/)
@huttarichard huttarichard added the type:feature New feature or request label Apr 28, 2021
@frankf1957
Copy link

@huttarichard I have never had this collision you speak of. I just checked my testnet system, and there is no node binary found on the PATH. I tried both of the following commands and there is no output which shows that node is not on the PATH:

$ command -v node
$ which node

As a best practice, Linux sysadmins always create dedicated local accounts for the running of application services. For the Elrond node, there should be a dedicated account. Developers should have their own accounts if they plan to develop on the same system. Additionally, if applications are being run (regardless of whether they are using nodejs or not), then they too should each have their own dedicated account.

By following this operational best practice, each user account maintains its own PATH setting so there is no risk of binary name collision such as you describe.

@huttarichard
Copy link
Author

so fresh installation of linux 20.10 ubuntu

$ apt-get install nodejs
$ which node
/usr/bin/node

If Im not mistaken doesn't really matter which account you are using.
Nobody will on osx, nor linux make dedicated accounts to contribute this project.

And also if which node returns nothing means you did not install elrond node binary in go path or you dont have go bin path in your $PATH.

@iulianpascalau
Copy link
Contributor

Right, we might rename the node binary to something else like elrond-node as to avoid confusions. We will have to change all our scripts for this change and all of us will need to reinstall our nodes on devnet/testnet/mainnet. Will investigate the feasibility of this change.

@iulianpascalau
Copy link
Contributor

Will rename to something else but a little bit later as it is a pending operation that will affect this.

@iulianpascalau
Copy link
Contributor

Still not accomplished due to the impact on existing setups. Will try to figure out a solution, thus.

@ghost
Copy link

ghost commented Mar 10, 2023

My suggestion is to rename cmd/node to something like cmd/erdnode.

An absolute must-have

We will have to change all our scripts for this change and all of us will need to reinstall our nodes on devnet/testnet/mainnet. Will investigate the feasibility of this change.

You must, this is clearly a high-severity high-priority naming bug issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants
@huttarichard @iulianpascalau @frankf1957 and others