Fix the chicken and egg problem with ctdb/samba and a registry smb.conf
authorAndrew Tridgell <tridge@samba.org>
Wed, 14 May 2008 10:57:04 +0000 (20:57 +1000)
committerAndrew Tridgell <tridge@samba.org>
Wed, 14 May 2008 10:57:04 +0000 (20:57 +1000)
commite3cdb8f2be6a44ec877efcd75c7297edb008a80b
tree28a2ef768cc3dc70aa845f94fca3b8025ecc8bc2
parentb616961c16667328a81efa00a1c880efa4e791f1
Fix the chicken and egg problem with ctdb/samba and a registry smb.conf

This attempts to fix the problem of ctdb event scripts blocking due to
attempted access to the ctdb databases during recovery. The changes are:

  - now only the 'shutdown' and 'startrecovery' events can be called
    with the databases locked in recovery. The event scripts must ensure
    that for these two events no database access is attempted

  - the recovered, takeip and releaseip events could previously be called
    inside a recovery. The code now ensures that this doesn't happen, delaying
    the events till after recovery has finished

  - the 50.samba event script now avoids using testparm unless it is really
    needed

This needs extensive testing.
config/events.d/50.samba
config/events.d/README
server/ctdb_recoverd.c
server/eventscript.c