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

The 1.10.0 release daemon appears to ignore flags #387

Open
jakubgs opened this issue Aug 2, 2023 · 9 comments
Open

The 1.10.0 release daemon appears to ignore flags #387

jakubgs opened this issue Aug 2, 2023 · 9 comments

Comments

@jakubgs
Copy link

jakubgs commented Aug 2, 2023

We have attempted to deploy the 1.10.0 version but when we try to rune the smartnode we get errors like:

could not create validators directory: mkdir /.rocketpool: permission denied

and

The node password has not been set, retrying in 15s...

Which clearly show the daemon is ignoring flags we are providing it with:

 > sudo systemctl cat rocketpool-smart-node | grep -A4 Exec
ExecStart=/usr/local/bin/rocketpool-daemon \
  --validatorKeychain=/data/rocketpool/smart-node/validators \
  --password=/data/rocketpool/smart-node/password \
  --wallet=/data/rocketpool/smart-node/wallet \
  --settings=/data/rocketpool/user-settings.yml \
@jakubgs
Copy link
Author

jakubgs commented Aug 2, 2023

I have tracked down the issue to the isNative: "false" setting, which when switched back to isNative: "true" works.

No idea why this setting causes the daemon to ignore it's CLI flags, but there should be some kind of warning message like:

WARNING: Native mode disabled, CLI flags ignored!

@jakubgs
Copy link
Author

jakubgs commented Aug 3, 2023

According to Thorsten Behrens from Telegram:

isNative: true is what's used for native mode. Which means RocketPool is assumed to be running in something other than it's standard, "I control my own compose stack" method
Either systemd, or docker swarm mode (which is what we do), or k8s, would all be isNative: true.
With isNative: false, RocketPool assumes itself to be running on a host in docker compose, and have the ability to manipulate its own compose stack.

has anyone else reported issues with the rocketpool daemon ignoring CLI flags?

You're probably alone in running it this way tbh 😅.
There's an rpDir and dataPath in the settings.yml, and everything else is assumed to be under there.
The flags exist, so it ignoring those sounds like a regression bug.

@jakubgs
Copy link
Author

jakubgs commented Aug 3, 2023

Honestly, this flag needs some docs:

image

@jclapis
Copy link
Member

jclapis commented Aug 7, 2023

Hi @jakubgs,

So Thorsten is correct: what you are doing (running the daemon binary on your native system, i.e., not within a Docker container) is called Native Mode and is only supported in Native Mode installations. It will not work if you don't have Native Mode set up and you try to run the Daemon outside of Docker like this.

Part of the Native Mode installation guide linked above is the service configuration process, which is required in order to set up the Daemon's parameters. If you're running headlessly and want to do it via a script / without the interactive TUI, you can follow the command line flag configuration steps. Note that you only have to do this upon installing a new version of the Smartnode, but you will need to do it one time whenever you upgrade the Smartnode to ensure the configuration is migrated to the latest format and any new parameters get populated.

Regardless, the --validatorKeychain, --password, and --wallet flags for the Daemon have been nonfunctional since Smartnode v1.3.0. All of this information is now pulled from the settings config file, which (as you've discovered) is also where the Native Mode flag is stored. I should have removed these old command line flags from the daemon long ago, and will do so in the upcoming v1.10.1 release.

@jakubgs
Copy link
Author

jakubgs commented Aug 7, 2023

Okay, thanks for the explanation. I still think there should be some kind of warning in the logs.

But what are then the correct locations for those three settings(validatorKeychain, password, and wallet)?
Is it root? Or is it smartnode?

@jclapis
Copy link
Member

jclapis commented Aug 7, 2023

Based on the initial post, if you are planning to configure the system headlessly / non-interactively, you would want to run this (plus any supplemental configuration you may need):

rocketpool service config --smartnode-dataPath="/data/rocketpool/smart-node"

This will intrinsically set the wallet path to /data/rocketpool/smart-node/wallet, the password path to /data/rocketpool/smart-node/password, and the validator keychain dir to /data/rocketpool/smart-node/validators.

@jakubgs
Copy link
Author

jakubgs commented Aug 7, 2023

I see. I already have that configured. Thanks for confirming I don't need any other settings.

@jakubgs
Copy link
Author

jakubgs commented Aug 29, 2023

I see the flags have been removed from 1.10.1:

flag provided but not defined: -validatorKeychain
flag provided but not defined: -password
flag provided but not defined: -wallet

So that's good. But I still think there should be some more verbose indicator in logs about native mode state for clarity.

@jclapis
Copy link
Member

jclapis commented Aug 29, 2023

Ok, I'll put a note into the console on startup for node and watchtower modes indicating if it's in Docker / Hybrid mode or Native mode.

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

No branches or pull requests

2 participants