* [pve-devel] [PATCH-SERIES rrd-migration-tool 0/2] migrate nodes: fix handling nonexistent nodes
@ 2025-08-01 13:54 Fiona Ebner
2025-08-01 13:54 ` [pve-devel] [PATCH rrd-migration-tool 1/2] d/control: record librust-pretty-assertions-dev build dependency Fiona Ebner
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Fiona Ebner @ 2025-08-01 13:54 UTC (permalink / raw)
To: pve-devel
Use the correct path when skipping a nonexistent node. Before this
series, the presence of a nonexistent node would lead to a failure:
> Error migrating nodes: Not a directory (os error 20)
That is because the path would have a duplicate node name attached,
for example:
> /var/lib/rrdcached/db/pve2-node/nonexistent/nonexistent
Fixing that alone is not enough, there also was a 'continue' missing
to avoid calling do_rrd_migration() with the old node, i.e. to
actually skip it.
Fiona Ebner (2):
d/control: record librust-pretty-assertions-dev build dependency
migrate nodes: fix handling nonexistent nodes
debian/control | 1 +
src/main.rs | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
--
2.47.2
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [pve-devel] [PATCH rrd-migration-tool 1/2] d/control: record librust-pretty-assertions-dev build dependency
2025-08-01 13:54 [pve-devel] [PATCH-SERIES rrd-migration-tool 0/2] migrate nodes: fix handling nonexistent nodes Fiona Ebner
@ 2025-08-01 13:54 ` Fiona Ebner
2025-08-01 13:54 ` [pve-devel] [PATCH rrd-migration-tool 2/2] migrate nodes: fix handling nonexistent nodes Fiona Ebner
2025-08-01 14:52 ` [pve-devel] applied: [PATCH-SERIES rrd-migration-tool 0/2] " Thomas Lamprecht
2 siblings, 0 replies; 4+ messages in thread
From: Fiona Ebner @ 2025-08-01 13:54 UTC (permalink / raw)
To: pve-devel
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
debian/control | 1 +
1 file changed, 1 insertion(+)
diff --git a/debian/control b/debian/control
index c426882..5634344 100644
--- a/debian/control
+++ b/debian/control
@@ -9,6 +9,7 @@ Build-Depends: cargo:native,
librust-libc-0.2+default-dev (>= 0.2.107-~~),
librust-pico-args-0.5+default-dev,
librust-pkg-config-dev,
+ librust-pretty-assertions-dev,
librust-proxmox-async-0.5-dev,
libstd-rust-dev,
rrdtool,
--
2.47.2
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [pve-devel] [PATCH rrd-migration-tool 2/2] migrate nodes: fix handling nonexistent nodes
2025-08-01 13:54 [pve-devel] [PATCH-SERIES rrd-migration-tool 0/2] migrate nodes: fix handling nonexistent nodes Fiona Ebner
2025-08-01 13:54 ` [pve-devel] [PATCH rrd-migration-tool 1/2] d/control: record librust-pretty-assertions-dev build dependency Fiona Ebner
@ 2025-08-01 13:54 ` Fiona Ebner
2025-08-01 14:52 ` [pve-devel] applied: [PATCH-SERIES rrd-migration-tool 0/2] " Thomas Lamprecht
2 siblings, 0 replies; 4+ messages in thread
From: Fiona Ebner @ 2025-08-01 13:54 UTC (permalink / raw)
To: pve-devel
Use the same expression as in the OK(()) branch after the
do_rrd_migration() call. Previously, the presence of a nonexistent
node would lead to a failure:
> Error migrating nodes: Not a directory (os error 20)
That is because the path would have a duplicate node name attached,
for example:
> /var/lib/rrdcached/db/pve2-node/nonexistent/nonexistent
Fixing that alone is not enough, there also was a 'continue' missing
to avoid calling do_rrd_migration() with the old node, i.e. to
actually skip it.
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
src/main.rs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/main.rs b/src/main.rs
index fb58d3a..9afd48b 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -528,10 +528,11 @@ fn migrate_nodes(
if !resource_present(format!("{resources}/.members").as_str(), node.as_str())? {
if migrate {
println!("Node: '{node}' not present. Skip and mark as old.");
- mv_old(format!("{}/{node}", file.0.to_string_lossy()).as_str())?;
+ mv_old(full_path.as_str())?;
} else {
println!("Node: '{node}' not present. Would mark as old, but in dry-run mode, so just skip.");
}
+ continue;
}
match do_rrd_migration(
file,
--
2.47.2
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [pve-devel] applied: [PATCH-SERIES rrd-migration-tool 0/2] migrate nodes: fix handling nonexistent nodes
2025-08-01 13:54 [pve-devel] [PATCH-SERIES rrd-migration-tool 0/2] migrate nodes: fix handling nonexistent nodes Fiona Ebner
2025-08-01 13:54 ` [pve-devel] [PATCH rrd-migration-tool 1/2] d/control: record librust-pretty-assertions-dev build dependency Fiona Ebner
2025-08-01 13:54 ` [pve-devel] [PATCH rrd-migration-tool 2/2] migrate nodes: fix handling nonexistent nodes Fiona Ebner
@ 2025-08-01 14:52 ` Thomas Lamprecht
2 siblings, 0 replies; 4+ messages in thread
From: Thomas Lamprecht @ 2025-08-01 14:52 UTC (permalink / raw)
To: pve-devel, Fiona Ebner
On Fri, 01 Aug 2025 15:54:27 +0200, Fiona Ebner wrote:
> Use the correct path when skipping a nonexistent node. Before this
> series, the presence of a nonexistent node would lead to a failure:
>
> > Error migrating nodes: Not a directory (os error 20)
>
> That is because the path would have a duplicate node name attached,
> for example:
> > /var/lib/rrdcached/db/pve2-node/nonexistent/nonexistent
>
> [...]
Applied, thanks!
[1/2] d/control: record librust-pretty-assertions-dev build dependency
commit: c0a5339286448880276ccb27397d8c914e6b126a
[2/2] migrate nodes: fix handling nonexistent nodes
commit: d0220c7b1911612b7d82b922e1a97b67e87fd8b9
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-08-01 14:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-01 13:54 [pve-devel] [PATCH-SERIES rrd-migration-tool 0/2] migrate nodes: fix handling nonexistent nodes Fiona Ebner
2025-08-01 13:54 ` [pve-devel] [PATCH rrd-migration-tool 1/2] d/control: record librust-pretty-assertions-dev build dependency Fiona Ebner
2025-08-01 13:54 ` [pve-devel] [PATCH rrd-migration-tool 2/2] migrate nodes: fix handling nonexistent nodes Fiona Ebner
2025-08-01 14:52 ` [pve-devel] applied: [PATCH-SERIES rrd-migration-tool 0/2] " Thomas Lamprecht
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox