Re: [PATCH 2/2] Don't call reload on corosync-objctl actions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/20/2012 9:02 AM, Jan Friesse wrote:
> Just try to run corosync-objctl logging.debug if cman_preconfig is
> loaded. It will return "Error reloading DB 11", because cman needs newer
> config file (higher serial number).

Right.. forgot about that check.

> 
> Also reloading after every operation seems to be quiet weird. Try to
> imagine following situation:
> - reload really works
> - in config file we have logging.debug=off
> - you will set it to on by objctl
> - now you will call corosync-objctl with some different key (let's say
> totem.token)
> - reload is called -> logging.debug is again off

that´s because we expect the change in cluster.logging.... ok ACK as
long as it doesn´t break anything :)

Fabio

> 
> Honza
> 
> Fabio M. Di Nitto napsal(a):
>> I have to temporary NACK this one, because it needs a cman counter part
>> for all subsystems.
>>
>> What problem are we effectively trying to solve here in the first place?
>>
>> We had to opt for the reload_db option because we needed full
>> notification for any change happening in the objdb, instead of
>> installing several trackers.
>>
>> Fabio
>>
>> On 11/19/2012 2:34 PM, Jan Friesse wrote:
>>> confdb reload is used only for reloading of file, not for triggering
>>> changes.
>>>
>>> Signed-off-by: Jan Friesse <jfriesse@xxxxxxxxxx>
>>> ---
>>>  tools/corosync-objctl.c |   15 ---------------
>>>  1 files changed, 0 insertions(+), 15 deletions(-)
>>>
>>> diff --git a/tools/corosync-objctl.c b/tools/corosync-objctl.c
>>> index 3e2bd4c..1168efe 100644
>>> --- a/tools/corosync-objctl.c
>>> +++ b/tools/corosync-objctl.c
>>> @@ -244,18 +244,6 @@ static void print_config_tree(confdb_handle_t handle, hdb_handle_t parent_object
>>>  	}
>>>  }
>>>  
>>> -static cs_error_t reload_db(confdb_handle_t handle)
>>> -{
>>> -	char error[1024];
>>> -	cs_error_t ret;
>>> -
>>> -	ret = confdb_reload(handle, 0, error, sizeof(error) - 1);
>>> -	if (ret != CONFDB_OK) {
>>> -		fprintf (stderr, "Error reloading DB %d\n", ret);
>>> -	}
>>> -	return ret;
>>> -}
>>> -
>>>  static int read_in_config_file (char * filename)
>>>  {
>>>  	confdb_handle_t handle;
>>> @@ -326,7 +314,6 @@ static int read_in_config_file (char * filename)
>>>  		/* write the attribute */
>>>  		write_key (handle, line);
>>>  	}
>>> -	reload_db(handle);
>>>  	confdb_finalize (handle);
>>>  	fclose (fh);
>>>  	return 0;
>>> @@ -931,8 +918,6 @@ int main (int argc, char *argv[]) {
>>>  	if (action == ACTION_TRACK) {
>>>  		listen_for_object_changes(handle);
>>>  		stop_tracking(handle);
>>> -	} else {
>>> -		reload_db(handle);
>>>  	}
>>>  
>>>  	result = confdb_finalize (handle);
>>>
>>
>> _______________________________________________
>> discuss mailing list
>> discuss@xxxxxxxxxxxx
>> http://lists.corosync.org/mailman/listinfo/discuss
>>
> 

_______________________________________________
discuss mailing list
discuss@xxxxxxxxxxxx
http://lists.corosync.org/mailman/listinfo/discuss



[Index of Archives]     [Linux Clusters]     [Corosync Project]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Linux Kernel]     [Linux SCSI]     [X.Org]

  Powered by Linux