From: Dominik Csapak <d.csapak@proxmox.com>
To: Dietmar Maurer <dietmar@proxmox.com>,
Proxmox Backup Server development discussion
<pbs-devel@lists.proxmox.com>
Subject: Re: [pbs-devel] [PATCH proxmox-backup 1/5] tape: handle duplicate label-texts in inventory
Date: Fri, 12 Jan 2024 08:35:46 +0100 [thread overview]
Message-ID: <be39bad5-280a-4520-9025-eb3023c2277e@proxmox.com> (raw)
In-Reply-To: <406216126.2803.1705044558912@webmail.proxmox.com>
On 1/12/24 08:29, Dietmar Maurer wrote:
> I am confused about insert_into_online_set(). We now do not add
> the media to the MtxStatus, although the media is detected, only because there is another tape with the same label?
>
> That is far more confusing than before, isnt it?
but don't actually know which of the one in the inventory it is?
we only have the label and simple chose the first before, but that might be the wrong one...
>
>> +fn insert_into_online_set(inventory: &Inventory, label_text: &str, online_set: &mut HashSet<Uuid>) {
>> + match inventory.find_media_by_label_text(&label_text) {
>> + Ok(Some(media_id)) => {
>> + online_set.insert(media_id.label.uuid.clone());
>> + }
>> + Ok(None) => {}
>> + Err(err) => log::warn!("error getting media by unique label: {err}"),
>> + }
>> +}
>> +
>> /// Extract the list of online media from MtxStatus
>> ///
>> /// Returns a HashSet containing all found media Uuid. This only
>> @@ -96,9 +106,7 @@ pub fn mtx_status_to_online_set(status: &MtxStatus, inventory: &Inventory) -> Ha
>>
next prev parent reply other threads:[~2024-01-12 7:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-11 10:40 [pbs-devel] [PATCH proxmox-backup 0/5] improve duplicate label-text handling Dominik Csapak
2024-01-11 10:40 ` [pbs-devel] [PATCH proxmox-backup 1/5] tape: handle duplicate label-texts in inventory Dominik Csapak
2024-01-12 7:29 ` Dietmar Maurer
2024-01-12 7:35 ` Dominik Csapak [this message]
2024-01-12 8:01 ` Dietmar Maurer
2024-01-12 8:09 ` Dominik Csapak
2024-01-11 10:40 ` [pbs-devel] [PATCH proxmox-backup 2/5] api: tape: optinally accept uuid for destroy/move media Dominik Csapak
2024-01-11 10:40 ` [pbs-devel] [PATCH proxmox-backup 3/5] api: tape: don't allow duplicate media label-texts Dominik Csapak
2024-01-11 10:40 ` [pbs-devel] [PATCH proxmox-backup 4/5] ui: tape inventory: use uuid as id Dominik Csapak
2024-01-11 10:40 ` [pbs-devel] [PATCH proxmox-backup 5/5] ui: tape: add remove media button Dominik Csapak
2024-01-11 10:43 ` [pbs-devel] [PATCH proxmox-backup 0/5] improve duplicate label-text handling Dominik Csapak
2024-01-12 9:27 ` [pbs-devel] applied: " Dietmar Maurer
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=be39bad5-280a-4520-9025-eb3023c2277e@proxmox.com \
--to=d.csapak@proxmox.com \
--cc=dietmar@proxmox.com \
--cc=pbs-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox