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

init-ceph: use getopt to make option processing more flexible #6089

Merged
merged 3 commits into from Nov 11, 2015

Conversation

smithfarm
Copy link
Contributor

@ghost
Copy link

ghost commented Sep 27, 2015

@smithfarm I see you figured out the false negative ;-) Please repush to trigger the bot.

@smithfarm smithfarm force-pushed the wip-init-ceph-getopt branch 2 times, most recently from 3d8d7e7 to 997b3ef Compare September 27, 2015 21:17
@smithfarm smithfarm changed the title init-ceph: process command-line options using getopt init-ceph: use getopt and eliminate --allhosts Sep 27, 2015
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
Copy link
Contributor

Choose a reason for hiding this comment

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

unlike getopts, getopt is an external command. so maybe we don't need it at all? and imho, as a startup script, it would be ideal to be POSIX compliant, and not rely on a certain shell implementation. @smithfarm what do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@tchaikov The rationale here was that we are not supporting any non-Linux platforms, so why not be explicit about that?

Copy link
Contributor

Choose a reason for hiding this comment

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

i mean, user installs a POSIX compliant shell by default, but it could be dash or any other shell implementations. we'd better not force user to install bash even it's ubiquitous. and i don't think, bash is equivalent to GNU/linux.

@smithfarm smithfarm changed the title init-ceph: use getopt and eliminate --allhosts [DNM] init-ceph: use getopt and eliminate --allhosts Sep 28, 2015
@smithfarm smithfarm changed the title [DNM] init-ceph: use getopt and eliminate --allhosts init-ceph: use getopt to make option processing more flexible Sep 28, 2015
@smithfarm smithfarm force-pushed the wip-init-ceph-getopt branch 2 times, most recently from 3378ce6 to 6b705a7 Compare September 28, 2015 06:43
@smithfarm
Copy link
Contributor Author

@tchaikov Good point. Leaving /bin/sh.

@tchaikov
Copy link
Contributor

@smithfarm thanks. but you dropped the allhost change on purpose?

@smithfarm
Copy link
Contributor Author

@tchaikov: Yes, I dropped that commit on purpose in response to @liewegas feedback on ceph-devel: "I certainly won't miss it, but I suspect a fair number of people use it (e.g., service ceph -a start). The general strategy is to avoid adding any such hacks to the newer init system scripts, so as everyone moves to systemd this will go away."

@smithfarm
Copy link
Contributor Author

@tchaikov: Regarding use of /bin/bash vs. /bin/sh in init scripts, look at https://github.com/ceph/ceph/blob/master/src/init-rbdmap

@tchaikov
Copy link
Contributor

tchaikov commented Oct 5, 2015

@smithfarm thanks for referencing the rbdmap init script. but i still believe that a POSIX compliant shell script would help our user:

@tchaikov
Copy link
Contributor

tchaikov commented Oct 5, 2015

lgtm.

@smithfarm
Copy link
Contributor Author

@liewegas When you wrote:

The general strategy is to avoid adding any such hacks to the newer init system scripts,
so as everyone moves to systemd this will go away.

did you mean that minor sysvinit issues like this one - http://tracker.ceph.com/issues/3015 - should not be fixed?

@liewegas
Copy link
Member

@smithfarm if we have a fix and are confident it won't break things then we may as well merge it, but i would spend time in higher priority areas...

@tchaikov
Copy link
Contributor

@smithfarm besides the trailing space, lgtm

smithfarm and others added 3 commits November 11, 2015 14:10
Signed-off-by: Nathan Cutler <ncutler@suse.com>
Signed-off-by: Nathan Cutler <ncutler@suse.com>
@smithfarm
Copy link
Contributor Author

@tchaikov Thanks! Trailing space removed, rebased and repushed.

@tchaikov tchaikov assigned tchaikov and unassigned ktdreyer Nov 11, 2015
tchaikov added a commit that referenced this pull request Nov 11, 2015
init-ceph: use getopt to make option processing more flexible

Reviewed-by: Kefu Chai <kchai@redhat.com>
@tchaikov tchaikov merged commit 9c1a4ed into ceph:master Nov 11, 2015
@smithfarm smithfarm deleted the wip-init-ceph-getopt branch November 11, 2015 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants