Bug 494937 - sshd should be started before cman
sshd should be started before cman
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: cluster (Show other bugs)
All Linux
high Severity low
: beta
: ---
Assigned To: Fabio Massimo Di Nitto
Cluster QE
Depends On:
  Show dependency treegraph
Reported: 2009-04-08 15:00 EDT by Dirk Herrmann
Modified: 2016-04-26 11:21 EDT (History)
12 users (show)

See Also:
Fixed In Version: cluster-3.0.3-1.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-11-11 09:34:17 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
allow user configurable var to start sshd before cman (1.66 KB, patch)
2009-09-23 11:00 EDT, Fabio Massimo Di Nitto
no flags Details | Diff

  None (edit)
Description Dirk Herrmann 2009-04-08 15:00:28 EDT
Description of problem:

In a clustered environment it is sometimes necessary to influence the start behavior of cman, e.g. reduce the expected votes manually using cman_tool to form a quorate cluster. Therefore a remote access using ssh is necessary. Actually sshd is started after cman, so it is not possible to influence cman startup. Usually I change this manually in the kickstart file for cluster nodes to set the start order number of sshd to the one of cman minus 1.

Actually the following chkconfig orders are implemented:

/etc/init.d/cman:# chkconfig: - 21 79
/etc/init.d/sshd:# chkconfig: 2345 55 25

This should be changed to:

/etc/init.d/cman:# chkconfig: - 21 79
/etc/init.d/sshd:# chkconfig: 2345 20 25

during installation of cman rpm. In a kickstart file I usually do this in this way (perl can be substituted by sed):

cman=`perl -n -e 'print ( $1 - 1 ) if $_  =~ /chkconfig:\s\S+\s(\d+)\s\d+\s/' /etc/init.d/cman`
cman_off=$(expr 100 - $cman )
set $cman
set $cman_off
perl -pi -e "s/chkconfig:\s+(\S+)\s+(\S+)\s+(\S+)/chkconfig: \$1 $cman $cman_off/" /etc/init.d/sshd
chkconfig cman off; chkconfig cman on

I think this would be an improvement and could be implemented per default.

Version-Release number of selected component (if applicable):

How reproducible:


Steps to Reproduce:
Actual results:

Expected results:

Additional info:
Comment 5 Fabio Massimo Di Nitto 2009-09-23 11:00:03 EDT
Created attachment 362314 [details]
allow user configurable var to start sshd before cman

It is not safe or possible to change cman startup position. This is the only safe solution.
Comment 6 Fabio Massimo Di Nitto 2009-09-25 06:58:20 EDT
fix is now in Fedora 12 / rawhide with cman-3.0.3-1
Comment 9 releng-rhel@redhat.com 2009-11-12 02:12:26 EST
Fixed in 'cluster-3.0.3-1.el6'. 'cluster-3.0.4-1.el6' included in compose 'RHEL6.0-20091111.0'.
Moving to ON_QA.
Comment 11 Nate Straz 2010-06-25 16:44:00 EDT
Verified that sshd can be started early when CMAN_SSHD_START is set in /etc/sysconfig/cman.
Comment 15 releng-rhel@redhat.com 2010-11-11 09:34:17 EST
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

Note You need to log in before you can comment on or make changes to this bug.