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

add warning when no bootstrap in config #5445

Merged
merged 2 commits into from
Sep 11, 2018
Merged

Conversation

kjzz
Copy link
Contributor

@kjzz kjzz commented Sep 10, 2018

feature #4576

License: MIT
Signed-off-by: Kejie Zhang 601172892@qq.com

License: MIT
Signed-off-by: Kejie Zhang <601172892@qq.com>
@kjzz kjzz requested a review from Kubuxu as a code owner September 10, 2018 12:23
@kjzz
Copy link
Contributor Author

kjzz commented Sep 10, 2018

Hi @lgierth @Stebalien , I have added a warning when no bootsrap in config , aimed to solving issue #4576 . Please help me review it , if you have any advice or anything needed to update,please ping me.Thx a lot.

Copy link
Member

@Stebalien Stebalien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I'd elaborate on the message a bit but yes, we should be doing this.

Note: Warnings aren't currently displayed by default but we'd like to change that. We may want to change this to an Error for now.

@@ -117,7 +117,9 @@ func bootstrapRound(ctx context.Context, host host.Host, cfg BootstrapConfig) er
// get bootstrap peers from config. retrieving them here makes
// sure we remain observant of changes to client configuration.
peers := cfg.BootstrapPeers()

if len(peers) == 0 {
log.Warning("no bootstrap in the configuration file")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say something like:

no bootstrap nodes configured: go-ipfs may have difficulty connecting to the network

Technically, IPFS can still work if there are other IPFS nodes on the local network but this is still a good warning to have.

@Stebalien Stebalien added the need/author-input Needs input from the original author label Sep 11, 2018
License: MIT
Signed-off-by: Kejie Zhang <601172892@qq.com>
@kjzz
Copy link
Contributor Author

kjzz commented Sep 11, 2018

@Stebalien Thx a lot for your suggestion,and i have updated my pr.Can u help me review again?

@Stebalien Stebalien merged commit a2ceb1f into ipfs:master Sep 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/author-input Needs input from the original author
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants