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

fix: refuse to start if soft ConnMgr limits are bigger than hard ResourceMgr limits #9560

Merged
merged 1 commit into from
Jan 19, 2023

Conversation

Jorropo
Copy link
Contributor

@Jorropo Jorropo commented Jan 17, 2023

Fixes: #9549

Copy link
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

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

Dropping quick feedback:

  • simplify message, use config keys so user knows what knobs to adjust
  • check both In and Out

core/node/libp2p/rcmgr.go Outdated Show resolved Hide resolved
core/node/libp2p/rcmgr.go Outdated Show resolved Hide resolved
test/sharness/t0139-swarm-rcmgr.sh Show resolved Hide resolved
@lidel lidel changed the title fix: refuse to start if connmgr is smaller than ressource limits and not using none connmgr fix: refuse to start if ConnMgr limits are bigger than ResourceMgr limits Jan 18, 2023
@lidel lidel changed the title fix: refuse to start if ConnMgr limits are bigger than ResourceMgr limits fix: refuse to start if soft ConnMgr limits are bigger than hard ResourceMgr limits Jan 18, 2023
Copy link
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

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

Thanks, should be enough to protect people from running with missconfiguration.

@lidel lidel merged commit 73ebad1 into ipfs:master Jan 19, 2023
@@ -598,3 +602,41 @@ func NetResetLimit(mgr network.ResourceManager, repo repo.Repo, scope string) (r

return result, nil
}

func ensureConnMgrMakeSenseVsRessourcesMgr(rcm rcmgr.LimitConfig, cmgr config.ConnMgr) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

ensureConnMgrMakeSenseVsRessourcesMgr → ensureConnMgrMakeSenseVsResourceMgr
(extra s' in Ressources)

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

Successfully merging this pull request may close these issues.

Fail if Swarm.ConnMgr.HighWater is above Swarm.ResourceMgr hard limits
3 participants