Pages

Wednesday, May 6, 2009

Housekeeping after live upgrading

As I told on a previous blog entry, I just live upgraded my Solaris Express Community Edition from build 110 to build 113. The live upgrade experience was very good: rapid, painless and pretty secure.

At the end of the live upgrade process, you are informed about the upgrade operation:
  • upgraded packages (/var/sadm/system/logs/upgrade_log)
  • failed upgrades (/var/sadm/system/data/upgrade_failed_pkgadds)
  • required housekeeping steps (/var/sadm/system/data/upgrade_cleanup)
In this case only package SUNWttf-fonts-core failed with the following message (I had to modify for blogger not to screw up the HTML):
Doing pkgadd of SUNWttf-fonts-core to /
pkgadd: ERROR: unable to create package object (/a/usr/openwin/lib/X11/fonts/TrueType/core).
file type (s) expected (d) actual
unable to remove existing directory at (/a/usr/openwin/lib/X11/fonts/TrueType/core)
32963 blocks
pkgadd: ERROR: unable to create package object (/a/usr/openwin/lib/X11/fonts/TrueType/core).
file type (s) expected (d) actual
unable to remove existing directory at (/a/usr/openwin/lib/X11/fonts/TrueType/core)

Installation of (SUNWttf-fonts-core) partially failed.
A bit of investigation and the help of the OpenSolaris community showed that a bug (6833967) is causing the observed failure. The following bug is the guilty:
6810237 - SUNWxwfnt upgrade is broken in 109 due to issues with bad *ph files delivery
If you experience fonts-related problems, here are the steps suggested by the community:
yes | pkgrm -R /a SUNWxwcft SUNWxwoft SUNWxwfnt SUNWttf-fonts-core
rm -rf /a/usr/X11/lib/X11/fonts/
100dpi
rm -rf /a/usr/X11/lib/X11/fonts/75dpi
rm -rf /a/usr/openwin/lib/X11/fonts/
100dpi
rm -rf /a/usr/openwin/lib/X11/fonts/
75dpi
yes | pkgadd -R /a -d /path/to/image/Solaris_11/
Product SUNWxwfnt SUNWxwoft SUNWxwcft SUNWttf-fonts-core
and, in the new ABE:
# rm /var/cache/fontconfig/*
# /usr/bin/fc-cache -f -s
I also tried to solve this problems observing the pkgmap file for that package. Near the end it says:
1 s none openwin/lib/X11/fonts/TrueType/core=../../../../../X11/lib/X11/fonts/TrueType/core
core, in my system, was an empty dir with some stale fonts.cache files. I just removed the directory and restored the link.

Cleaning up.
The last thing to do was examining the upgrade_cleanup file to apply the required cleanup operations. Basically, during live upgrade, two things are likely to happen:
  • Live upgrade does not replace a file because it had been modified
  • Live upgrade does replace a modified file and backs up the previous version
In both cases the administrator should examine the differences and apply the patches when necessary. In my case, for example, I had reconfigured the shipped Apache2 and simply had to check the differences between the two versions of the Apache2 configuration files.

Conclusions.
Upgrading Solaris with live upgrade it's a pretty easy procedure if you're using ZFS for your root pool. I really hope that live upgrade will continue to be a feature of the next generation Solaris. In my opinion, Live Upgrade and ZFS rock.

No comments:

Post a Comment