]> git.proxmox.com Git - pve-access-control.git/commitdiff
fix bug in fork_worker
authorDietmar Maurer <dietmar@proxmox.com>
Tue, 11 Oct 2011 06:37:32 +0000 (08:37 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 11 Oct 2011 06:37:32 +0000 (08:37 +0200)
Makefile
PVE/RPCEnvironment.pm
changelog.Debian

index 2345ecf498990ed0eb5e1b7c1fb8078033f84a24..71c1306cc1cffec7abdd30df98d9168ad879b5bd 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@ RELEASE=2.0
 
 VERSION=1.0
 PACKAGE=libpve-access-control
-PKGREL=1
+PKGREL=2
 
 DESTDIR=
 PREFIX=/usr
index dbfd0fdd578434a1164ae5ed0a0907231579ce63..1bdd0fc4d27abf349b43c218a735dcdbd206b888 100644 (file)
@@ -316,8 +316,10 @@ sub get_user {
 # read/update list of active workers 
 # we move all finished tasks to the archive index,
 # but keep aktive and most recent task in the active file.
+# $nocheck ... consider $new_upid still running (avoid that
+# we try to read the reult to early.
 sub active_workers  {
-    my ($new_upid) = @_;
+    my ($new_upid, $nocheck) = @_;
 
     my $lkfn = "/var/log/pve/tasks/.active.lock";
 
@@ -354,7 +356,7 @@ sub active_workers  {
            $task = PVE::Tools::upid_decode($new_upid);
            $task->{upid} = $new_upid;
            $thash->{$new_upid} = $task;
-           &$check_task($task);
+           &$check_task($task) if !$nocheck;
        }
 
 
@@ -639,7 +641,7 @@ sub fork_worker {
 
     PVE::Cluster::log_msg('info', $user, "starting task $upid");
 
-    my $tlist = active_workers($upid);
+    my $tlist = active_workers($upid, $sync);
     PVE::Cluster::broadcast_tasklist($tlist);
    
     my $res = 0;
index ede7a97b548215186b7eaf289a306be0abb1d585..232fe48dac93cfab6deb057c5f32c595bbcabd6a 100644 (file)
@@ -1,3 +1,9 @@
+libpve-access-control (1.0-2) unstable; urgency=low
+
+  * fix bug in fork_worker
+
+ -- Proxmox Support Team <support@proxmox.com>  Tue, 11 Oct 2011 08:37:05 +0200
+
 libpve-access-control (1.0-1) unstable; urgency=low
 
   * allow '-' in permission paths