* [pve-devel] [PATCH manager] status: influxdb: suppress warning when no token exists
@ 2021-12-20 12:43 Dominik Csapak
2021-12-21 14:45 ` [pve-devel] applied: " Thomas Lamprecht
0 siblings, 1 reply; 2+ messages in thread
From: Dominik Csapak @ 2021-12-20 12:43 UTC (permalink / raw)
To: pve-devel
in get_credentials, we try to read the token for the specified server,
and warn if we cannot do that (e.g. because the file does not exist)
since having no token is a valid configuration, suppress that warning on
connection.
reported by a forum-user:
https://forum.proxmox.com/threads/interface-comes-up-with-all-question-marks.83287/page-2#post-438204
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
alternatively, we could create an empty file on creation, but this does
not fix existing installations.
PVE/Status/InfluxDB.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/PVE/Status/InfluxDB.pm b/PVE/Status/InfluxDB.pm
index cb788c4e..def7e2fd 100644
--- a/PVE/Status/InfluxDB.pm
+++ b/PVE/Status/InfluxDB.pm
@@ -225,7 +225,7 @@ sub _connect {
return $socket;
} elsif ($proto =~ m/^https?$/) {
- my $token = get_credentials($id);
+ my $token = get_credentials($id, 1);
my $org = $cfg->{organization} // 'proxmox';
my $bucket = $cfg->{bucket} // 'proxmox';
my $url = _get_v2url($cfg, "write?org=${org}&bucket=${bucket}");
--
2.30.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* [pve-devel] applied: Re: [PATCH manager] status: influxdb: suppress warning when no token exists
2021-12-20 12:43 [pve-devel] [PATCH manager] status: influxdb: suppress warning when no token exists Dominik Csapak
@ 2021-12-21 14:45 ` Thomas Lamprecht
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2021-12-21 14:45 UTC (permalink / raw)
To: Proxmox VE development discussion, Dominik Csapak
On 20/12/2021 13:43, Dominik Csapak wrote:
> in get_credentials, we try to read the token for the specified server,
> and warn if we cannot do that (e.g. because the file does not exist)
>
> since having no token is a valid configuration, suppress that warning on
> connection.
>
> reported by a forum-user:
> https://forum.proxmox.com/threads/interface-comes-up-with-all-question-marks.83287/page-2#post-438204
>
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> alternatively, we could create an empty file on creation, but this does
> not fix existing installations.
>
> PVE/Status/InfluxDB.pm | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>
applied, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-12-21 14:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-20 12:43 [pve-devel] [PATCH manager] status: influxdb: suppress warning when no token exists Dominik Csapak
2021-12-21 14:45 ` [pve-devel] applied: " Thomas Lamprecht
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox