Patchwork nscd: Improve nscd.conf comments.

login
register
mail settings
Submitter Carlos O'Donell
Date Aug. 16, 2019, 8:35 p.m.
Message ID <51598614-8cbc-08b4-6b98-473d6945cf0f@redhat.com>
Download mbox | patch
Permalink /patch/34156/
State New
Headers show

Comments

Carlos O'Donell - Aug. 16, 2019, 8:35 p.m.
On 8/16/19 12:13 PM, Florian Weimer wrote:
> * Carlos O'Donell:
> 
>> How about something like this:
>> ~~~
>> NOTE: Setting 'shared' to a value of 'yes' will accelerate the lookup,
>>       but those lookups will not be counted as cache hits i.e. 'nscd -g'
>>       may show '0%'.
>> ~~~
>>
>> That avoids implementation details but documents the current behaviour
>> that you get when you enable the shared cache and expect lookups to
>> contribute to cache hit statistics.
>>
>> Does that text look OK?
> 
> Yes, much better.

v2 with rewritten text.
Florian Weimer - Aug. 16, 2019, 8:53 p.m.
* Carlos O'Donell:

> diff --git a/nscd/nscd.conf b/nscd/nscd.conf
> index 39b875912d..487ffe461d 100644
> --- a/nscd/nscd.conf
> +++ b/nscd/nscd.conf
> @@ -3,6 +3,9 @@
>  #
>  # An example Name Service Cache config file.  This file is needed by nscd.
>  #
> +# WARNING: Running nscd with a secondary caching service like sssd may lead to
> +#          unexpected behaviour, especially with how long entries are cached.
> +#
>  # Legal entries are:
>  #
>  #	logfile			<file>
> @@ -23,6 +26,9 @@
>  #	check-files		<service> <yes|no>
>  #	persistent		<service> <yes|no>
>  #	shared			<service> <yes|no>
> +#	NOTE: Setting 'shared' to a value of 'yes' will accelerate the lookup,
> +#	      but those lookups will not be counted as cache hits
> +#	      i.e. 'nscd -g' may show '0%'.
>  #	max-db-size		<service> <number bytes>
>  #	auto-propagate		<service> <yes|no>
>  #

Looks good to me, thanks.

Florian
Carlos O'Donell - Aug. 19, 2019, 7:48 p.m.
On 8/16/19 4:53 PM, Florian Weimer wrote:
> * Carlos O'Donell:
> 
>> diff --git a/nscd/nscd.conf b/nscd/nscd.conf
>> index 39b875912d..487ffe461d 100644
>> --- a/nscd/nscd.conf
>> +++ b/nscd/nscd.conf
>> @@ -3,6 +3,9 @@
>>  #
>>  # An example Name Service Cache config file.  This file is needed by nscd.
>>  #
>> +# WARNING: Running nscd with a secondary caching service like sssd may lead to
>> +#          unexpected behaviour, especially with how long entries are cached.
>> +#
>>  # Legal entries are:
>>  #
>>  #	logfile			<file>
>> @@ -23,6 +26,9 @@
>>  #	check-files		<service> <yes|no>
>>  #	persistent		<service> <yes|no>
>>  #	shared			<service> <yes|no>
>> +#	NOTE: Setting 'shared' to a value of 'yes' will accelerate the lookup,
>> +#	      but those lookups will not be counted as cache hits
>> +#	      i.e. 'nscd -g' may show '0%'.
>>  #	max-db-size		<service> <number bytes>
>>  #	auto-propagate		<service> <yes|no>
>>  #
> 
> Looks good to me, thanks.

Pushed. Thanks.

I'm rebasing Fedora to use this file now.

That harmonizes all of our downstream changes for nscd.conf
and nsswitch.conf.

Patch

diff --git a/ChangeLog b/ChangeLog
index 23df9a3545..6309e7cac7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@ 
+2019-08-16  Carlos O'Donell  <carlos@redhat.com>
+
+	* nscd/nscd.conf: Add warning and comment about shared option.
+
 2019-08-16  Carlos O'Donell  <carlos@redhat.com>
 
 	* nss/nsswitch.conf: Expand comments, and simplify defaults.
diff --git a/nscd/nscd.conf b/nscd/nscd.conf
index 39b875912d..487ffe461d 100644
--- a/nscd/nscd.conf
+++ b/nscd/nscd.conf
@@ -3,6 +3,9 @@ 
 #
 # An example Name Service Cache config file.  This file is needed by nscd.
 #
+# WARNING: Running nscd with a secondary caching service like sssd may lead to
+#          unexpected behaviour, especially with how long entries are cached.
+#
 # Legal entries are:
 #
 #	logfile			<file>
@@ -23,6 +26,9 @@ 
 #	check-files		<service> <yes|no>
 #	persistent		<service> <yes|no>
 #	shared			<service> <yes|no>
+#	NOTE: Setting 'shared' to a value of 'yes' will accelerate the lookup,
+#	      but those lookups will not be counted as cache hits
+#	      i.e. 'nscd -g' may show '0%'.
 #	max-db-size		<service> <number bytes>
 #	auto-propagate		<service> <yes|no>
 #