~freyes/+junk/hacluster-debug-on

« back to all changes in this revision

Viewing changes to hooks/hooks.py

  • Committer: James Page
  • Date: 2013-03-20 09:16:26 UTC
  • mfrom: (14.1.2 hacluster)
  • Revision ID: james.page@canonical.com-20130320091626-wg7fgvh2x4x0otvq
Handle group cleanup a little differently
Updated README

Show diffs side-by-side

added added

removed removed

Lines of Context:
298
298
            # Checks that the resources are running and started.
299
299
            # Ensure that clones are excluded as the resource is
300
300
            # not directly controllable (dealt with below)
 
301
            # Ensure that groups are cleaned up as a whole rather
 
302
            # than as individual resources.
301
303
            if (res_name not in clones.values() and
 
304
                res_name not in groups.values() and
302
305
                not pcmk.crm_res_running(res_name)):
303
306
                # Just in case, cleanup the resources to ensure they get
304
307
                # started in case they failed for some unrelated reason.
310
313
        cmd = 'crm resource cleanup %s' % cl_name
311
314
        pcmk.commit(cmd)
312
315
 
 
316
    for grp_name in groups:
 
317
        # Always cleanup groups
 
318
        cmd = 'crm resource cleanup %s' % grp_name
 
319
        pcmk.commit(cmd)
 
320
 
313
321
    for rel_id in utils.relation_ids('ha'):
314
322
        utils.relation_set(rid=rel_id,
315
323
                           clustered="yes")