~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/lib/mtr_process.pl

  • Committer: Brian Aker
  • Date: 2009-01-27 01:43:42 UTC
  • Revision ID: brian@tangent.org-20090127014342-v67nfu8fikpapdfs
Cleanup to confirm shutdown of scheduler

Show diffs side-by-side

added added

removed removed

Lines of Context:
374
374
    $srv->{'pid'}= 0; # Assume we are done with it
375
375
  }
376
376
 
377
 
  if ( ! $::opt_skip_ndbcluster )
378
 
  {
379
 
 
380
 
    foreach my $cluster (@{$::clusters})
381
 
    {
382
 
 
383
 
      # Don't shut down a "running" cluster
384
 
      next if $cluster->{'use_running'};
385
 
 
386
 
      mtr_debug("  - cluster " .
387
 
                "(pid: $cluster->{pid}; " .
388
 
                "pid file: '$cluster->{path_pid})");
389
 
 
390
 
      my $pid= mtr_ndbmgm_start($cluster, "shutdown");
391
 
 
392
 
      # Save the pid of the ndb_mgm process
393
 
      $admin_pids{$pid}= 1;
394
 
 
395
 
      push(@kill_pids,{
396
 
                       pid      => $cluster->{'pid'},
397
 
                       pidfile  => $cluster->{'path_pid'}
398
 
                      });
399
 
 
400
 
      $cluster->{'pid'}= 0; # Assume we are done with it
401
 
 
402
 
      foreach my $ndbd (@{$cluster->{'ndbds'}})
403
 
      {
404
 
        mtr_debug("    - ndbd " .
405
 
                  "(pid: $ndbd->{pid}; " .
406
 
                  "pid file: '$ndbd->{path_pid})");
407
 
 
408
 
        push(@kill_pids,{
409
 
                         pid      => $ndbd->{'pid'},
410
 
                         pidfile  => $ndbd->{'path_pid'},
411
 
                        });
412
 
        $ndbd->{'pid'}= 0; # Assume we are done with it
413
 
      }
414
 
    }
415
 
  }
416
 
 
417
377
  # Wait for all the admin processes to complete
418
378
  mtr_wait_blocking(\%admin_pids);
419
379