This repository has been archived by the owner on Mar 26, 2020. It is now read-only.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
With glusterfs change https://review.gluster.org/21249, glusterd2 can choose to not to pass an explicit port when starting brick process. The brick process shall choose a free port provided by the kernel and reports this port number to glusterd2 via a SIGN IN request. The pmap package will no longer manage and track available free ports. This means that running multiple glusterd2 instances on same machine (e2e) are now not prone to races in finding a free port to assign to a brick. Signed-off-by: Prashanth Pai <ppai@redhat.com>
ghost
assigned prashanthpai
Oct 3, 2018
ghost
added
the
in progress
label
Oct 3, 2018
Sample output: [ppai@gd2-1 glusterd2]$ glustercli volume status test
Volume : test
+--------------------------------------+-----------+---------------------+--------+-------+-------+
| BRICK ID | HOST | PATH | ONLINE | PORT | PID |
+--------------------------------------+-----------+---------------------+--------+-------+-------+
| bedf6c5c-859d-4f52-9b68-523e0f4b9cdd | 127.0.0.1 | /export/brick1/data | true | 46501 | 29081 |
| 28c10e8e-f8c9-4131-a4a1-b36dcfb1e6eb | 127.0.0.1 | /export/brick2/data | true | 40467 | 29103 |
| b1664b0e-9abf-4d8c-8ef6-3bf0ba9fb168 | 127.0.0.1 | /export/brick3/data | true | 44037 | 29125 |
| 867d1cc5-743e-46d9-b3ce-166d612bcc2f | 127.0.0.1 | /export/brick4/data | true | 45479 | 29147 |
+--------------------------------------+-----------+---------------------+--------+-------+-------+ [ppai@gd2-1 glusterd2]$ glustercli volume stop test
Volume test stopped successfully
[ppai@gd2-1 glusterd2]$ glustercli volume status test
Volume : test
+--------------------------------------+-----------+---------------------+--------+------+-----+
| BRICK ID | HOST | PATH | ONLINE | PORT | PID |
+--------------------------------------+-----------+---------------------+--------+------+-----+
| 28c10e8e-f8c9-4131-a4a1-b36dcfb1e6eb | 127.0.0.1 | /export/brick2/data | false | 0 | 0 |
| b1664b0e-9abf-4d8c-8ef6-3bf0ba9fb168 | 127.0.0.1 | /export/brick3/data | false | 0 | 0 |
| 867d1cc5-743e-46d9-b3ce-166d612bcc2f | 127.0.0.1 | /export/brick4/data | false | 0 | 0 |
| bedf6c5c-859d-4f52-9b68-523e0f4b9cdd | 127.0.0.1 | /export/brick1/data | false | 0 | 0 |
+--------------------------------------+-----------+---------------------+--------+------+-----+ [ppai@gd2-1 glusterd2]$ glustercli volume start test
Volume test started successfully
[ppai@gd2-1 glusterd2]$ glustercli volume status test
Volume : test
+--------------------------------------+-----------+---------------------+--------+-------+-------+
| BRICK ID | HOST | PATH | ONLINE | PORT | PID |
+--------------------------------------+-----------+---------------------+--------+-------+-------+
| bedf6c5c-859d-4f52-9b68-523e0f4b9cdd | 127.0.0.1 | /export/brick1/data | true | 35607 | 29190 |
| 28c10e8e-f8c9-4131-a4a1-b36dcfb1e6eb | 127.0.0.1 | /export/brick2/data | true | 38785 | 29212 |
| b1664b0e-9abf-4d8c-8ef6-3bf0ba9fb168 | 127.0.0.1 | /export/brick3/data | true | 43205 | 29234 |
| 867d1cc5-743e-46d9-b3ce-166d612bcc2f | 127.0.0.1 | /export/brick4/data | true | 33987 | 29256 |
+--------------------------------------+-----------+---------------------+--------+-------+-------+ [ppai@gd2-1 glusterd2]$ curl -s -X GET http://127.0.0.1:24007/statedump | grep pmap
"pmap": {"ports":{"33987":{"/export/brick4/data":{}},"35607":{"/export/brick1/data":{}},"38785":{"/export/brick2/data":{}},"43205":{"/export/brick3/data":{}}}}, |
Signed-off-by: Prashanth Pai <ppai@redhat.com>
prashanthpai
force-pushed
the
issue-924
branch
from
October 3, 2018 08:56
e470a21
to
d463066
Compare
amarts
reviewed
Oct 3, 2018
for i := 1000; i <= (r.basePort + 100); i++ { | ||
r.ports[i].State = PortLeased | ||
} | ||
basePort := 49152 |
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.
How are you sure about this? Should this be 1024?
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.
This is arbitrary. It can be anything in the range 1024 to 65535.
amarts
reviewed
Oct 3, 2018
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.
Other than the tests where you set basePort as 49152, everything else LGTM
aravindavk
approved these changes
Oct 3, 2018
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.
LGTM
ghost
removed
the
in progress
label
Oct 4, 2018
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With glusterfs change https://review.gluster.org/21249, glusterd2 can choose
to not to pass an explicit port when starting brick process. The brick process
shall choose a free port provided by the kernel and reports this port number
to glusterd2 via a SIGN IN request.
The pmap package will no longer manage and track available free ports. This
means that running multiple glusterd2 instances on same machine (e2e) are
now not prone to races in finding a free port to assign to a brick.
Fixes #924
Signed-off-by: Prashanth Pai ppai@redhat.com