[pve-devel] [PATCH 03/19] disable target storage avaibility for externalcluster (fixme)
Alexandre Derumier
aderumier at odiso.com
Wed Feb 22 14:33:27 CET 2017
need to implement a method to check that remotly. that later in ssh tunnel ?
Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
PVE/API2/Qemu.pm | 2 +-
PVE/QemuMigrate.pm | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index 01d97bc..e6d46ba 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -2804,7 +2804,7 @@ __PACKAGE__->register_method({
}
my $storecfg = PVE::Storage::config();
- PVE::QemuServer::check_storage_availability($storecfg, $conf, $target);
+ PVE::QemuServer::check_storage_availability($storecfg, $conf, $target) if !$param->{externalcluster};
if (PVE::HA::Config::vm_is_ha_managed($vmid) && $rpcenv->{type} ne 'ha') {
diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm
index cd1fc2b..8d1f9e8 100644
--- a/PVE/QemuMigrate.pm
+++ b/PVE/QemuMigrate.pm
@@ -189,7 +189,7 @@ sub prepare {
my $targetsid = $self->{opts}->{targetstorage} ? $self->{opts}->{targetstorage} : $sid;
my $scfg = PVE::Storage::storage_check_node($self->{storecfg}, $sid);
- PVE::Storage::storage_check_node($self->{storecfg}, $targetsid, $self->{node});
+ PVE::Storage::storage_check_node($self->{storecfg}, $targetsid, $self->{node}) if !$self->{opts}->{externalcluster};
if ($scfg->{shared}) {
# PVE::Storage::activate_storage checks this for non-shared storages
@@ -256,7 +256,7 @@ sub sync_disks {
next if @{$dl->{$storeid}} == 0;
# check if storage is available on target node
- PVE::Storage::storage_check_node($self->{storecfg}, $storeid, $self->{node});
+ PVE::Storage::storage_check_node($self->{storecfg}, $storeid, $self->{node}) if !$self->{opts}->{externalcluster};
$sharedvm = 0; # there is a non-shared disk
PVE::Storage::foreach_volid($dl, sub {
--
2.1.4
More information about the pve-devel
mailing list