* [pve-devel] [PATCH v2 manager] cli: tasks: don't treat warning status as an error status
@ 2021-07-02 10:35 Fabian Ebner
2021-07-02 10:59 ` [pve-devel] applied: " Thomas Lamprecht
0 siblings, 1 reply; 2+ messages in thread
From: Fabian Ebner @ 2021-07-02 10:35 UTC (permalink / raw)
To: pve-devel
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
---
Changes from v1:
* Drop already applied patches.
* Drop change to exclude warnings in 'tasks' API call when
errors=1. One could argue that warnings are not real errors, but
in PBS, warnings are also included if errors=1, so keep it
consistent with that.
PVE/CLI/pvenode.pm | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/PVE/CLI/pvenode.pm b/PVE/CLI/pvenode.pm
index acd573f0..acef6c3b 100644
--- a/PVE/CLI/pvenode.pm
+++ b/PVE/CLI/pvenode.pm
@@ -181,7 +181,10 @@ our $cmddef = {
foreach my $task (@$data) {
if (!defined($task->{status})) {
$task->{status} = 'UNKNOWN';
- } elsif ($task->{status} ne 'OK' && $task->{status} ne 'RUNNING') {
+ # RUNNING is set by the API call and needs to be checked explicitly
+ } elsif (PVE::Tools::upid_status_is_error($task->{status}) &&
+ $task->{status} ne 'RUNNING')
+ {
$task->{status} = 'ERROR';
}
}
--
2.30.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* [pve-devel] applied: [PATCH v2 manager] cli: tasks: don't treat warning status as an error status
2021-07-02 10:35 [pve-devel] [PATCH v2 manager] cli: tasks: don't treat warning status as an error status Fabian Ebner
@ 2021-07-02 10:59 ` Thomas Lamprecht
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2021-07-02 10:59 UTC (permalink / raw)
To: Proxmox VE development discussion, Fabian Ebner
On 02.07.21 12:35, Fabian Ebner wrote:
> Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
> ---
>
> Changes from v1:
> * Drop already applied patches.
> * Drop change to exclude warnings in 'tasks' API call when
> errors=1. One could argue that warnings are not real errors, but
> in PBS, warnings are also included if errors=1, so keep it
> consistent with that.
>
> PVE/CLI/pvenode.pm | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
>
applied, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-07-02 11:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-02 10:35 [pve-devel] [PATCH v2 manager] cli: tasks: don't treat warning status as an error status Fabian Ebner
2021-07-02 10:59 ` [pve-devel] applied: " Thomas Lamprecht
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal