From 5bf71a968e93e7d6e1c00257ff116f050f8493cd Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Tue, 11 Oct 2011 08:37:32 +0200 Subject: [PATCH] fix bug in fork_worker --- Makefile | 2 +- PVE/RPCEnvironment.pm | 8 +++++--- changelog.Debian | 6 ++++++ 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 2345ecf..71c1306 100644 --- 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 diff --git a/PVE/RPCEnvironment.pm b/PVE/RPCEnvironment.pm index dbfd0fd..1bdd0fc 100644 --- a/PVE/RPCEnvironment.pm +++ b/PVE/RPCEnvironment.pm @@ -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; diff --git a/changelog.Debian b/changelog.Debian index ede7a97..232fe48 100644 --- a/changelog.Debian +++ b/changelog.Debian @@ -1,3 +1,9 @@ +libpve-access-control (1.0-2) unstable; urgency=low + + * fix bug in fork_worker + + -- Proxmox Support Team Tue, 11 Oct 2011 08:37:05 +0200 + libpve-access-control (1.0-1) unstable; urgency=low * allow '-' in permission paths -- 2.39.2