[pve-devel] applied: [PATCH common 4/4] restenv: catch broadcast_tasklist errors gracefully
Fabian Grünbichler
f.gruenbichler at proxmox.com
Fri Aug 18 11:09:31 CEST 2017
On Tue, Jul 25, 2017 at 03:32:23PM +0200, Thomas Lamprecht wrote:
> Don't die because the tasklist could not be broadcasted, just log the
> error.
> Else we may hinder all task to run with a quite confusing error (i.e.
> "ipcc_send_rec: file to big").
>
> This may happen if there are a lot currently running tasks at once.
>
> Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
> ---
> src/PVE/RESTEnvironment.pm | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/src/PVE/RESTEnvironment.pm b/src/PVE/RESTEnvironment.pm
> index 06270d2..c423520 100644
> --- a/src/PVE/RESTEnvironment.pm
> +++ b/src/PVE/RESTEnvironment.pm
> @@ -48,7 +48,8 @@ my $log_task_result = sub {
> }
>
> my $tlist = $rest_env->active_workers($upid);
> - $rest_env->broadcast_tasklist($tlist);
> + eval { $rest_env->broadcast_tasklist($tlist); };
> + syslog('err', $@) if $@;
>
> my $task;
> foreach my $t (@$tlist) {
> @@ -562,7 +563,8 @@ sub fork_worker {
> $self->log_cluster_msg('info', $user, "starting task $upid");
>
> my $tlist = $self->active_workers($upid, $sync);
> - $self->broadcast_tasklist($tlist);
> + eval { $self->broadcast_tasklist($tlist); };
> + syslog('err', $@) if $@;
>
> my $res = 0;
>
> --
> 2.11.0
>
>
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
More information about the pve-devel
mailing list