]> oss.titaniummirror.com Git - ovzbpc.git/commitdiff
BackupPC_ovz: report entry to more functions in debug master
authorR. Steve McKown <rsmckown@gmail.com>
Mon, 9 Dec 2013 16:09:46 +0000 (09:09 -0700)
committerR. Steve McKown <rsmckown@gmail.com>
Mon, 9 Dec 2013 16:16:38 +0000 (09:16 -0700)
BackupPC_ovz

index c6ef4bf200f1bade9170b69d76b1790262f01e67..38e888ac0016e6e96afbde72c0bc3ffa9e6562a8 100755 (executable)
@@ -88,6 +88,8 @@ sub refreshConfig()
   # Write the VEs on all HNs to a config file on the BackupPC server for
   # later use.
   my @HNS = ();
+
+  print $dbgf ": refreshConfig\n";
   open my $cfg, "<$hnlistFile" || mydie "Cannot read $hnlistFile";
   while (<$cfg>) {
     chomp;
@@ -273,6 +275,7 @@ sub printVeEntry($)
 sub delSnapshot($)
 {
   my ($ve) = @_;
+  print $dbgf ": delSnapshot\n";
   mydie "No VE record for delSnapshot" if (!defined($ve));
 
   #print "delSnapshot: doing nothing for now\n";
@@ -426,6 +429,7 @@ sub restoreConfigs($)
 
 sub checkRunningClient()
 {
+  print $dbgf ": checkRunningClient, vzsnap=$vzsnap\n";
   mydie "A backup or restore operation are already in progress"
     if (Proc::PID::File->running({ dir => '/tmp', verify => 1 }));
 
@@ -463,6 +467,7 @@ sub runPing()
   my $host = shift(@ARGV);
   my $cmd = join(' ', @ARGV);
 
+  print $dbgf ": runPing host=$host, cmd=$cmd\n";
   # Find $host in the list of VEs
   loadVeList();
   my $hostname = gethostbyaddr(gethostbyname($host), AF_INET);
@@ -482,6 +487,7 @@ sub runClient($)
 {
   my ($restore) = @_;
 
+  print $dbgf ": runClient restore=$restore\n";
   checkRunningClient();
 
   my $veid = shift(@ARGV);
@@ -517,6 +523,8 @@ sub runClient($)
     # Remove snapshot, we're done
     delSnapshot($ve);
 
+    print $dbgf ": runClient complete\n";
+
     # Pass the return code back
     #exit $ret; FIXME: currently, cmdSystemOrEval doesn't return a retcode.
     exit 0;
@@ -534,8 +542,9 @@ sub runClient($)
 sub runServer($)
 {
   my ($restore) = @_;
-
   my $host = shift(@ARGV);
+
+  print $dbgf ": runServer restore=$restore, host=$host\n";
   mydie "Hostname argument required" if (!defined($host));
   mydie "No command to execute after hostname" if ($#ARGV < 0);