* [pbs-devel] SPAM: [PATCH proxmox-backup] fix #7242: client: warn on logout if no ticket is found
@ 2026-01-20 15:43 Arthur Bied-Charreton
2026-01-20 16:17 ` [pbs-devel] " Arthur Bied-Charreton
0 siblings, 1 reply; 2+ messages in thread
From: Arthur Bied-Charreton @ 2026-01-20 15:43 UTC (permalink / raw)
To: pbs-devel
From: Arthur Bied-Charreton <a.bied-charreton@proxmox.com>
When running `proxmox-backup-client logout` on a repository that has no
stored credentials, emit a warning instead of silently succeeding.
This can help users identify typos without breaking existing scripts.
Signed-off-by: Arthur Bied-Charreton <arthur@biedcharreton.com>
---
I was not sure about emitting warnings direcly in delete_ticket_info,
but after a look through the code this seems to be done similarly in
other places. Please let me know if I should follow a different pattern
for this kind of warning.
pbs-client/src/http_client.rs | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/pbs-client/src/http_client.rs b/pbs-client/src/http_client.rs
index af53f74e..4730db8d 100644
--- a/pbs-client/src/http_client.rs
+++ b/pbs-client/src/http_client.rs
@@ -237,7 +237,11 @@ pub fn delete_ticket_info(prefix: &str, server: &str, username: &Userid) -> Resu
let mut data = file_get_json(&path, Some(json!({})))?;
if let Some(map) = data[server].as_object_mut() {
- map.remove(username.as_str());
+ if map.remove(username.as_str()).is_none() {
+ warn!("no ticket found for {username} on server {server}");
+ }
+ } else {
+ warn!("no ticket found for server {server}");
}
replace_file(
--
2.47.3
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [pbs-devel] [PATCH proxmox-backup] fix #7242: client: warn on logout if no ticket is found
2026-01-20 15:43 [pbs-devel] SPAM: [PATCH proxmox-backup] fix #7242: client: warn on logout if no ticket is found Arthur Bied-Charreton
@ 2026-01-20 16:17 ` Arthur Bied-Charreton
0 siblings, 0 replies; 2+ messages in thread
From: Arthur Bied-Charreton @ 2026-01-20 16:17 UTC (permalink / raw)
To: Arthur Bied-Charreton; +Cc: pbs-devel
On Tue, Jan 20, 2026 at 04:43:54PM +0100, Arthur Bied-Charreton wrote:
> From: Arthur Bied-Charreton <a.bied-charreton@proxmox.com>
>
> When running `proxmox-backup-client logout` on a repository that has no
> stored credentials, emit a warning instead of silently succeeding.
>
> This can help users identify typos without breaking existing scripts.
>
> Signed-off-by: Arthur Bied-Charreton <arthur@biedcharreton.com>
> ---
Please disregard, sent from wrong email address. v2 sent here:
https://lore.proxmox.com/pbs-devel/20260120160136.164952-2-a.bied-charreton@proxmox.com/T/#u,
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-01-20 16:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-20 15:43 [pbs-devel] SPAM: [PATCH proxmox-backup] fix #7242: client: warn on logout if no ticket is found Arthur Bied-Charreton
2026-01-20 16:17 ` [pbs-devel] " Arthur Bied-Charreton
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.