IPS image re-hydration fails
It is not currently possible to rehydrate an IPS image in the global zone as the operation calls
zoneadm, which depends on
/etc/zones/SUNWdefault.xml, which is not itself protected from dehydration.
bloody# pkg image-create -F -p omnios=https://pkg.omnios.org/bloody/core /test bloody# pkg -R /test add-property-value dehydrated omnios bloody# pkg -R /test install SUNWcs Packages to install: 71 Mediators to change: 4 Services to change: 1 DOWNLOAD PKGS FILES XFER (MB) SPEED Completed 71/71 352/352 0.4/0.4 94.9k/s PHASE ITEMS Installing new actions 18053/18053 Updating package state database Done Updating package cache 0/0 Updating image state Done Creating fast lookup database Done Reading search index Done Building new search index 71/71 Updating package cache 1/1 bloody# pkg -R /test rehydrate pkg: rehydrate failed (linked image exception(s)): The following subprocess returned an unexpected exit code of 1: /usr/sbin/zoneadm -R /test/ list -cp And generated the following error message: zoneadm: unable to determine default brand
Updated by Andy Fiddaman 13 days ago
With the referenced change, rehydration succeeds:
bloody# pkg -R /test rehydrate Packages to fix: 70 Services to change: 4 DOWNLOAD PKGS FILES XFER (MB) SPEED Completed 70/70 22145/22145 204.0/204.0 2.5M/s PHASE ITEMS Installing new actions 23763/23763 Updating package state database Done Updating package cache 0/0 Updating image state Done Creating fast lookup database Done Updating package cache 1/1
Updated by Andy Fiddaman 12 days ago
Dehydrating an IPS image removes all non-editable packaged files and hardlinks from the image, leaving behind the directory structure, symbolic links and editable files (those which are packaged with a
overlay attribute). The image can then be subsequently re-hydrated when required. It is also possible to manually flag files as non-dehydratable so they get left behind in a dehydrated image.
IPS images support the generic concept of linked child images, which in illumos are child zones. pkg finds that list of zones by invoking the
zoneadm list -cp command on the image. If the
etc/zones/SUNWdefault.xml file does not exist, then
zoneadm exits with an error -
zoneadm: unable to determine default brand, which causes
pkg to fail to initialise, and it therefore cannot rehydrate the image.
The proposed solution is to flag this file as non-dehydrate so it is always left behind in a dehydrated image.
Updated by Electric Monk 8 days ago
- Status changed from In Progress to Closed
- % Done changed from 0 to 100
commit 6dcbfae4aa2c2aab7ebd7174bd2f0232528126b7 Author: Andy Fiddaman <firstname.lastname@example.org> Date: 2021-04-10T08:26:44.000Z 13201 IPS image re-hydration fails Reviewed by: Robert Mustacchi <email@example.com> Reviewed by: Gordon Ross <firstname.lastname@example.org> Approved by: Joshua M. Clulow <email@example.com>