mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-07-09 19:45:14 +00:00
fix bug #12: check storage availability early (migrate)
This commit is contained in:
parent
8b192abf57
commit
47152e2ee3
2
Makefile
2
Makefile
@ -2,7 +2,7 @@ RELEASE=2.0
|
|||||||
|
|
||||||
VERSION=2.0
|
VERSION=2.0
|
||||||
PACKAGE=qemu-server
|
PACKAGE=qemu-server
|
||||||
PKGREL=33
|
PKGREL=34
|
||||||
|
|
||||||
DESTDIR=
|
DESTDIR=
|
||||||
PREFIX=/usr
|
PREFIX=/usr
|
||||||
|
@ -1633,6 +1633,9 @@ __PACKAGE__->register_method({
|
|||||||
if !$param->{online};
|
if !$param->{online};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
my $storecfg = PVE::Storage::config();
|
||||||
|
PVE::QemuServer::check_storage_availability($storecfg, $conf, "test");
|
||||||
|
|
||||||
if (&$vm_is_ha_managed($vmid) && $rpcenv->{type} ne 'ha') {
|
if (&$vm_is_ha_managed($vmid) && $rpcenv->{type} ne 'ha') {
|
||||||
|
|
||||||
my $hacmd = sub {
|
my $hacmd = sub {
|
||||||
|
@ -1682,6 +1682,25 @@ sub check_local_resources {
|
|||||||
return $loc_res;
|
return $loc_res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# check is used storages are available on all nodes (use by migrate)
|
||||||
|
sub check_storage_availability {
|
||||||
|
my ($storecfg, $conf, $node) = @_;
|
||||||
|
|
||||||
|
foreach_drive($conf, sub {
|
||||||
|
my ($ds, $drive) = @_;
|
||||||
|
|
||||||
|
my $volid = $drive->{file};
|
||||||
|
return if !$volid;
|
||||||
|
|
||||||
|
my ($sid, $volname) = PVE::Storage::parse_volume_id($volid, 1);
|
||||||
|
return if !$sid;
|
||||||
|
|
||||||
|
# check if storage is available on both nodes
|
||||||
|
my $scfg = PVE::Storage::storage_check_node($storecfg, $sid);
|
||||||
|
PVE::Storage::storage_check_node($storecfg, $sid, $node);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
sub check_lock {
|
sub check_lock {
|
||||||
my ($conf) = @_;
|
my ($conf) = @_;
|
||||||
|
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
qemu-server (2.0-34) unstable; urgency=low
|
||||||
|
|
||||||
|
* fix bug #12: check storage availability early (migrate)
|
||||||
|
|
||||||
|
-- Proxmox Support Team <support@proxmox.com> Fri, 30 Mar 2012 09:12:46 +0200
|
||||||
|
|
||||||
qemu-server (2.0-33) unstable; urgency=low
|
qemu-server (2.0-33) unstable; urgency=low
|
||||||
|
|
||||||
* fix bug #121: activate volumes correctly
|
* fix bug #121: activate volumes correctly
|
||||||
|
Loading…
Reference in New Issue
Block a user