[pve-devel] [PATCH ha-manager v2 1/2] add possibility to simulate locks from services
Dietmar Maurer
dietmar at proxmox.com
Tue Sep 13 07:39:57 CEST 2016
> diff --git a/src/PVE/HA/Sim/Resources.pm b/src/PVE/HA/Sim/Resources.pm
> index 25b034e..ec3d775 100644
> --- a/src/PVE/HA/Sim/Resources.pm
> +++ b/src/PVE/HA/Sim/Resources.pm
> @@ -42,6 +42,11 @@ sub start {
> my $hardware = $haenv->hardware();
> my $ss = $hardware->read_service_status($nodename);
>
> + if ($hardware->service_has_lock("$service_type:$id")) {
> + $haenv->log('err', "service '$service_type:$id' locked, unable to start!");
First, I would at least log the lock type.
Second, maybe we can make this more generic:
$resource_plugin->check_service_is_relocatable($haenv, $id)
More information about the pve-devel
mailing list