[pve-devel] [PATCH v3 ha-manager 6/9] Add stop command to simulation

Thomas Lamprecht t.lamprecht at proxmox.com
Fri Oct 4 17:25:43 CEST 2019


On 10/2/19 11:46 AM, Fabian Ebner wrote:
> Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
> ---
>  src/PVE/HA/Sim/Hardware.pm | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/src/PVE/HA/Sim/Hardware.pm b/src/PVE/HA/Sim/Hardware.pm
> index 3cdc85b..121cd1b 100644
> --- a/src/PVE/HA/Sim/Hardware.pm
> +++ b/src/PVE/HA/Sim/Hardware.pm
> @@ -541,6 +541,7 @@ sub get_cfs_state {
>  # restart-lrm <node>
>  # service <sid> <started|disabled|stopped|ignored>
>  # service <sid> <migrate|relocate> <target>
> +# service <sid> stop <timeout>
>  # service <sid> lock/unlock [lockname]
>  
>  sub sim_hardware_cmd {
> @@ -658,6 +659,13 @@ sub sim_hardware_cmd {
>  
>  		$self->queue_crm_commands_nolock("$action $sid $param");
>  
> +	    } elsif ($action eq 'stop') {
> +
> +		die "sim_hardware_cmd: missing timeout for '$action' command"
> +		    if !defined($param);
> +
> +		$self->queue_crm_commands_nolock("$action $sid $param");
> +
>  	    } elsif ($action eq 'add') {
>  
>  		$self->add_service($sid, {state => 'started', node => $param});
> 

squash together with 7/9, no use in separating this




More information about the pve-devel mailing list