From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH container 1/2] migrate: improve target storage checks
Date: Fri, 11 Feb 2022 11:29:44 +0100 [thread overview]
Message-ID: <20220211102945.3220096-2-f.gruenbichler@proxmox.com> (raw)
In-Reply-To: <20220211102945.3220096-1-f.gruenbichler@proxmox.com>
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
src/PVE/API2/LXC.pm | 2 +-
src/PVE/LXC/Migrate.pm | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/PVE/API2/LXC.pm b/src/PVE/API2/LXC.pm
index 37db841..84712f7 100644
--- a/src/PVE/API2/LXC.pm
+++ b/src/PVE/API2/LXC.pm
@@ -1162,7 +1162,7 @@ __PACKAGE__->register_method({
if (my $targetstorage = delete $param->{'target-storage'}) {
my $storecfg = PVE::Storage::config();
my $storagemap = eval { PVE::JSONSchema::parse_idmap($targetstorage, 'pve-storage-id') };
- raise_param_exc({ targetstorage => "failed to parse storage map: $@" })
+ raise_param_exc({ 'target-storage' => "failed to parse storage map: $@" })
if $@;
$rpcenv->check_vm_perm($authuser, $vmid, undef, ['VM.Config.Disk'])
diff --git a/src/PVE/LXC/Migrate.pm b/src/PVE/LXC/Migrate.pm
index c85a09c..1739c78 100644
--- a/src/PVE/LXC/Migrate.pm
+++ b/src/PVE/LXC/Migrate.pm
@@ -211,10 +211,10 @@ sub phase1 {
# check if storage is available on target node
my $targetsid = PVE::JSONSchema::map_id($self->{opts}->{storagemap}, $storeid);
- PVE::Storage::storage_check_enabled($self->{storecfg}, $targetsid, $self->{node});
+ my $target_scfg = PVE::Storage::storage_check_enabled($self->{storecfg}, $targetsid, $self->{node});
- die "content type 'rootdir' is not available on storage '$storeid'\n"
- if !$scfg->{content}->{rootdir};
+ die "content type 'rootdir' is not available on storage '$targetsid'\n"
+ if !$target_scfg->{content}->{rootdir};
PVE::Storage::foreach_volid($dl, sub {
my ($volid, $sid, $volname) = @_;
--
2.30.2
next prev parent reply other threads:[~2022-02-11 10:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-11 10:29 [pve-devel] [PATCH container 0/2] 'target-storage' follow-ups Fabian Grünbichler
2022-02-11 10:29 ` Fabian Grünbichler [this message]
2022-02-11 10:29 ` [pve-devel] [PATCH container 2/2] migrate: allow renaming of volumes Fabian Grünbichler
2022-02-11 11:33 ` [pve-devel] [PATCH container 0/2] 'target-storage' follow-ups Fabian Ebner
2022-02-11 15:17 ` [pve-devel] applied-series: " 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=20220211102945.3220096-2-f.gruenbichler@proxmox.com \
--to=f.gruenbichler@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.