Implement internal portmapper registry/service #246
Conversation
Signed-off-by: Prashanth Pai <ppai@redhat.com>
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 { |
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.
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.
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.
Looks good mostly.
pmap/pmap.go
Outdated
|
||
for p := registry.LastAlloc; p >= registry.BasePort; p-- { | ||
|
||
if registry.Ports[p].Type != GfPmapPortFree { |
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.
Did you mean to do something here?
pmap/pmap.go
Outdated
if xprt != nil { | ||
port = registrySearchByXprt(xprt, ptype) | ||
if port != 0 { | ||
goto REMOVE |
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.
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>
This should allow bricks and mount process to talk to
glusterd2 about brick ports.
Signed-off-by: Prashanth Pai ppai@redhat.com