Skip to content
This repository has been archived by the owner on Mar 26, 2020. It is now read-only.

Implement internal portmapper registry/service #246

Merged
merged 3 commits into from Feb 27, 2017

Conversation

prashanthpai
Copy link
Contributor

This should allow bricks and mount process to talk to
glusterd2 about brick ports.

Signed-off-by: Prashanth Pai ppai@redhat.com

Signed-off-by: Prashanth Pai <ppai@redhat.com>
@prashanthpai
Copy link
Contributor Author

prashanthpai commented Feb 22, 2017

This is complete enough to be reviewed but I intend to test this further. Please do not merge yet.

pmap/pmap.go Outdated
return true
}

func registrySearchByPort(port int) string {
Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah. I am not sure if this function is required. (even on GD1 side). If you still feel this is required, maybe returning a string[] instead would be better.

Copy link
Member

@kshlm kshlm left a comment

Choose a reason for hiding this comment

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

Looks good mostly.

pmap/pmap.go Outdated

for p := registry.LastAlloc; p >= registry.BasePort; p-- {

if registry.Ports[p].Type != GfPmapPortFree {
Copy link
Member

Choose a reason for hiding this comment

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

Did you mean to do something here?

pmap/pmap.go Outdated
if xprt != nil {
port = registrySearchByXprt(xprt, ptype)
if port != 0 {
goto REMOVE
Copy link
Member

Choose a reason for hiding this comment

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

Instead of using jumps, just make the REMOVE block a function and call it instead. Makes it cleaner.

Nobody in glusterd1 seems to use this call

Signed-off-by: Prashanth Pai <ppai@redhat.com>
Signed-off-by: Prashanth Pai <ppai@redhat.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants