-
Notifications
You must be signed in to change notification settings - Fork 839
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
Added command line option --static-nodes-file (#1414) #1644
Conversation
Thanks for the contribution! We need to add a test in BesuCommandTest that makes sure |
Sure, I'll get on it. |
Also, before I forget, this is going to need a line in the changelog as well. |
I added three test methods to class BesuCommandTest. One tests a valid file is used, a second test when an ill-formed JSON file is specified, and a third tests when the option is used but no parameter is specified. I attempted to test when an file that does not exist is given as a parameter: But no message was returned at all during the test build. This is contrary to running besu manually, you'll get the message: | main | INFO | StaticNodesParser | StaticNodes file /home/tcooke/code/gitprojs/besu/build/install/besu/staticdir/some-file-that-does-not-exist does not exist, no static connections will be created. Any suggestions on how I should proceed? |
As far as adding a line to the changelog, what should be added: the tests and the added cli option, or just the tests? |
I've decided that the best test for when a file does not exist is to make sure no error message was returned. The commantOutput will be ignored for now. As for the changelog, I'll simply add the line from the commit message: |
Now able to inject static nodes by explicitly specifying a static nodes JSON file (.json) on the command line Signed-off-by: Terrence Cooke <terrence.s.cooke@gmail.com>
Three methods added to BesuCommandTest to test newly added --static-nodes-file cli option Signed-off-by: Terrence Cooke <terrence.s.cooke@gmail.com>
Signed-off-by: Terrence Cooke <terrence.s.cooke@gmail.com>
* hyperledger#1644 Signed-off-by: Terrence Cooke <terrence.s.cooke@gmail.com>
96e3bef
to
29ab4e6
Compare
Added tests to BesuCommand and a line to CHANGELOG.md |
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
Running besu as a background service fails with "unable to parse static nodes file". Using a config.toml to start. Loads fine from TCL and does not require a static nodes jason. I don't have a jason to parse. Why is besu failing? brad@tiny:~/besu-21.1.3$ sudo journalctl -fu besu.service |
Does the file |
I don't have one. I can start besu using a config.toml from command line with no problem. but when I start besu as a background service, using the same config.toml file, it fails wanting a static file. what am I doing wrong? |
Can you provide the |
here is config.toml |
running service with a new user and group named: besu created user / group with: sudo chown -R besu:besu /dev/sda1 |
and the besu.service file as well please :) |
sure! |
It's odd because clearly your service is using |
I didn't copy all of ExecStart: ugh... right. After i could not get the background to work on mainnet I reset the config to goerli and restarted. So the config and service are running goerli while the initial error was previous settings to mainnet |
restarted service with current settings: brad@tiny:~/besu-21.1.3$ sudo journalctl -fu besu.service |
…erledger#1644) Now able to inject static nodes by explicitly specifying a static nodes JSON file (.json) on the command line Co-authored-by: Ratan (Rai) Sur <ratan.r.sur@gmail.com> Signed-off-by: Terrence Cooke <terrence.s.cooke@gmail.com>
Now able to inject static nodes by explicitly specifying
a static nodes JSON file (.json) on the command line
Signed-off-by: Terrence Cooke terrence.s.cooke@gmail.com
PR description
Fixed Issue(s)
Changelog