3.12.2012

Zones: pkgchk fails inside a zone

Recently I ran into an issue where pkgchk failed for a particular packages inside of a zone. No worries, I figured that I shutdown the zone and reattach to get the global to copy in the required binaries; however this did not seem to work. Even performing an "attach -U" was unsuccessful; the package still failed pkgchk when tested.

Since the global had the same version of the package that was missing from the zone (when checked with pkginfo -l ) I found the following procedure worked to lay down the binaries again inside the zone:

# zlogin ZONE

ZONE# cd /var/sadm/pkg
ZONE# rm -rf PACKAGE_DIR
ZONE# exit

# zoneadm -z ZONE halt
# zoneadm -z ZONE detach
# zoneadm -z ZONE attach -U
# zoneadm -z boot

After completing the above steps the Global, not seeing the meta information for the package added back the package. When the zone came back up I was able to log back into the zone and pkgchk completed without any errors!

In conclusion it seems that the zone attach process does not look at the contents of /var/sadm/install/contents; it only goes by the content of  /var/sadm/pkg directory. Good to know.

No comments: