[pve-devel] r5728 - pve-access-control/trunk/PVE
svn-commits at proxmox.com
svn-commits at proxmox.com
Mon Mar 21 06:44:22 CET 2011
Author: dietmar
Date: 2011-03-21 06:44:22 +0100 (Mon, 21 Mar 2011)
New Revision: 5728
Modified:
pve-access-control/trunk/PVE/RPCEnvironment.pm
Log:
try to log verbose results
Modified: pve-access-control/trunk/PVE/RPCEnvironment.pm
===================================================================
--- pve-access-control/trunk/PVE/RPCEnvironment.pm 2011-03-18 12:56:36 UTC (rev 5727)
+++ pve-access-control/trunk/PVE/RPCEnvironment.pm 2011-03-21 05:44:22 UTC (rev 5728)
@@ -37,8 +37,19 @@
$msg = $ec ? "failed ($ec)" : "interrupted ($ic)";
$pri = 'err';
}
+ my $tlist= active_workers($upid);
+ PVE::Cluster::broadcast_tasklist($tlist);
+ my $task;
+ foreach my $t (@$tlist) {
+ if ($t->{upid} eq $upid) {
+ $task = $t;
+ last;
+ }
+ }
+ if ($task && $task->{status}) {
+ $msg = $task->{status};
+ }
PVE::Cluster::log_msg($pri, $user, "end task $upid $msg");
- PVE::Cluster::broadcast_tasklist(active_workers($upid));
};
my $worker_reaper = sub {
@@ -327,15 +338,14 @@
&$check_task($task);
}
- if ($new_upid) {
- my $task = $thash->{$new_upid};
- if (!$task) {
- $task = PVE::Tools::upid_decode($new_upid);
- $task->{upid} = $new_upid;
- &$check_task($task);
- }
+ if ($new_upid && !(my $task = $thash->{$new_upid})) {
+ $task = PVE::Tools::upid_decode($new_upid);
+ $task->{upid} = $new_upid;
+ $thash->{$new_upid} = $task;
+ &$check_task($task);
}
+
@ta = sort { $b->{starttime} cmp $a->{starttime} } @ta;
my $save = defined($new_upid);
More information about the pve-devel
mailing list