* [Cluster-devel] [PATCH/RFC] Standardize on /etc/sysconfig/cluster for init script
@ 2008-07-28 8:20 Fabio M. Di Nitto
2008-07-28 12:59 ` david m. richter
2008-07-30 16:01 ` David Teigland
0 siblings, 2 replies; 10+ messages in thread
From: Fabio M. Di Nitto @ 2008-07-28 8:20 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi guys,
I just noticed that we have a very inconsistent way to set init script
defaults by using /etc/sysconfig/{cman,cluster,scsi_reserve}.
the patch in attachment is very simple and standardize everything to
/etc/sysconfig/cluster and retains backward compatibility.
Please ACK or i will apply.
Fabio
--
I'm going to make him an offer he can't refuse.
-------------- next part --------------
diff --git a/cman/init.d/cman b/cman/init.d/cman
index f489dd1..7cedd26 100644
--- a/cman/init.d/cman
+++ b/cman/init.d/cman
@@ -18,7 +18,14 @@
. /etc/init.d/functions
-[ -f /etc/sysconfig/cman ] && . /etc/sysconfig/cman
+if [ -f /etc/sysconfig/cman ]; then
+ . /etc/sysconfig/cman
+ echo "/etc/sysconfig/cman has been depracated in favour of /etc/sysconfig/cluster"
+ echo "Please consider switching to the new file"
+fi
+
+[ -f /etc/sysconfig/cluster ] && . /etc/sysconfig/cluster
+
[ -z "$CCSD_OPTS" ] && CCSD_OPTS=
# CMAN_CLUSTER_TIMEOUT -- amount of time to wait for joinging a cluster
diff --git a/fence/agents/scsi/scsi_reserve b/fence/agents/scsi/scsi_reserve
index 3d66991..7569873 100644
--- a/fence/agents/scsi/scsi_reserve
+++ b/fence/agents/scsi/scsi_reserve
@@ -21,8 +21,12 @@
#
if [ -f /etc/sysconfig/scsi_reserve ] ; then
. /etc/sysconfig/scsi_reserve
+ echo "/etc/sysconfig/scsi_reserve has been depracated in favour of /etc/sysconfig/cluster"
+ echo "Please consider switching to the new file"
fi
+[ -f /etc/sysconfig/cluster ] && . /etc/sysconfig/cluster
+
# check that cman is running
#
if ! cman_tool status &> /dev/null ; then
^ permalink raw reply related [flat|nested] 10+ messages in thread* [Cluster-devel] [PATCH/RFC] Standardize on /etc/sysconfig/cluster for init script 2008-07-28 8:20 [Cluster-devel] [PATCH/RFC] Standardize on /etc/sysconfig/cluster for init script Fabio M. Di Nitto @ 2008-07-28 12:59 ` david m. richter 2008-07-28 13:07 ` Fabio M. Di Nitto 2008-07-30 16:01 ` David Teigland 1 sibling, 1 reply; 10+ messages in thread From: david m. richter @ 2008-07-28 12:59 UTC (permalink / raw) To: cluster-devel.redhat.com On Mon, Jul 28, 2008 at 4:20 AM, Fabio M. Di Nitto <fdinitto@redhat.com> wrote: > > Hi guys, > > I just noticed that we have a very inconsistent way to set init script > defaults by using /etc/sysconfig/{cman,cluster,scsi_reserve}. > > the patch in attachment is very simple and standardize everything to > /etc/sysconfig/cluster and retains backward compatibility. hello, fabio, one tiny copy-editing nitpick about the patch: "deprecated" is twice misspelled "depracated". thanks, d. > > Please ACK or i will apply. > > Fabio > > -- > I'm going to make him an offer he can't refuse. ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Cluster-devel] [PATCH/RFC] Standardize on /etc/sysconfig/cluster for init script 2008-07-28 12:59 ` david m. richter @ 2008-07-28 13:07 ` Fabio M. Di Nitto 0 siblings, 0 replies; 10+ messages in thread From: Fabio M. Di Nitto @ 2008-07-28 13:07 UTC (permalink / raw) To: cluster-devel.redhat.com On Mon, 2008-07-28 at 08:59 -0400, david m. richter wrote: > On Mon, Jul 28, 2008 at 4:20 AM, Fabio M. Di Nitto <fdinitto@redhat.com> wrote: > > > > Hi guys, > > > > I just noticed that we have a very inconsistent way to set init script > > defaults by using /etc/sysconfig/{cman,cluster,scsi_reserve}. > > > > the patch in attachment is very simple and standardize everything to > > /etc/sysconfig/cluster and retains backward compatibility. > > hello, fabio, > > one tiny copy-editing nitpick about the patch: "deprecated" is twice > misspelled "depracated". Welcome to 2008.. the power of copy / paste :P Thanks btw... will fix for the final commit Fabio ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Cluster-devel] [PATCH/RFC] Standardize on /etc/sysconfig/cluster for init script 2008-07-28 8:20 [Cluster-devel] [PATCH/RFC] Standardize on /etc/sysconfig/cluster for init script Fabio M. Di Nitto 2008-07-28 12:59 ` david m. richter @ 2008-07-30 16:01 ` David Teigland 2008-07-30 16:41 ` david m. richter ` (2 more replies) 1 sibling, 3 replies; 10+ messages in thread From: David Teigland @ 2008-07-30 16:01 UTC (permalink / raw) To: cluster-devel.redhat.com On Mon, Jul 28, 2008 at 10:20:49AM +0200, Fabio M. Di Nitto wrote: > > Hi guys, > > I just noticed that we have a very inconsistent way to set init script > defaults by using /etc/sysconfig/{cman,cluster,scsi_reserve}. > > the patch in attachment is very simple and standardize everything to > /etc/sysconfig/cluster and retains backward compatibility. > > Please ACK or i will apply. Doesn't it make most sense for the name of the sysconfig file to match the name of the init script it corresponds to? i.e. the config file for init.d/cman would be sysconfig/cman? ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Cluster-devel] [PATCH/RFC] Standardize on /etc/sysconfig/cluster for init script 2008-07-30 16:01 ` David Teigland @ 2008-07-30 16:41 ` david m. richter 2008-07-30 19:12 ` Joel Becker 2008-07-31 3:02 ` Fabio M. Di Nitto 2 siblings, 0 replies; 10+ messages in thread From: david m. richter @ 2008-07-30 16:41 UTC (permalink / raw) To: cluster-devel.redhat.com On Wed, Jul 30, 2008 at 12:01 PM, David Teigland <teigland@redhat.com> wrote: > On Mon, Jul 28, 2008 at 10:20:49AM +0200, Fabio M. Di Nitto wrote: >> >> Hi guys, >> >> I just noticed that we have a very inconsistent way to set init script >> defaults by using /etc/sysconfig/{cman,cluster,scsi_reserve}. >> >> the patch in attachment is very simple and standardize everything to >> /etc/sysconfig/cluster and retains backward compatibility. >> >> Please ACK or i will apply. > > Doesn't it make most sense for the name of the sysconfig file to match the > name of the init script it corresponds to? i.e. the config file for > init.d/cman would be sysconfig/cman? my random, totally-unsolicited $.02: now that i think about past experiences i've had when hunting for init scripts and their config files, i agree with you, david. being able to just guess/tab-complete filenames for init scripts and config files may only rarely be felt as a user interface "success", but on the flipside it's never fun to have to pull out grep/find/etc to dig something out once the obvious choices have been excluded. but then again, nobody asked me, so i'll butt out. ;) thanks, d . ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Cluster-devel] [PATCH/RFC] Standardize on /etc/sysconfig/cluster for init script 2008-07-30 16:01 ` David Teigland 2008-07-30 16:41 ` david m. richter @ 2008-07-30 19:12 ` Joel Becker 2008-07-31 3:24 ` Fabio M. Di Nitto 2008-07-31 3:02 ` Fabio M. Di Nitto 2 siblings, 1 reply; 10+ messages in thread From: Joel Becker @ 2008-07-30 19:12 UTC (permalink / raw) To: cluster-devel.redhat.com On Wed, Jul 30, 2008 at 11:01:07AM -0500, David Teigland wrote: > On Mon, Jul 28, 2008 at 10:20:49AM +0200, Fabio M. Di Nitto wrote: > > I just noticed that we have a very inconsistent way to set init script > > defaults by using /etc/sysconfig/{cman,cluster,scsi_reserve}. > > > > the patch in attachment is very simple and standardize everything to > > /etc/sysconfig/cluster and retains backward compatibility. > > > > Please ACK or i will apply. > > Doesn't it make most sense for the name of the sysconfig file to match the > name of the init script it corresponds to? i.e. the config file for > init.d/cman would be sysconfig/cman? They should absolutely match the init script. I could perhaps seen an exception for something everything includes, but then I would have the other sysconfig files include it. What do I mean? Say you have a sysconfig/cluster file you want everything to see (cman, fs_controld, etc). You would have sysconfig/cman source sysconfig/cluster. That way, someone reading sysconfig/cman would see it. I would think we want to avoid folks having to read the init script to find the config files. Btw, let's all remember that 'sysconfig' is spelled 'default' on debian/ubuntu, so be aware of that in your scripts :-) Joel -- Life's Little Instruction Book #335 "Every so often, push your luck." Joel Becker Principal Software Developer Oracle E-mail: joel.becker at oracle.com Phone: (650) 506-8127 ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Cluster-devel] [PATCH/RFC] Standardize on /etc/sysconfig/cluster for init script 2008-07-30 19:12 ` Joel Becker @ 2008-07-31 3:24 ` Fabio M. Di Nitto 2008-07-31 7:41 ` Joel Becker 0 siblings, 1 reply; 10+ messages in thread From: Fabio M. Di Nitto @ 2008-07-31 3:24 UTC (permalink / raw) To: cluster-devel.redhat.com On Wed, 30 Jul 2008, Joel Becker wrote: > On Wed, Jul 30, 2008 at 11:01:07AM -0500, David Teigland wrote: >> On Mon, Jul 28, 2008 at 10:20:49AM +0200, Fabio M. Di Nitto wrote: >>> I just noticed that we have a very inconsistent way to set init script >>> defaults by using /etc/sysconfig/{cman,cluster,scsi_reserve}. >>> >>> the patch in attachment is very simple and standardize everything to >>> /etc/sysconfig/cluster and retains backward compatibility. >>> >>> Please ACK or i will apply. >> >> Doesn't it make most sense for the name of the sysconfig file to match the >> name of the init script it corresponds to? i.e. the config file for >> init.d/cman would be sysconfig/cman? > > They should absolutely match the init script. I could perhaps > seen an exception for something everything includes, but then I would > have the other sysconfig files include it. What do I mean? Say you > have a sysconfig/cluster file you want everything to see (cman, > fs_controld, etc). You would have sysconfig/cman source > sysconfig/cluster. That way, someone reading sysconfig/cman would see > it. I would think we want to avoid folks having to read the init script > to find the config files. How about the patch in attachment? > Btw, let's all remember that 'sysconfig' is spelled 'default' on > debian/ubuntu, so be aware of that in your scripts :-) Our scripts are rpmworld centric at the moment. It should be possible at others as well. Fabio -- I'm going to make him an offer he can't refuse. -------------- next part -------------- diff --git a/cman/init.d/cman b/cman/init.d/cman index 4ed6ec0..5ff172d 100644 --- a/cman/init.d/cman +++ b/cman/init.d/cman @@ -18,13 +18,8 @@ . /etc/init.d/functions -if [ -f /etc/sysconfig/cman ]; then - . /etc/sysconfig/cman - echo "/etc/sysconfig/cman has been deprecated in favour of /etc/sysconfig/cluster" - echo "Please consider switching to the new file" -fi - [ -f /etc/sysconfig/cluster ] && . /etc/sysconfig/cluster +[ -f /etc/sysconfig/cman ] && . /etc/sysconfig/cman [ -z "$CCSD_OPTS" ] && CCSD_OPTS= diff --git a/cman/init.d/qdiskd b/cman/init.d/qdiskd index 62bd33f..d77057c 100644 --- a/cman/init.d/qdiskd +++ b/cman/init.d/qdiskd @@ -17,6 +17,7 @@ . /etc/init.d/functions [ -f /etc/sysconfig/cluster ] && . /etc/sysconfig/cluster +[ -f /etc/sysconfig/qdiskd ] && . /etc/sysconfig/qdiskd LOCK_FILE="/var/lock/subsys/qdiskd" diff --git a/fence/agents/scsi/scsi_reserve b/fence/agents/scsi/scsi_reserve index a6918d8..6aeccc6 100644 --- a/fence/agents/scsi/scsi_reserve +++ b/fence/agents/scsi/scsi_reserve @@ -19,13 +19,8 @@ # read in config file if it exists # -if [ -f /etc/sysconfig/scsi_reserve ] ; then - . /etc/sysconfig/scsi_reserve - echo "/etc/sysconfig/scsi_reserve has been deprecated in favour of /etc/sysconfig/cluster" - echo "Please consider switching to the new file" -fi - [ -f /etc/sysconfig/cluster ] && . /etc/sysconfig/cluster +[ -f /etc/sysconfig/scsi_reserve ] && . /etc/sysconfig/scsi_reserve # check that cman is running # diff --git a/gfs/init.d/gfs b/gfs/init.d/gfs index 8116db1..e212a04 100644 --- a/gfs/init.d/gfs +++ b/gfs/init.d/gfs @@ -17,6 +17,7 @@ . /etc/init.d/functions [ -f /etc/sysconfig/cluster ] && . /etc/sysconfig/cluster +[ -f /etc/sysconfig/gfs ] && . /etc/sysconfig/gfs # # This script's behavior is modeled closely after the netfs script. diff --git a/gfs2/init.d/gfs2 b/gfs2/init.d/gfs2 index 146d789..cbe37fd 100644 --- a/gfs2/init.d/gfs2 +++ b/gfs2/init.d/gfs2 @@ -17,6 +17,7 @@ . /etc/init.d/functions [ -f /etc/sysconfig/cluster ] && . /etc/sysconfig/cluster +[ -f /etc/sysconfig/gfs2 ] && . /etc/sysconfig/gfs2 # # This script's behavior is modeled closely after the netfs script. diff --git a/rgmanager/init.d/rgmanager b/rgmanager/init.d/rgmanager index d307c17..361a65e 100644 --- a/rgmanager/init.d/rgmanager +++ b/rgmanager/init.d/rgmanager @@ -18,6 +18,7 @@ # Grab cluster start config if it exists [ -f /etc/sysconfig/cluster ] && . /etc/sysconfig/cluster +[ -f /etc/sysconfig/rgmanager ] && . /etc/sysconfig/rgmanager PATH=/sbin:/bin:/usr/sbin:/usr/bin ^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Cluster-devel] [PATCH/RFC] Standardize on /etc/sysconfig/cluster for init script 2008-07-31 3:24 ` Fabio M. Di Nitto @ 2008-07-31 7:41 ` Joel Becker 2008-07-31 7:40 ` Fabio M. Di Nitto 0 siblings, 1 reply; 10+ messages in thread From: Joel Becker @ 2008-07-31 7:41 UTC (permalink / raw) To: cluster-devel.redhat.com On Thu, Jul 31, 2008 at 05:24:36AM +0200, Fabio M. Di Nitto wrote: > diff --git a/cman/init.d/cman b/cman/init.d/cman > index 4ed6ec0..5ff172d 100644 > --- a/cman/init.d/cman > +++ b/cman/init.d/cman > @@ -18,13 +18,8 @@ > > . /etc/init.d/functions > > -if [ -f /etc/sysconfig/cman ]; then > - . /etc/sysconfig/cman > - echo "/etc/sysconfig/cman has been deprecated in favour of /etc/sysconfig/cluster" > - echo "Please consider switching to the new file" > -fi > - > [ -f /etc/sysconfig/cluster ] && . /etc/sysconfig/cluster > +[ -f /etc/sysconfig/cman ] && . /etc/sysconfig/cman What I meant was that /etc/sysconfig/cman does '. /etc/sysconfig/cluster', and /etc/init.d/cman doesn't refer to /etc/sysconfig/cluster. But what you've done at least honors the idea of "common things in /etc/sysconfig/cluster, cman-specific in /etc/sysconfig/cman". Oh, and you aren't the only cluster stack out there, so calling it "cluster" is rather presumptuous. I should be able to install two cluster stacks side by side, even if they can't interact. Joel -- "Born under a bad sign. I been down since I began to crawl. If it wasn't for bad luck, I wouldn't have no luck at all." Joel Becker Principal Software Developer Oracle E-mail: joel.becker at oracle.com Phone: (650) 506-8127 ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Cluster-devel] [PATCH/RFC] Standardize on /etc/sysconfig/cluster for init script 2008-07-31 7:41 ` Joel Becker @ 2008-07-31 7:40 ` Fabio M. Di Nitto 0 siblings, 0 replies; 10+ messages in thread From: Fabio M. Di Nitto @ 2008-07-31 7:40 UTC (permalink / raw) To: cluster-devel.redhat.com On Thu, 2008-07-31 at 00:41 -0700, Joel Becker wrote: > On Thu, Jul 31, 2008 at 05:24:36AM +0200, Fabio M. Di Nitto wrote: > > diff --git a/cman/init.d/cman b/cman/init.d/cman > > index 4ed6ec0..5ff172d 100644 > > --- a/cman/init.d/cman > > +++ b/cman/init.d/cman > > @@ -18,13 +18,8 @@ > > > > . /etc/init.d/functions > > > > -if [ -f /etc/sysconfig/cman ]; then > > - . /etc/sysconfig/cman > > - echo "/etc/sysconfig/cman has been deprecated in favour of /etc/sysconfig/cluster" > > - echo "Please consider switching to the new file" > > -fi > > - > > [ -f /etc/sysconfig/cluster ] && . /etc/sysconfig/cluster > > +[ -f /etc/sysconfig/cman ] && . /etc/sysconfig/cman > > What I meant was that /etc/sysconfig/cman does > '. /etc/sysconfig/cluster', and /etc/init.d/cman doesn't refer to > /etc/sysconfig/cluster. But what you've done at least honors the idea > of "common things in /etc/sysconfig/cluster, cman-specific in > /etc/sysconfig/cman". Yes, but as I was telling you on IRC, we don't ship sysconfig/$name by default because there is no need to. So if the users want /cluster, they would have to add the snippet by themself. > Oh, and you aren't the only cluster stack out there, so calling > it "cluster" is rather presumptuous. I should be able to install two > cluster stacks side by side, even if they can't interact. I will need to talk to the others to change this one. I didn't decide its name. It was there before I even started looking into this bits. Fabio ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Cluster-devel] [PATCH/RFC] Standardize on /etc/sysconfig/cluster for init script 2008-07-30 16:01 ` David Teigland 2008-07-30 16:41 ` david m. richter 2008-07-30 19:12 ` Joel Becker @ 2008-07-31 3:02 ` Fabio M. Di Nitto 2 siblings, 0 replies; 10+ messages in thread From: Fabio M. Di Nitto @ 2008-07-31 3:02 UTC (permalink / raw) To: cluster-devel.redhat.com On Wed, 30 Jul 2008, David Teigland wrote: > On Mon, Jul 28, 2008 at 10:20:49AM +0200, Fabio M. Di Nitto wrote: >> >> Hi guys, >> >> I just noticed that we have a very inconsistent way to set init script >> defaults by using /etc/sysconfig/{cman,cluster,scsi_reserve}. >> >> the patch in attachment is very simple and standardize everything to >> /etc/sysconfig/cluster and retains backward compatibility. >> >> Please ACK or i will apply. > > Doesn't it make most sense for the name of the sysconfig file to match the > name of the init script it corresponds to? i.e. the config file for > init.d/cman would be sysconfig/cman? I think this is one of those details where sysadmins are somewhat splitted in two. Some wants everything in one file, others everything splitted. Joel, made a nice suggestion in his other email by having init scripts including both in chain. Sounds probably the easiest to me. Fabio -- I'm going to make him an offer he can't refuse. ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2008-07-31 7:41 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-07-28 8:20 [Cluster-devel] [PATCH/RFC] Standardize on /etc/sysconfig/cluster for init script Fabio M. Di Nitto 2008-07-28 12:59 ` david m. richter 2008-07-28 13:07 ` Fabio M. Di Nitto 2008-07-30 16:01 ` David Teigland 2008-07-30 16:41 ` david m. richter 2008-07-30 19:12 ` Joel Becker 2008-07-31 3:24 ` Fabio M. Di Nitto 2008-07-31 7:41 ` Joel Becker 2008-07-31 7:40 ` Fabio M. Di Nitto 2008-07-31 3:02 ` Fabio M. Di Nitto
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).