[pca] zones and $TMPDIR
Craig Bell
Craig.Bell at standard.com
Wed Feb 2 22:22:40 CET 2011
Hello all - I recently ran into an issue using pca(8) with zones and $TMPDIR. Have you seen this before?
Background: I used pca v20101221-01 to patch S10U3 (metacluster SUNWCXall) with alternate locations for backdir, patchdir, and xrefdir set in pca.conf. That seems to work fine with native containers. Beyond that, setting $TMPDIR seems to break something (possibly pkgadd as invoked by patchadd) in the NGZ phase.
All noreboot patches (including 119254-78) went on fine in multi-user mode (zone was in "running" state). I rebooted directly to runlevel S for this phase. Pre-patch validation goes fine, and the GZ applies successfully; but then I see errors, and patchadd fails Every patch failed with these same errors:
# grep dir /usr/local/etc/pca.conf
xrefdir=/apps/patch
patchdir=/apps/patch/tmp
backdir=/apps/patch/backout
# TMPDIR=/apps/patch/tmp pca -i missingrs
List: missingrs (32/4376)
Patch IR CR RSB Age Synopsis
------ -- - -- --- --- -------------------------------------------------------
118712 23 < 24 R-- 173 SunOS 5.10: Sun XVR-100 Graphics Accelerator Patch
Looking for 118712-24 (1/32)
Found patch file
Installing 118712-24 (1/32)
Unzipping patch
Running patchadd
<snip>
Patching non-global zones...
Patching zone myzone
Booting non-global zone myzone for patching...
Adding patches...
mkdir: Failed to make directory "/apps/patch/tmp/patchadd-251911498"; No such file or directory
ERROR: Unable to make temporary directory /apps/patch/tmp/patchadd-251911498
Patchadd is terminating.
/usr/lib/patch/patchadd[18]: /apps/patch/tmp: not found
Done!
Restoring state for non-global zone myzone...
Patch 118712-24 failed in non-global zone myzone.
Failed (exit code 36)
Failed (11:30:38/00:00:32/00:00:46, 1/32, 0/0/1)
<snip>
My specified directories do exist in the NGZ. When I boot myzone into runlevel S (or place it in the "ready" state), then <zonepath>/apps/patch/* can be traversed. I verified this when I successfully re-ran the same pca command without $TMPDIR, and everything worked as expected - my alternate directories are honored in the NGZ, and patchadd succeeds every time.
I'm not sure if I'm simply doing it wrong, or if this is some sort of limitation of $TMPDIR with the SysV package tools and containers. Any ideas?
Alternate theory: I recall years ago (probably on 5.8) that patchadd invoked certain sub-commands as EUID "nobody", and occasionally I would see the odd failure when my current working directory was only accessible by root. Maybe this is something similar to that. Could it be that my <zonepath>/apps/patch/tmp directory needs permissions 1777, like /var/tmp uses?
Let me know if you have any ideas, maybe I just missed something simple. Thanks everyone! -cheers, CSB
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.univie.ac.at/pipermail/pca/attachments/20110202/bb7a09e8/attachment.html
More information about the pca
mailing list