Bug#714869: /usr/sbin/fai incorrectly removes mapping lines from /etc/idmapd.conf from install root image.

2013-07-04 Thread Thomas Lange
> On Wed, 03 Jul 2013 12:00:55 -0500, Ken Hahn  said:

> # NFS v4 support
> sed -i -e '/Nobody-/d' /etc/idmapd.conf
> ainsl -v /etc/idmapd.conf 'Nobody-User = root'
> ainsl -v /etc/idmapd.conf 'Nobody-Group = root'
I think you are right. There's an error in that.
In the past, ainsl did not use the variable AINSL_TARGET, so this error
may be introduced after adding the new variable.
I guess replacing ainsl with echo ... >> may be an option here,
because this part only run once.

I will look deeper into this bug during debcamp in august.
-- 
regards Thomas


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#714869: /usr/sbin/fai incorrectly removes mapping lines from /etc/idmapd.conf from install root image.

2013-07-03 Thread Ken Hahn
Package: fai-client
Version: 4.0.6
Severity: important


Hello,

When using fai-client, the file, /etc/idmapd.conf is incorrectly
created/altered to exist without entries for Nobody-User, and
Nobody-Group.  (If the nfs root provides this file, the entries for
these will be removed.)

In particular the program /usr/sbin/fai contains the following code:

[ "$FAI_ROOT" = '/' ] && ROOTCMD=
target=$FAI_ROOT
AINSL_TARGET=$FAI_ROOT
...
# NFS v4 support
sed -i -e '/Nobody-/d' /etc/idmapd.conf
ainsl -v /etc/idmapd.conf 'Nobody-User = root'
ainsl -v /etc/idmapd.conf 'Nobody-Group = root'

At the point this is run, my understanding is that the AINSL_TARGET
isn't set up properly.  The effect is that the sed removes the lines
from idmapd.con, and then the ainsl lines that should add it back in,
instead indicate that the file to change doesn't exist.

I don't believe ainsl should be used here (and even if it was right
here, it then makes the sed incorrect, because the sed file name isn't
prefixed with the target.

In my case, I have a hook called confdir.DEFAULT
that attempts to get idmapd going before I map the config space.
basically containing the following:

modprobe nfsd
mount -t rpc_pipefs rpc_pipefs /var/lib/nfs/rpc_pipefs
/usr/sbin/rpc.idmapd -v

This, along with the breakage in the idmapd.conf file ends up with the
following error in fai.log:
Calling hook: confdir.DEFAULT
rpc.idmapd: Could not find group "nobody"
confdir.DEFAULT  FAILED with exit code 1.
Calling task_confdir


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org