]> git.proxmox.com Git - pve-ha-manager.git/commitdiff
fix loop_count
authorDietmar Maurer <dietmar@proxmox.com>
Thu, 4 Dec 2014 10:33:21 +0000 (11:33 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 4 Dec 2014 10:33:21 +0000 (11:33 +0100)
PVE/HA/Env.pm
PVE/HA/SimCluster.pm
PVE/HA/SimEnv.pm

index 18d5beb25c7bc7178fa09216b43f203f910c840b..026aeff98aa6ce55b4db6968f8f15ca2afd8ffda 100644 (file)
@@ -6,7 +6,7 @@ use warnings;
 use PVE::SafeSyslog;
 use PVE::Tools;
 
-# abstract out the cluster environment
+# abstract out the cluster environment for a single node
 
 sub new {
     my ($this, $statusdir, $nodename) = @_;
index ed6423b259475b5b54b52afb0aa7c51df85d7f4f..0b71a9895da92e5523f90382e4f4f57f439b7abd 100644 (file)
@@ -206,6 +206,8 @@ sub run {
                $self->sim_cluster_cmd($cmd);
            }
        }
+
+       ++$self->{loop_count};
     }
 }
  
index 8947bac549385100800917abd376a3a97b3020c8..0656e301019910ad0b5c95c0178a795485ae89be 100644 (file)
@@ -55,8 +55,6 @@ sub new {
     $self->{cur_time} = 0;
     $self->{loop_delay} = 0;
 
-    $self->{loop_count} = 0;
-
     return $self;
 }
 
@@ -304,8 +302,6 @@ sub loop_start_hook {
 sub loop_end_hook {
     my ($self) = @_;
 
-    ++$self->{loop_count};
-
     my $delay = $self->{loop_delay};
     $self->{loop_delay} = 0;