[pve-devel] [PATCH ha-manager v2 1/2] add 'no_start' flag for resources

Thomas Lamprecht t.lamprecht at proxmox.com
Thu Nov 3 17:17:50 CET 2016


On 11/03/2016 05:11 PM, Dietmar Maurer wrote:
> question below
>
>> diff --git a/src/PVE/HA/LRM.pm b/src/PVE/HA/LRM.pm
>> index 26c5c89..db73137 100644
>> --- a/src/PVE/HA/LRM.pm
>> +++ b/src/PVE/HA/LRM.pm
>> @@ -673,6 +673,8 @@ sub exec_resource_agent {
>>   
>>   	return SUCCESS if $running;
>>   
>> +	return SUCCESS if $service_config->{no_start};
>> +
>>   	$haenv->log("info", "starting service $sid");
>>   
>>   	$plugin->start($haenv, $id);
>> @@ -691,6 +693,8 @@ sub exec_resource_agent {
>>   
>>   	return SUCCESS if !$running;
>>   
>> +	return SUCCESS if $service_config->{no_start};
> Why do we need this for stop? I mean it is called 'no_start',
> as opposed to 'no_stop'?

no_start implies no_stop for me (we cannot stop a resource which is 
guaranteed to never be started)

With templates we get also in trouble else if its disabled.


>> +
>>   	$haenv->log("info", "stopping service $sid");
>>   
>>   	$plugin->shutdown($haenv, $id);





More information about the pve-devel mailing list