* [pve-devel] [PATCH container] api: clone: improve error message
@ 2026-01-23 10:04 Fiona Ebner
2026-01-23 13:31 ` Thomas Lamprecht
0 siblings, 1 reply; 2+ messages in thread
From: Fiona Ebner @ 2026-01-23 10:04 UTC (permalink / raw)
To: pve-devel
The old message suggests that the container doesn't have any
snapshots, which might not be true. While at it, improve the style by
avoiding the multi-line post-if.
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
src/PVE/API2/LXC.pm | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm
index 3d74f71..7841215 100644
--- a/src/PVE/API2/LXC.pm
+++ b/src/PVE/API2/LXC.pm
@@ -2039,9 +2039,10 @@ __PACKAGE__->register_method({
$rpcenv->check($authuser, "/storage/$sid", ['Datastore.AllocateSpace']);
if ($full) {
- die
- "Cannot do full clones on a running container without snapshots\n"
- if $running && !defined($snapname);
+ if ($running && !defined($snapname)) {
+ die "Full clone of a running container is only possible from a"
+ . " snapshot\n";
+ }
$fullclone->{$opt} = 1;
} else {
# not full means clone instead of copy
--
2.47.3
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [pve-devel] [PATCH container] api: clone: improve error message
2026-01-23 10:04 [pve-devel] [PATCH container] api: clone: improve error message Fiona Ebner
@ 2026-01-23 13:31 ` Thomas Lamprecht
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2026-01-23 13:31 UTC (permalink / raw)
To: pve-devel, Fiona Ebner
On Fri, 23 Jan 2026 11:04:29 +0100, Fiona Ebner wrote:
> The old message suggests that the container doesn't have any
> snapshots, which might not be true. While at it, improve the style by
> avoiding the multi-line post-if.
>
>
Applied, thanks!
[1/1] api: clone: improve error message
commit: 2682d64017e3a47831a9cbb4238c1833d5cecf7a
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-01-23 13:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-23 10:04 [pve-devel] [PATCH container] api: clone: improve error message Fiona Ebner
2026-01-23 13:31 ` Thomas Lamprecht
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox