HomeClusterLabs Projects

Low: CTDB: Use 'chmod' instead of 'ctdb enablescript' (bnc#697152)

Description

Low: CTDB: Use 'chmod' instead of 'ctdb enablescript' (bnc#697152)

The CTDB resource agent currently goes through the following process in
ctdb_start():

  • execute /usr/sbin/ctdbd to start the ctdb daemon
  • await completion of recovery by monitoring "ctdb status" output
  • run disable_event_scripts() on successful completion of recovery
    • run "ctdb enablescript 50.samba" if CTDB_MANAGES_SAMBA=yes was configured
    • disable other scripts with "ctdb disablescript <script>"

The problem is that by the time "ctdb enablescript 50.samba" is run,
ctdbd has already completed recovery and triggered the "startup" event
for all event scripts, therefore only monitoring is performed.

This change ensures the relevant scripts are enabled/disabled prior to
ctdbd starting.

Signed-off-by: Tim Serong <tserong@novell.com>

Details

Provenance
Tim Serong <tserong@novell.com>Authored on Jun 7 2011, 5:35 AM
Parents
rR67205f21cf1f: build: fix shell scripting
Branches
Unknown
Tags
Unknown

Event Timeline