From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <c.ebner@proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by lists.proxmox.com (Postfix) with ESMTPS id E1BEDB8DBF
 for <pbs-devel@lists.proxmox.com>; Wed,  6 Dec 2023 15:43:39 +0100 (CET)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id B84203C2A
 for <pbs-devel@lists.proxmox.com>; Wed,  6 Dec 2023 15:43:39 +0100 (CET)
Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com
 [94.136.29.106])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by firstgate.proxmox.com (Proxmox) with ESMTPS
 for <pbs-devel@lists.proxmox.com>; Wed,  6 Dec 2023 15:43:39 +0100 (CET)
Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1])
 by proxmox-new.maurer-it.com (Proxmox) with ESMTP id E1E29425FD
 for <pbs-devel@lists.proxmox.com>; Wed,  6 Dec 2023 15:43:38 +0100 (CET)
Date: Wed, 6 Dec 2023 15:43:38 +0100 (CET)
From: Christian Ebner <c.ebner@proxmox.com>
To: =?UTF-8?Q?Fabian_Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>,
 Proxmox Backup Server development discussion <pbs-devel@lists.proxmox.com>
Message-ID: <309156804.2067.1701873818090@webmail.proxmox.com>
In-Reply-To: <1776013681.1933.1701871754440@webmail.proxmox.com>
References: <20231206113101.139743-1-c.ebner@proxmox.com>
 <1776013681.1933.1701871754440@webmail.proxmox.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Priority: 3
Importance: Normal
X-Mailer: Open-Xchange Mailer v7.10.6-Rev55
X-Originating-Client: open-xchange-appsuite
X-SPAM-LEVEL: Spam detection results:  0
 AWL 0.048 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DMARC_MISSING             0.1 Missing DMARC policy
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
 T_SCC_BODY_TEXT_LINE    -0.01 -
Subject: Re: [pbs-devel] [PATCH v3 proxmox-backup] ui: warn of missing
 gc-schedule, prune/verify jobs
X-BeenThere: pbs-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox Backup Server development discussion
 <pbs-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pbs-devel>, 
 <mailto:pbs-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pbs-devel/>
List-Post: <mailto:pbs-devel@lists.proxmox.com>
List-Help: <mailto:pbs-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel>, 
 <mailto:pbs-devel-request@lists.proxmox.com?subject=subscribe>
X-List-Received-Date: Wed, 06 Dec 2023 14:43:39 -0000

> On 06.12.2023 15:09 CET Fabian Gr=C3=BCnbichler <f.gruenbichler@proxmox.c=
om> wrote:
>=20
>=20
> for all of them there are possible reasons for not having them set up:
> - verify: I trust my storage to protect me against bit rot, and I don't w=
ant to incur the performance penalty of doing a full verification just to e=
nsure logical consistency
> - prune: I only do client-side pruning
> - prune+GC: this is an append-only backup storage, I never want to remove=
 data

True and I am aware of that. That is why I opted for a warning rather than =
showing these as errors. But of course an information might be even more fi=
tting here. But I would like to not hide the not configured states to much,=
 as the main point of adding these, is to inform the user that he might be =
missing something, after all. Maybe I should also add a tool tip to show so=
me explanation for the warning/info when hovered?

>=20
> all of those could be improved of course (logical-verification as a verif=
y mode or new job type, changing the warning to information if a prune acti=
on was done recently, allowing an explicit "append-only" flag that actually=
 disallows pruning, ..)
>=20
> all of them except for GC also don't take namespaces into account, but th=
at might be harder to get right.

Yes, these only cover if the datastore as a whole currently. Another reason=
 why the green check mark might not be so ideal after all. I will have a lo=
ok if I might get the namespace information as well without having to perfo=
rm to much API calls here, as then this status update might produce to much=
 calls for users with many namespaces. Also, I am not sure that this inform=
ation can be compactly displayed except maybe a "there are namespaces witho=
ut jobs configured".

>=20
> there's another source of confusion if I am an unprivileged user - I migh=
t not "see" the jobs that are defined, and get a warning as a result, even =
though everything is okay. that last one *could* be tackled by leaking the =
count, even if not leaking the details, but I am not sure if we want to do =
that ;) for GC at least we could differentiate based on status code and mak=
e the user aware that unknown is for lack of privs.

Hmm, good point. Maybe I should not show the state information (and fetch v=
ia the API) for that job at all if the user has no privileges? Will have a =
look if I can exclude these.

>=20
> I'd also differentiate between "unknown because no request made/no respon=
se retrieved yet" and "unknown because request failed" - the latter case sh=
ould be a "warning" as well (and ideally contain the error at least as tool=
 tip?), and not "missing", except if we can match the failure to missing pr=
ivileges..

Yes, will have a look on improving this as well. Showing the error message =
might be a bit more messy, but the suggested tool tip could be a viable opt=
ion.

Thank you for the feedback!

Cheers,
Chris