[Pkg-zfsonlinux-devel] Bug#837049: Please configure zfs_arc_max in postinst

Petter Reinholdtsen pere at hungry.com
Mon Sep 12 09:03:34 UTC 2016


[Craig Sanders]
> that's how conffiles are supposed to work. they'll get a question only
> when the package-supplied conffile is both:

I suspect you misunderstand me.  The conffile mechanism is designed to
work well with system administrators manually editing files.  Their
manual edits are not automatically replaced and a question is asked
during upgrades allowing the admin to figure out how to handle / merge
the changes into newer versions of the conffile.  In this case it is all
good.

But the conffile mechanism is not designed to work well for people how
do _not_ manually edit the files.  If something else modified a conffile
(say a postinst script or some configuration tool), the user is asked to
look at a file he never saw before and decide what to do with changes he
know nothing about in the file.  In short, as long as the person did not
modify the file himself, the conffile mechanism is far from ideal.  This
is the reason /etc/pam.d/common-* are not conffiles (they are modified
by /usr/sbin/pam-auth-update).

> in general, postinsts shouldn't modify conffiles unless using debconf.
> which also has the advantage of making it pre-seedable for automated
> installs.

The system administrator is just as confused by conffile questions if
the postinst used debconf as when the postinst just modified the
conffile directly.  In general, postinst should avoid modify conffiles,
and the file in question should not be a conffile if the postinst is
modifying it.  Instead one should modify the setup to use several
.d-like directories to make sure configuration can be appended or
replaced without confusing the system administrator with conffile
questions.

Conffile questions only make sense when the system administrator
actually modified the file in question using a text editor.

> for those who don't have an /etc/modprobe.d/zfs.conf already, the
> package version would just be silently installed (which is why it should
> only have commented out lines or, at most, sane defaults)
>
> for those who do have one, they'll get to choose whether to use their
> version or the package version, as usual.
>
> this is normal and expected behaviour in debian, so anyone annoyed by
> it is going to be annoyed by every other package in debian that has
> conffiles.

It is not a question about being annoyed, it is a question of ensuring
industrial rollout of upgrades can be done while avoiding unneeded
confusion among Debian system administrators.  I described a much better
setup at the end of my talk from Debian Conference 2005, recording
available from <URL: https://www.youtube.com/watch?v=zMT2M5BApZM >.

> i don't care much whether it's just an example under /usr/share/doc or
> if it's a real conffile in /etc/modprobe.d/ - the important thing from
> my POV is providing a well-commented example.

Well, it is important to understand the effect of difference.  Package
defaults and examples should go in /usr/, while host specific setup and
overrides for the defaults should go into /etc/.

-- 
Happy hacking
Petter Reinholdtsen



More information about the Pkg-zfsonlinux-devel mailing list