mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-05-01 21:01:25 +00:00
depend on pve-ha-manager
This commit is contained in:
parent
a1b7d57901
commit
2003f0f85b
@ -20,6 +20,7 @@ use PVE::AccessControl;
|
|||||||
use PVE::INotify;
|
use PVE::INotify;
|
||||||
use PVE::Network;
|
use PVE::Network;
|
||||||
use PVE::API2::Firewall::VM;
|
use PVE::API2::Firewall::VM;
|
||||||
|
use PVE::HA::Config;
|
||||||
|
|
||||||
use Data::Dumper; # fixme: remove
|
use Data::Dumper; # fixme: remove
|
||||||
|
|
||||||
@ -1527,7 +1528,7 @@ __PACKAGE__->register_method({
|
|||||||
my $vmstatus = PVE::QemuServer::vmstatus($param->{vmid}, 1);
|
my $vmstatus = PVE::QemuServer::vmstatus($param->{vmid}, 1);
|
||||||
my $status = $vmstatus->{$param->{vmid}};
|
my $status = $vmstatus->{$param->{vmid}};
|
||||||
|
|
||||||
$status->{ha} = PVE::Cluster::vm_is_ha_managed($param->{vmid});
|
$status->{ha} = PVE::HA::Config::vm_is_ha_managed($param->{vmid});
|
||||||
|
|
||||||
$status->{spice} = 1 if PVE::QemuServer::vga_conf_has_spice($conf->{vga});
|
$status->{spice} = 1 if PVE::QemuServer::vga_conf_has_spice($conf->{vga});
|
||||||
|
|
||||||
@ -1594,7 +1595,7 @@ __PACKAGE__->register_method({
|
|||||||
|
|
||||||
my $storecfg = PVE::Storage::config();
|
my $storecfg = PVE::Storage::config();
|
||||||
|
|
||||||
if (PVE::Cluster::vm_is_ha_managed($vmid) && !$stateuri &&
|
if (PVE::HA::Config::vm_is_ha_managed($vmid) && !$stateuri &&
|
||||||
$rpcenv->{type} ne 'ha') {
|
$rpcenv->{type} ne 'ha') {
|
||||||
|
|
||||||
my $hacmd = sub {
|
my $hacmd = sub {
|
||||||
@ -1602,7 +1603,7 @@ __PACKAGE__->register_method({
|
|||||||
|
|
||||||
my $service = "pvevm:$vmid";
|
my $service = "pvevm:$vmid";
|
||||||
|
|
||||||
my $cmd = ['clusvcadm', '-e', $service, '-m', $node];
|
my $cmd = ['ha-manager', 'enable', $service];
|
||||||
|
|
||||||
print "Executing HA start for VM $vmid\n";
|
print "Executing HA start for VM $vmid\n";
|
||||||
|
|
||||||
@ -1690,14 +1691,14 @@ __PACKAGE__->register_method({
|
|||||||
|
|
||||||
my $storecfg = PVE::Storage::config();
|
my $storecfg = PVE::Storage::config();
|
||||||
|
|
||||||
if (PVE::Cluster::vm_is_ha_managed($vmid) && ($rpcenv->{type} ne 'ha') && !defined($migratedfrom)) {
|
if (PVE::HA::Config::vm_is_ha_managed($vmid) && ($rpcenv->{type} ne 'ha') && !defined($migratedfrom)) {
|
||||||
|
|
||||||
my $hacmd = sub {
|
my $hacmd = sub {
|
||||||
my $upid = shift;
|
my $upid = shift;
|
||||||
|
|
||||||
my $service = "pvevm:$vmid";
|
my $service = "pvevm:$vmid";
|
||||||
|
|
||||||
my $cmd = ['clusvcadm', '-d', $service];
|
my $cmd = ['ha-manager', 'disable', $service];
|
||||||
|
|
||||||
print "Executing HA stop for VM $vmid\n";
|
print "Executing HA stop for VM $vmid\n";
|
||||||
|
|
||||||
@ -2562,14 +2563,14 @@ __PACKAGE__->register_method({
|
|||||||
my $storecfg = PVE::Storage::config();
|
my $storecfg = PVE::Storage::config();
|
||||||
PVE::QemuServer::check_storage_availability($storecfg, $conf, $target);
|
PVE::QemuServer::check_storage_availability($storecfg, $conf, $target);
|
||||||
|
|
||||||
if (PVE::Cluster::vm_is_ha_managed($vmid) && $rpcenv->{type} ne 'ha') {
|
if (PVE::HA::Config::vm_is_ha_managed($vmid) && $rpcenv->{type} ne 'ha') {
|
||||||
|
|
||||||
my $hacmd = sub {
|
my $hacmd = sub {
|
||||||
my $upid = shift;
|
my $upid = shift;
|
||||||
|
|
||||||
my $service = "pvevm:$vmid";
|
my $service = "pvevm:$vmid";
|
||||||
|
|
||||||
my $cmd = ['clusvcadm', '-M', $service, '-m', $target];
|
my $cmd = ['ha-manager', 'migrate', $service, $target];
|
||||||
|
|
||||||
print "Executing HA migrate for VM $vmid to node $target\n";
|
print "Executing HA migrate for VM $vmid to node $target\n";
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ Version: @@VERSION@@-@@PKGRELEASE@@
|
|||||||
Section: admin
|
Section: admin
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Architecture: @@ARCH@@
|
Architecture: @@ARCH@@
|
||||||
Depends: libc6 (>= 2.7-18), perl (>= 5.10.0-19), libterm-readline-gnu-perl, pve-qemu-kvm (>= 2.2-1), netcat-traditional, libpve-access-control, libpve-storage-perl, pve-cluster, libjson-perl, libjson-xs-perl, libio-multiplex-perl, libnet-ssleay-perl, socat, pve-firewall, libuuid-perl
|
Depends: libc6 (>= 2.7-18), perl (>= 5.10.0-19), libterm-readline-gnu-perl, pve-qemu-kvm (>= 2.2-1), netcat-traditional, libpve-access-control, libpve-storage-perl, pve-cluster, libjson-perl, libjson-xs-perl, libio-multiplex-perl, libnet-ssleay-perl, socat, pve-firewall, libuuid-perl, pve-ha-manager
|
||||||
Conflicts: netcat-openbsd
|
Conflicts: netcat-openbsd
|
||||||
Maintainer: Proxmox Support Team <support@proxmox.com>
|
Maintainer: Proxmox Support Team <support@proxmox.com>
|
||||||
Description: Qemu Server Tools
|
Description: Qemu Server Tools
|
||||||
|
Loading…
Reference in New Issue
Block a user