-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
add explicit error msg if repo dir does not exist #6909
Conversation
6b83d77
to
27eebba
Compare
cli/util/api.go
Outdated
} | ||
|
||
if !exists { | ||
return APIInfo{}, errors.New("repo directory does not exist. Make sure your configuration is correct") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do we print if you run lotus-miner init ..
without a full-node repo? (just want to make sure we won't make that message really confusing)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# repo dir doesn't exist
➜ LOTUS_PATH=~/.lotussss LOTUS_MINER_PATH=~/.restoredrepo ./lotus-miner init service --type=markets --api-sealer=$APISEALER --api-sector-index=$APISEALER --config=~/.lotusmarket/config.toml ~/.lotusbackup/backupfile
2021-07-29T14:54:08.146+0300 INFO main lotus-miner/init_service.go:54 Initializing lotus miner service
2021-07-29T14:54:08.147+0300 INFO main lotus-miner/init_restore.go:102 Trying to connect to full node RPC
ERROR: could not get API info: repo directory does not exist. Make sure your configuration is correct
# no LOTUS_PATH, so ~/.lotus is inferred and it just works
➜ LOTUS_MINER_PATH=~/.restoredrepo ./lotus-miner init service --type=markets --api-sealer=$APISEALER --api-sector-index=$APISEALER --config=~/.lotusmarket/config.toml ~/.lotusbackup/backupfile
# no LOTUS_PATH, but this time repo exists (so config is correct), but node is not running
➜ LOTUS_MINER_PATH=~/.restoredrepo ./lotus-miner init service --type=markets --api-sealer=$APISEALER --api-sector-index=$APISEALER --config=~/.lotusmarket/config.toml ~/.lotusbackup/backupfile
2021-07-29T14:57:18.953+0300 INFO main lotus-miner/init_service.go:54 Initializing lotus miner service
2021-07-29T14:57:18.953+0300 INFO main lotus-miner/init_restore.go:102 Trying to connect to full node RPC
ERROR: could not get API info: could not get api endpoint: API not running (no endpoint)
ca38ec9
to
5b1fdb9
Compare
5b1fdb9
to
fa7e52d
Compare
Rebased and I’m gonna merge it and backport it in the v1.11.1 release branch so it’s in v1.11.1-rc2. Please open new prs if we need further improvements on it. |
This PR is adding an explicit error in case someone tries to run CLI pointed at incorrect repo location. We had a lot of confusion with this yesterday, given that miners are now running multiple miner instances on one host.