Skip to content

Conversation

@fanjiyun
Copy link
Contributor

@fanjiyun fanjiyun commented May 15, 2020

func JoinOptionPriority(ep Endpoint, prio int) EndpointOption {
	return func(ep *endpoint) {
		// ep lock already acquired
		c := ep.network.getController()
		c.Lock()
		sb, ok := c.sandboxes[ep.sandboxID]
		c.Unlock()
		if !ok {
			logrus.Errorf("Could not set endpoint priority value during Join to endpoint %s: No sandbox id present in endpoint", ep.id)
			return
		}
		sb.epPriority[ep.id] = prio
	}
}

maybe we don't need this parameters ep Endpoint ? I made some changes for this.

Relevant PRs:
moby/moby#40974 (open)
docker/cli#2529(open)

Signed-off-by: fanjiyun fan.jiyun@zte.com.cn

Signed-off-by: fanjiyun <fan.jiyun@zte.com.cn>
@fanjiyun
Copy link
Contributor Author

@thaJeztah PLAT, thanks.

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@thaJeztah thaJeztah merged commit 535ef36 into moby:master Oct 31, 2020
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.

2 participants