Discussion:
[pve-devel] [PATCH qemu-server] fix #1013 : migrate : sync_disk : --targetstorage with offline disk
Alexandre Derumier
2018-12-07 11:03:37 UTC
Permalink
targetsid was not used, for disk unused (offline copy)
---
PVE/QemuMigrate.pm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm
index e9e9075..f422f2e 100644
--- a/PVE/QemuMigrate.pm
+++ b/PVE/QemuMigrate.pm
@@ -446,6 +446,7 @@ sub sync_disks {

foreach my $volid (keys %$local_volumes) {
my ($sid, $volname) = PVE::Storage::parse_volume_id($volid);
+ my $targetsid = $self->{opts}->{targetstorage} ? $self->{opts}->{targetstorage} : $storeid;
if ($self->{running} && $self->{opts}->{targetstorage} && $local_volumes->{$volid}->{ref} eq 'config') {
push @{$self->{online_local_volumes}}, $volid;
} else {
@@ -453,7 +454,7 @@ sub sync_disks {
push @{$self->{volumes}}, $volid;
my $insecure = $self->{opts}->{migration_type} eq 'insecure';
my $with_snapshots = $local_volumes->{$volid}->{snapshots};
- PVE::Storage::storage_migrate($self->{storecfg}, $volid, $self->{ssh_info}, $sid,
+ PVE::Storage::storage_migrate($self->{storecfg}, $volid, $self->{ssh_info}, $targetsid,
undef, undef, undef, undef, $insecure, $with_snapshots);
}
}
--
2.11.0
Thomas Lamprecht
2018-12-10 11:05:35 UTC
Permalink
Post by Alexandre Derumier
targetsid was not used, for disk unused (offline copy)
---
PVE/QemuMigrate.pm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm
index e9e9075..f422f2e 100644
--- a/PVE/QemuMigrate.pm
+++ b/PVE/QemuMigrate.pm
@@ -446,6 +446,7 @@ sub sync_disks {
foreach my $volid (keys %$local_volumes) {
my ($sid, $volname) = PVE::Storage::parse_volume_id($volid);
+ my $targetsid = $self->{opts}->{targetstorage} ? $self->{opts}->{targetstorage} : $storeid;
$storeid is not know/in scope here... did you mean $sid?
Post by Alexandre Derumier
if ($self->{running} && $self->{opts}->{targetstorage} && $local_volumes->{$volid}->{ref} eq 'config') {
} else {
@@ -453,7 +454,7 @@ sub sync_disks {
my $insecure = $self->{opts}->{migration_type} eq 'insecure';
my $with_snapshots = $local_volumes->{$volid}->{snapshots};
- PVE::Storage::storage_migrate($self->{storecfg}, $volid, $self->{ssh_info}, $sid,
+ PVE::Storage::storage_migrate($self->{storecfg}, $volid, $self->{ssh_info}, $targetsid,
undef, undef, undef, undef, $insecure, $with_snapshots);
}
}
Alexandre DERUMIER
2018-12-10 13:38:12 UTC
Permalink
Post by Alexandre Derumier
Post by Thomas Lamprecht
$storeid is not know/in scope here... did you mean $sid?
oh, sorry, wrong copy/paste when I have rebased my patch.
do you want a v2 ?

----- Mail original -----
De: "Thomas Lamprecht" <***@proxmox.com>
À: "pve-devel" <pve-***@pve.proxmox.com>, "aderumier" <***@odiso.com>
Envoyé: Lundi 10 Décembre 2018 12:05:35
Objet: Re: [pve-devel] [PATCH qemu-server] fix #1013 : migrate : sync_disk : --targetstorage with offline disk
Post by Alexandre Derumier
targetsid was not used, for disk unused (offline copy)
---
PVE/QemuMigrate.pm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm
index e9e9075..f422f2e 100644
--- a/PVE/QemuMigrate.pm
+++ b/PVE/QemuMigrate.pm
@@ -446,6 +446,7 @@ sub sync_disks {
foreach my $volid (keys %$local_volumes) {
my ($sid, $volname) = PVE::Storage::parse_volume_id($volid);
+ my $targetsid = $self->{opts}->{targetstorage} ? $self->{opts}->{targetstorage} : $storeid;
$storeid is not know/in scope here... did you mean $sid?
Post by Alexandre Derumier
if ($self->{running} && $self->{opts}->{targetstorage} && $local_volumes->{$volid}->{ref} eq 'config') {
} else {
@@ -453,7 +454,7 @@ sub sync_disks {
my $insecure = $self->{opts}->{migration_type} eq 'insecure';
my $with_snapshots = $local_volumes->{$volid}->{snapshots};
- PVE::Storage::storage_migrate($self->{storecfg}, $volid, $self->{ssh_info}, $sid,
+ PVE::Storage::storage_migrate($self->{storecfg}, $volid, $self->{ssh_info}, $targetsid,
undef, undef, undef, undef, $insecure, $with_snapshots);
}
}
Thomas Lamprecht
2018-12-10 13:53:29 UTC
Permalink
Post by Alexandre DERUMIER
Post by Alexandre Derumier
Post by Thomas Lamprecht
$storeid is not know/in scope here... did you mean $sid?
oh, sorry, wrong copy/paste when I have rebased my patch.
do you want a v2 ?
yes, if you don't mind I'd like one, else I can fix it up naturally
too...

cheers,
Thomas
Post by Alexandre DERUMIER
----- Mail original -----
Envoyé: Lundi 10 Décembre 2018 12:05:35
Objet: Re: [pve-devel] [PATCH qemu-server] fix #1013 : migrate : sync_disk : --targetstorage with offline disk
Post by Alexandre Derumier
targetsid was not used, for disk unused (offline copy)
---
PVE/QemuMigrate.pm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm
index e9e9075..f422f2e 100644
--- a/PVE/QemuMigrate.pm
+++ b/PVE/QemuMigrate.pm
@@ -446,6 +446,7 @@ sub sync_disks {
foreach my $volid (keys %$local_volumes) {
my ($sid, $volname) = PVE::Storage::parse_volume_id($volid);
+ my $targetsid = $self->{opts}->{targetstorage} ? $self->{opts}->{targetstorage} : $storeid;
$storeid is not know/in scope here... did you mean $sid?
Post by Alexandre Derumier
if ($self->{running} && $self->{opts}->{targetstorage} && $local_volumes->{$volid}->{ref} eq 'config') {
} else {
@@ -453,7 +454,7 @@ sub sync_disks {
my $insecure = $self->{opts}->{migration_type} eq 'insecure';
my $with_snapshots = $local_volumes->{$volid}->{snapshots};
- PVE::Storage::storage_migrate($self->{storecfg}, $volid, $self->{ssh_info}, $sid,
+ PVE::Storage::storage_migrate($self->{storecfg}, $volid, $self->{ssh_info}, $targetsid,
undef, undef, undef, undef, $insecure, $with_snapshots);
}
}
Loading...