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

vstart.sh: drop .ceph_port and use randomly selected available port #19268

Merged
merged 1 commit into from Dec 29, 2017

Conversation

shinobu-x
Copy link
Contributor

vstart.sh becomes independent of do_cmake.sh

Signed-off-by: Shinobu Kinjo shinobu@redhat.com

while [ true ]
do
CEPH_PORT="$(echo $(( RANDOM % 1000 + 40000 )))"
ss -a -n | egrep ":${CEPH_PORT} .+LISTEN" 1>/dev/null 2>&1 || break
Copy link
Contributor

Choose a reason for hiding this comment

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

This test is only partially useful since another process that happened to pick the same port could be racing to start daemons after doing this test.

@tchaikov
Copy link
Contributor

tchaikov commented Dec 1, 2017

could you prefix the title of your commit message with the subcomponent your are changing ? see https://github.com/ceph/ceph/blob/master/SubmittingPatches.rst#3-describe-your-changes. we don't use "cleanup" as the prefix, in general.

@shinobu-x shinobu-x force-pushed the vstart_picking_up_random_port branch from 09d6b6f to 8de3dde Compare December 1, 2017 02:48
@shinobu-x
Copy link
Contributor Author

@tchaikov Like now?

@shinobu-x shinobu-x changed the title [cleanup] Drop .ceph_port and use randomly selected available port vstart.sh: [cleanup] Drop .ceph_port and use randomly selected available port Dec 1, 2017
@tchaikov
Copy link
Contributor

tchaikov commented Dec 1, 2017

@shinobu-x i'd suggest
vstart.sh: drop .ceph_port and use randomly selected available port

@shinobu-x shinobu-x changed the title vstart.sh: [cleanup] Drop .ceph_port and use randomly selected available port vstart.sh: drop .ceph_port and use randomly selected available port Dec 1, 2017
vstart.sh becomes independent of do_cmake.sh

Signed-off-by: Shinobu Kinjo <shinobu@redhat.com>
@shinobu-x shinobu-x force-pushed the vstart_picking_up_random_port branch from 8de3dde to 5a3eed7 Compare December 1, 2017 03:16
@gregsfortytwo
Copy link
Member

Are there any other users of that file?
I agree it seems like a silly interface but if mstart.sh or so,etching is using it we can’t kill it.

@shinobu-x
Copy link
Contributor Author

shinobu-x commented Dec 1, 2017

@gregsfortytwo What is ps-ceph.pl for?

@liewegas liewegas merged commit 4a1eabb into ceph:master Dec 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants