[vserver] Util-vserver build from template modifies uid/gid

From: DI Roman Fiedler <roman.fiedler_at_telbiomed.at>
Date: Wed 28 Nov 2007 - 09:44:52 GMT
Message-ID: <474D3894.1050501@telbiomed.at>

I have a problem when creating vservers from template using the
util-vserver tools, perhaps someone else has already fixed this:

The template tar has correct uid/gid:

tar --numeric-owner -tjvf ../vs-ubuntu710-minimal-2007-11-27.tar.bz2 |
grep var/lock/logcheck
drwxr-xr-x 103/109 0 2007-10-15 17:28 ./var/lock/logcheck/

After importing the uid/gid are wrong:
vserver-build -n - --hostname vs-test -m template -n vs-test -- -t
vs-ubuntu710-minimal-2007-11-27.tar.bz2
ls -aln vs-test/var/lock/logcheck/
drwxr-xr-x 2 102 109 1 2007-10-15 17:28 .
drwxrwxrwt 3 0 0 16 2007-10-15 17:29 ..

On vserver utils .213 this workaround helped, but now it doesn't:

Change: /usr/lib/util-vserver/util-vserver-vars
   _TAR="/bin/tar --numeric-owner"

Now after machine upgrade (ubuntu 710, util-vserver 30.214, kernel
2.6.22.12-vs2.2.0.5) this setting is ignored (ps during extract, uses
tar -x):

root@localhost:/data/vservers# ps auxw | grep tar
root 18367 0.1 0.0 108 28 pts/2 S+ 14:15 0:00
/usr/sbin/vnamespace --new -- /usr/lib/util-vserver/vserver-build -n -
--hostname vs-test -m template -n vs-test -- -t
vs-ubuntu710-minimal-2007-11-27.tar.bz2
root 18369 0.2 0.0 4276 1796 pts/2 S+ 14:15 0:00
/bin/bash /usr/lib/util-vserver/vserver-build -n - --hostname vs-test -m
template -n vs-test -- -t vs-ubuntu710-minimal-2007-11-27.tar.bz2
root 18403 0.4 0.0 2900 596 pts/2 S+ 14:15 0:00
/bin/cat /data/vservers/vs-ubuntu710-minimal-2007-11-27.tar.bz2
root 18405 5.2 0.0 3464 1092 pts/2 S+ 14:15 0:00 tar -x

The only possible workaround until now is to create a tar shellscript:
#!/bin/bash

exec /bin/tar --numeric-owner $

and export PATH=.:$PATH before executing the build command

Any idea?
Received on Wed Nov 28 09:44:58 2007

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Wed 28 Nov 2007 - 09:45:03 GMT by hypermail 2.1.8