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

Re: [K12OSN] Need help testing a different approach for the caching-nameserver-ltsp package



On Mon, 2 Jan 2006, Christopher K. Johnson wrote:

Eric Harrison wrote:


I think I have a graceful work-around for the conflicts between the
latest named & caching-nameserver package updates and K12LTSP's
caching-nameserver-ltsp package.


Traditionaly, the caching-nameserver-ltsp package was a replacement
for the caching-nameserver package. In my test package, I make the
caching-nameserver-ltsp require the caching-nameserver and then
include both sets of files into an alternate name.conf file:

named is started with an alternate config file by adding
OPTIONS="-c /etc/named-k12ltsp.conf" to /etc/sysconfig/named.
/etc/named-k12ltsp.conf includes /etc/named.conf and the ltsp zones.


There are two scenarios I have found where this breaks. One is
that /etc/named.conf has been customized but still includes the
ltsp zones. If the ltsp zones are included twice, named won't start.
The second case is that an alternate config file was already
specified in /etc/sysconfig/named. If such a customization was made,
the caching-nameserver-ltsp package should not modify it.

If either of these conditions are detected, the caching-nameserver-ltsp
package skips adding OPTIONS="-c /etc/named-k12ltsp.conf" to /etc/sysconfig/named.


I would greatly appreciate help in reviewing and testing of this
package on K12LTSP 4.4.1:

ftp://k12linux.mesd.k12.or.us/pub/K12LTSP/testing/RPMS/caching-nameserver-ltsp-7.3-5.k12ltsp.4.4.2.noarch.rpm
-Eric

I see you do accommodate the case where someone has the bind-chroot rpm installed.

Yes, I tested that.

I noticed that ltsp.arpa has a duplicate entry for "1".

Thanks for catching that, I'll fix it.

Have you considered having the postinstall script add
include "/etc/named-k12ltsp.conf";
at the end of named.conf if it does not already exist? Kind of the reverse of your current implementation, but the relationship with k12ltsp zones would be more obvious, since people often edit named.conf, but overlook /etc/sysconfig/named. Of course if you do so, the line
include "/etc/named.conf";
will need to be removed from named-k12ltsp.conf

I considered the "reverse implementation", but initially decided against
it for two reasons:

1) It is bad form to modify another package's config files. It is less
   inappropriate to change the system-specific configs in /etc/sysconfig/*

2) It is less reslient to updates. An upgrade of the caching-nameserver
   package could wipe out the 'include "/etc/named-k12ltsp.conf";'


My basic theory is that /etc/sysconfig/named has a lower risk of being
modified or replaced by rpm than /etc/named.conf. By including /etc/named.conf
from /etc/named-k12ltsp.conf, any changes to /etc/named.conf (whether they
be made by the admin or by upstream package updates) will be still be
picked up by named.

When there is an OPTIONS= line already, but lacking double-quotes, with no prior -c option, addition of the alternate config fails quietly.

Good point.

Now I'll have to actually think about the required regex! (suggestions welcomed ;-)

There are at least three valid cases:

  OPTIONS=something  # a single option with no spaces does not need quotes

  OPTIONS="something=true anotherthing=false" # double quoted options

  OPTIONS='something=true anotherthing=false' # single quoted options

Otherwise it looks good!

Chris

Thanks for the feedback Chris!

-Eric


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