Bug#427499: Merge a few bugs and provide LSB header

2008-02-21 Thread Petter Reinholdtsen

severity 336258 normal
merge 336258 400205 427499
user  [EMAIL PROTECTED]
usertags 336258 missing-dependency
thanks

Please make sure the new init.d script include dependency information
using the LSB header.

Here is a draft header based on the comments in bug #427499.

### BEGIN INIT INFO
# Provides:  clvmd
# Required-Start:$remote_fs
# Required-Stop: $remote_fs
# Should-Start:  fence
# Should-Stop:   fence
# Default-Start: 2 3 4 5
# Default-Stop:  0 1 6
### END INIT INFO



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#427499: Merge a few bugs and provide LSB header

2008-02-21 Thread Andre Felipe Machado

Hello,
I suggest including the following LSB compliant headers at ALL the
respective
redhat cluster init.d scripts in order to maintain consistency between 
cluster service essential daemons.
Please, review the ccs dependencies, as ssh must be running before it.
Also, the strong dependency on $remote_fs or $local_fs may conflict with 
GFS cluster fs.
Followed hints at http://wiki.debian.org/PkgSplit and its resource links
[34] and [35].
Regards.
Andre Felipe Machado


### BEGIN INIT INFO
# Provides:  clvmd
# Required-Start:fence
# Required-Stop: fence
# Should-Start:  $all
# Should-Stop:   $all
# Default-Start: 2 3 4 5
# Default-Stop:  0 1 6
# Short-Description: Cluster aware LVM daemon.
# Description:   Coordinate LVM synchronization accross the
#Red Hat Cluster.
### END INIT INFO



### BEGIN INIT INFO
# Provides:  fence
# Required-Start:cman
# Required-Stop: cman
# Should-Start:  $all
# Should-Stop:   $all
# Default-Start: 2 3 4 5
# Default-Stop:  0 1 6
# Short-Description: Cluster device fencing daemon.
# Description:   Coordinate device fencing accross the
#Red Hat Cluster.
### END INIT INFO



### BEGIN INIT INFO
# Provides:  cman
# Required-Start:ccs
# Required-Stop: ccs
# Should-Start:  $all
# Should-Stop:   $all
# Default-Start: 2 3 4 5
# Default-Stop:  0 1 6
# Short-Description: Cluster manager daemon.
# Description:   Manage cluster synchronization accross the
#Red Hat Cluster.
### END INIT INFO



### BEGIN INIT INFO
# Provides:  ccs
# Required-Start:$network ssh
# Required-Stop: $network ssh
# Should-Start:  $all
# Should-Stop:   $all
# Default-Start: 2 3 4 5
# Default-Stop:  0 1 6
# Short-Description: Cluster aware LVM daemon.
# Description:   Cluster configuration system to manage the 
#cluster.conf file across the
#Red Hat Cluster.
### END INIT INFO



-- 
A Debian user never dies. Issues a last command:
shutdown -h now
http://www.techforce.com.br





Bug#427499: Merge a few bugs and provide LSB header

2008-02-21 Thread Petter Reinholdtsen
[Andre Felipe Machado]
 I suggest including the following LSB compliant headers at ALL the
 respective redhat cluster init.d scripts in order to maintain
 consistency between cluster service essential daemons.

It seem mostly ok, but the dependency on '$all' is broken.  They can
not all start after all other packages.  It will not work.  In
addition, all of them should depend on $remote_fs, to make sure /usr/
is mounted when the scripts are executed.

 Please, review the ccs dependencies, as ssh must be running before
 it.  Also, the strong dependency on $remote_fs or $local_fs may
 conflict with GFS cluster fs.

Unlikely.

See http://wiki.debian.org/LSBInitScripts for information on how to
specify the dependencies.

Happy hacking,
-- 
Petter Reinholdtsen



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#427499: Merge a few bugs and provide LSB header

2008-02-21 Thread Andre Felipe Machado

Hello, Petter
Thanks for the fast answer.
 
 It seem mostly ok, but the dependency on '$all' is broken.  They can
 not all start after all other packages.  It will not work.  

The Should-Start: $all is supposed to be a weak dependency, a desired order
that
will not cause a failure if not satisfied.
I imagined that when the init installer, at first pass, will try to move
each script
to the end of queue as per weak dependency spec, then, at second pass,
 will try to satisfy the strong dependencies, correctly ordering all.

 In addition, all of them should depend on $remote_fs, to make sure /usr/
 is mounted when the scripts are executed.

My first guess was to specify strong dependencies $remote_fs and $network
for all packages.
But then realized that each script will depend on previously started 
other and only the first (ccs) should have such strong dependencies.
Specifying strong dependencies almost equal to all scripts, may confuse the

installer order resolving. 
I am not sure if the installer could accomplish such task, yet. 
If the DD could make things easier to the installer, the better.
As the redhat-cluster-suite should install all init.d scripts, these
headers
should be enough to guarantee consistency.

Also, I am not sure about needing the non-standard Debian and Suse custom
headers for reverse dependency, given that the package will install all
scripts.
X-Start-Before: boot_facility_1 [boot_facility_2...]
X-Stop-After: boot_facility_1 [boot_facility_2...]

Regards.
Andre Felipe

-- 
A Debian user never dies. Issues a last command:
shutdown -h now
http://www.techforce.com.br





Bug#427499: Merge a few bugs and provide LSB header

2008-02-21 Thread Petter Reinholdtsen
[Andre Felipe Machado]
 The Should-Start: $all is supposed to be a weak dependency, a
 desired order that will not cause a failure if not satisfied.

I believe this is a misunderstanding on what a weak dependency is.  A
weak dependency mean that it will not fail to register/install this
script if the dependency is missing.  If it is present (all $all
matches all/any script, thus always present), the script have to start
after and stop before its weak dependency.  If it can't, the ordering
is not well defined.

 I imagined that when the init installer, at first pass, will try
 to move each script to the end of queue as per weak dependency spec,
 then, at second pass, will try to satisfy the strong dependencies,
 correctly ordering all.

The current implementation of insserv will first order all scripts
according to their dependencies ignoring the $all, and finally move
all scripts with the $all dependency to the last order + 1.

 My first guess was to specify strong dependencies $remote_fs and
 $network for all packages.
 
 But then realized that each script will depend on previously started
 other and only the first (ccs) should have such strong dependencies.
 Specifying strong dependencies almost equal to all scripts, may
 confuse the installer order resolving.

Yes, if the packages have hard dependencies on each other and can know
that other scripts will be installed in time, it can drop the
$remote_fs dependency.  I would not recommend it, though, as it
document the need for a mounted /usr/ and it is useful to include in
case the script dependencies are changed in the future.

 I am not sure if the installer could accomplish such task, yet. 

The dependency based boot sequencing system insserv that is used in
Debian handle this just fine.

 If the DD could make things easier to the installer, the better.
 
 As the redhat-cluster-suite should install all init.d scripts, these
 headers should be enough to guarantee consistency.

I trust you there. :)

 Also, I am not sure about needing the non-standard Debian and Suse
 custom headers for reverse dependency, given that the package will
 install all scripts.

They are probably not needed in this case.  They have proven useful in
other cases.

Happy hacking,
-- 
Petter Reinholdtsen



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#427499: Merge a few bugs and provide LSB header

2008-02-21 Thread Andre Felipe Machado

Hello, Petter
Many thanks for the explanations.



 A weak dependency mean that it will not fail to register/install this
 script if the dependency is missing.  If it is present (all $all
 matches all/any script, thus always present), the script have to start
 after and stop before its weak dependency.  If it can't, the ordering
 is not well defined.

I read [0] and tried to move the cluster daemons to the end of init.d queue
as far as possible, in a defined order inside the group.
As the Should-Start does not guarantee this, removed then at the new
proposed headers below.

 
 The current implementation of insserv will first order all scripts
 according to their dependencies ignoring the $all, and finally move
 all scripts with the $all dependency to the last order + 1.

Given that $all is composed of base services, should not the order be
first honor the $all then the other strong dependencies in the header?


 Yes, if the packages have hard dependencies on each other and can know
 that other scripts will be installed in time, it can drop the
 $remote_fs dependency.  I would not recommend it, though, as it
 document the need for a mounted /usr/ and it is useful to include in
 case the script dependencies are changed in the future.
 

Well, I do not have experience with insserv yet, so the objective is 
to move the cluster daemons group to the very end of boot sequence in a 
enforced defined order.
($all)  $network  $remote_fs  ssh  ccs  cman  fence  clvmd
There are system services like $named and $time and $syslog that should
 start before any cluster daemon, if available.
Their absence could lead to troubles in a production site, but they are
not essential for a cluster start.
I suggest that redhat-cluster-suite depends on ssh too, because when 
problems arise, without ssh is very difficult to solve them without 
it. (my own experience).
I guess that the new proposed headers below will accomplish the objective
and still LSB 3.1 compliant (did not carefully check against 3.2 [1] but
seem
ok at first sight).
Please, review them.



### BEGIN INIT INFO
# Provides:  clvmd
# Required-Start:$network $remote_fs fence
# Required-Stop: fence $remote_fs $network
# Default-Start: 2 3 4 5
# Default-Stop:  0 1 6
# Short-Description: Cluster aware LVM daemon.
# Description:   Coordinate LVM synchronization accross the
#Red Hat Cluster.
### END INIT INFO



### BEGIN INIT INFO
# Provides:  fence
# Required-Start:$network $remote_fs cman
# Required-Stop: cman $remote_fs $network
# Default-Start: 2 3 4 5
# Default-Stop:  0 1 6
# Short-Description: Cluster device fencing daemon.
# Description:   Coordinate device fencing accross the
#Red Hat Cluster.
### END INIT INFO



### BEGIN INIT INFO
# Provides:  cman
# Required-Start:$network $remote_fs ccs
# Required-Stop: ccs $remote_fs $network
# Default-Start: 2 3 4 5
# Default-Stop:  0 1 6
# Short-Description: Cluster manager daemon.
# Description:   Manage cluster synchronization accross the
#Red Hat Cluster.
### END INIT INFO



### BEGIN INIT INFO
# Provides:  ccs
# Required-Start:$network $remote_fs ssh
# Required-Stop: ssh $remote_fs $network
# Should-Start:  $all
# Should-Stop:   $all
# Default-Start: 2 3 4 5
# Default-Stop:  0 1 6
# Short-Description: Cluster aware LVM daemon.
# Description:   Cluster configuration system to manage the 
#cluster.conf file across the
#Red Hat Cluster.
### END INIT INFO



Regards.
Andre Felipe Machado

[0]
http://refspecs.freestandards.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/initscrcomconv.html
[1]
http://refspecs.freestandards.org/LSB_3.2.0/LSB-Core-generic/LSB-Core-generic/initscrcomconv.html

-- 
A Debian user never dies. Issues a last command:
shutdown -h now
http://www.techforce.com.br





Bug#427499: Merge a few bugs and provide LSB header

2008-02-21 Thread Petter Reinholdtsen
[Andre Felipe Machado]
 I read [0] and tried to move the cluster daemons to the end of
 init.d queue as far as possible, in a defined order inside the
 group.  As the Should-Start does not guarantee this, removed then at
 the new proposed headers below.

Why do you want to start the cluster daemon after unrelated services
like xdm and munin-node?  I believe it is better to not depend on
'$all', and instead list the services it need to start after and stop
before.

 Given that $all is composed of base services, should not the order
 be first honor the $all then the other strong dependencies in the
 header?

It is not obvious, given the semantic of $all.  And it is not how it
is implemented in the only implementation I know about, insserv.

 Well, I do not have experience with insserv yet, so the objective is 
 to move the cluster daemons group to the very end of boot sequence in a 
 enforced defined order.
 ($all)  $network  $remote_fs  ssh  ccs  cman  fence  clvmd
 There are system services like $named and $time and $syslog that should
 start before any cluster daemon, if available.
 Their absence could lead to troubles in a production site, but they
 are not essential for a cluster start.

Then it is better to list $named, $time and $syslog in required-* or
should-*

 I guess that the new proposed headers below will accomplish the
 objective and still LSB 3.1 compliant (did not carefully check
 against 3.2 [1] but seem ok at first sight).

Look good, but I would drop the $all dependency.  Also, there is no
need to order the start and stop dependencies in opposite order.
Instead of

 # Required-Start:$network $remote_fs fence
 # Required-Stop: fence $remote_fs $network

I would use

  # Required-Start:$remote_fs $network fence
  # Required-Stop: $remote_fs $network fence

It make it easier to see that the two lists are identical.

The other look ok, except the ccs one.  I propose this one:

  ### BEGIN INIT INFO
  # Provides:  ccs
  # Required-Start:$remote_fs $network ssh
  # Required-Stop: $remote_fs $network ssh
  # Should-Start:  $named $time $syslog
  # Should-Stop:   $named $time $syslog
  # Default-Start: 2 3 4 5
  # Default-Stop:  0 1 6
  # Short-Description: Cluster aware LVM daemon.
  # Description:   Cluster configuration system to manage the 
  #cluster.conf file across the
  #Red Hat Cluster.
  ### END INIT INFO

Happy hacking,
-- 
Petter Reinholdtsen



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#427499: Merge a few bugs and provide LSB header

2008-02-21 Thread Andre Felipe Machado

Hello, Petter
Many thanks for the explanations.
The new corrected headers are below.
Please, do not forget to make redhat-cluster-suite dependent
on ssh if you implement the ccs header.
It is really difficult to solve problems in a cluster without
ssh.



### BEGIN INIT INFO
# Provides:  clvmd
# Required-Start:$network $remote_fs fence
# Required-Stop: $network $remote_fs fence
# Default-Start: 2 3 4 5
# Default-Stop:  0 1 6
# Short-Description: Cluster aware LVM daemon.
# Description:   Coordinate LVM synchronization accross the
#Red Hat Cluster.
### END INIT INFO



### BEGIN INIT INFO
# Provides:  fence
# Required-Start:$network $remote_fs cman
# Required-Stop: $network $remote_fs cman
# Default-Start: 2 3 4 5
# Default-Stop:  0 1 6
# Short-Description: Cluster device fencing daemon.
# Description:   Coordinate device fencing accross the
#Red Hat Cluster.
### END INIT INFO



### BEGIN INIT INFO
# Provides:  cman
# Required-Start:$network $remote_fs ccs
# Required-Stop: $network $remote_fs ccs
# Default-Start: 2 3 4 5
# Default-Stop:  0 1 6
# Short-Description: Cluster manager daemon.
# Description:   Manage cluster synchronization accross the
#Red Hat Cluster.
### END INIT INFO



### BEGIN INIT INFO
# Provides:  ccs
# Required-Start:$network $remote_fs ssh
# Required-Stop: $network $remote_fs ssh
# Should-Start:  $named $time $syslog
# Should-Stop:   $named $time $syslog
# Default-Start: 2 3 4 5
# Default-Stop:  0 1 6
# Short-Description: Cluster configuration daemon.
# Description:   Cluster configuration system to manage and
#sync the cluster.conf file across the
#Red Hat Cluster.
### END INIT INFO



Regards.
Andre Felipe Machado
-- 
A Debian user never dies. Issues a last command:
shutdown -h now
http://www.techforce.com.br