From: Fabian Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com, l.stechauner@proxmox.com
Subject: Re: [pve-devel] [PATCH manager] fix #3440: influxdb: remove duplicate vmid tag
Date: Wed, 26 May 2021 09:46:02 +0200 [thread overview]
Message-ID: <401e9c7d-d69a-7827-1aa3-1147aa31122f@proxmox.com> (raw)
In-Reply-To: <20210525132717.108343-1-l.stechauner@proxmox.com>
Am 25.05.21 um 15:27 schrieb Lorenz Stechauner:
> remove vmid from data part, it is already contained in object part.
>
> Signed-off-by: Lorenz Stechauner <l.stechauner@proxmox.com>
> ---
> Tested with local udp listener. works as expected.
>
> PVE/Status/InfluxDB.pm | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/PVE/Status/InfluxDB.pm b/PVE/Status/InfluxDB.pm
> index 9e4b0d96..c50aa9c8 100644
> --- a/PVE/Status/InfluxDB.pm
> +++ b/PVE/Status/InfluxDB.pm
> @@ -94,6 +94,8 @@ sub update_qemu_status {
> }
> $object =~ s/\s/\\ /g;
>
> + # Duplicate keys may result in unwanted behavior
> + delete $data->{vmid};
Note that this modifies $data for the caller as well, because it's a
hash reference. Might not be a problem here (didn't check), but such
things can lead to subtle (future) errors, so maybe there's a better
alternative?
> build_influxdb_payload($class, $txn, $data, $ctime, $object);
> }
>
> @@ -108,6 +110,8 @@ sub update_lxc_status {
> }
> $object =~ s/\s/\\ /g;
>
> + # Duplicate keys may result in unwanted behavior
> + delete $data->{vmid};
> build_influxdb_payload($class, $txn, $data, $ctime, $object);
> }
>
>
prev parent reply other threads:[~2021-05-26 7:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-25 13:27 Lorenz Stechauner
2021-05-26 7:46 ` Fabian Ebner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=401e9c7d-d69a-7827-1aa3-1147aa31122f@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=l.stechauner@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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