From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH rrd-migration-tool v2 1/2] collect rrd files: only skip '.old' extension to better handle storage IDs containing a dot
Date: Mon, 4 Aug 2025 14:55:45 +0200 [thread overview]
Message-ID: <20250804125601.91944-2-f.ebner@proxmox.com> (raw)
In-Reply-To: <20250804125601.91944-1-f.ebner@proxmox.com>
Storage IDs may contain a dot, which would make the tool ignore data
for them. This does not fix the issue completely, the final corner
case with storages being called called 'something.old' remains.
A warning for storages called '.old' is added to the pve8to9 checker
script. If enough people really run into this issue with such
storages, the migration script will be improved further after the
release of PVE 9. For now, use a straight-forward stop-gap measure to
avoid the fallout from not handling any storage ID with a dot.
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
Changes in v2:
* Different approach as a less complicated stop-gap measure.
src/main.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main.rs b/src/main.rs
index 9afd48b..e18551c 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -331,7 +331,7 @@ fn collect_rrd_files(location: &PathBuf) -> Result<Vec<(CString, OsString)>> {
contents
.filter(|f| f.is_ok())
.map(|f| f.unwrap().path())
- .filter(|f| f.is_file() && f.extension().is_none())
+ .filter(|f| f.is_file() && f.extension().is_none_or(|ext| ext != "old"))
.for_each(|file| {
let path = CString::new(file.as_path().as_os_str().as_bytes())
.expect("Could not convert path to CString.");
--
2.47.2
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2025-08-04 12:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-04 12:55 [pve-devel] [PATCH rrd-migration-tool/manager v2 0/2] RRD migration: " Fiona Ebner
2025-08-04 12:55 ` Fiona Ebner [this message]
2025-08-04 12:55 ` [pve-devel] [PATCH manager v2 2/2] pve8to9: rrd migration: mention storage RRD files for which automatic migration doesn't work Fiona Ebner
2025-08-04 16:45 ` [pve-devel] applied-series: [PATCH rrd-migration-tool/manager v2 0/2] RRD migration: only skip '.old' extension to better handle storage IDs containing a dot Thomas Lamprecht
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=20250804125601.91944-2-f.ebner@proxmox.com \
--to=f.ebner@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.