The Zones Update on Attach Feature and Patching in the Solaris 10 OSEnda O'Connor, June 2009 IntroductionSince the Solaris 10 5/08 Operating System, system administrators have had the ability to detach and attach zones, that is, detach a zone from one system and attach it to another. Some restrictions applied with the initial functionality, in that the source and destination system where the non-global zone was being attached had to have the same software level in terms of package versions, patch levels, and architecture. In other words you couldn't move a zone from a sun4v system to a sun4u system or from a prior Solaris release to the current Solaris update release. In the Solaris 10 10/08 release, new functionality was provided by way of the "update on attach" command, the This article describes the update on attach functionality and covers the following topics:
Criteria for Determining Which Packages Are UpdatedWhen you use update on attach, the zone being attached is updated to the same software level as the global zone according to the following logic, which determines which packages are updated:
Once a package is selected for update, the same process that installed the package when the zone was initially installed is used to do the following:
In the case of, say, updating So, an example of number 3 above would be that when package A has The selection criteria are important when considering the inherited package directories that the non-global zone uses. In the case of a whole root non-global zone, there are no inherited package directories. Therefore, fewer packages get selected for update than for a sparse zone running the same software level. It is also worth considering that any package in the global zone that has Update on Attach Versus Regular UpgradeBefore continuing, it is good to understand the difference between doing a standard upgrade using any of the supported upgrade mechanisms and using update on attach. When doing a standard upgrade, all native Solaris non-global zones are upgraded, that is, they receive any new packages and features that are being delivered as part of the upgrade, obsolete packages are removed, and the non-global zones and the global zone will be at the same software level with respect to patches and package versions that are delivered in the update release. In other words, the update image gets applied to the global zone and all non-global zones. No dependency checks are performed in relation to the global zone and non-global zones during an upgrade, and all the packages that are part of the image are laid down across all the zones, including the global zone. In contrast, when you use update on attach, a software inventory is taken of both the global zone and the non-global zone being updated.
Then, using the three criteria described previously, So if you detach all the non-global zones from a system and then do a standard upgrade to a later update release on the global zone, and then you use update on attach with the non-global zones, the results are different than if you do a standard upgrade of the system as a whole with the zones attached at the time of upgrade. Any new packages delivered in the update are not propagated to the attached non-global zones unless at least one of the following is true:
Any obsolete packages are not removed unless they satisfy The main intended use for update on attach is to let users migrate non-global zones from one system to another with minimal user interaction. Prior to the Solaris 10 10/08 release, users had to ensure that the non-global zone being attached was at exactly the same software level with respect to the system software as the system where the non-global zone was being attached. With zones update on attach, system administrators can now attach a zone that has a lower patch level and the zone is updated automatically to the same level, with respect to patches, as the global zone it is being attached to. Users can now also migrate a non-global zone from a sun4v system to a sun4u system or from a sun4u system to a sun4v system. One of the main uses of update on attach is to allow quick, easy migration of Solaris Containers between differing systems. (A container is a combination of a non-global zone and resource controls.) An example usage would be if a Sun Fire T2000 server is running five containers, with each container running a particular database, and one of these databases grows more than expected over time, which might lead to performance problems as system resources become exhausted. Without the ability to migrate the affected container to a more high-performance system, the end user would have to replicate the container, its software, and the software configuration on another system, and then eventually make the switch from the old container to the new container. But with zone migration, this task becomes much easier, because the affected container can now be moved along with its database, its configuration, and the associated workload to a new system, thereby increasing the available resources for both this container and the four remaining containers on the old system. Patching and Zone Update on AttachA lot of interest has arisen about the ability to use update on attach to bring non-global zones up to the same patch level as the global zone.
Here is an example: Before applying a patch bundle, a sys admin could detach all the non-global zones, then apply the patch bundle to the global zone,
and then, after the bundle has been applied and the system has been rebooted, use the zone The main reason for doing this is that update on attach is far quicker than patching zones serially. Also, multiple An example, even though it is slightly contrived, might help to explain how this can occur. If one of the non-global zones was a whole root zone,
and one of the patches being applied was patching Mozilla Firefox, say, patch 125539-05, then the global zone would have 125539-05 applied, but
zone update on attach would not update If, instead, you use Also, in a whole root non-global zone, unless This is because 119254/119255 patches the Therefore, Normally, All packages that are updated are first removed from the non-global zone, and then they are reinstalled from the global zone using the same functionality that was used to install the zone initially. (This functionality is scheduled to change in a later update release due to CR 6818813. After CR 6818813 is fixed, any package selected for update, whose version matches that of the package installed in the global zone, will not be removed, and the package on the non-global zone will simply be replaced. This should speed up the performance of update on attach as well.) So, the same functionality that is used to install zones initially is also used by update on attach. In the case of packages that are updated,
all the patch package If an end user just used Whole Root Zone Versus Sparse Root ZoneUsing update on attach to update a sparse root zone as opposed to a whole root zone (where both zones were provisioned at the same time on the same system, so they have the same package and patch level) results in both zones being updated differently with respect to the number of packages chosen for update. So, in a sparse root zone created on the Solaris 10 5/08 OS and updated to the Solaris 10 10/08 level, 505 packages are selected to be updated, whereas in a whole root zone, 311 are selected to be updated. So before considering using zone update on attach to speed up patching, you need to be aware of the differences between using update on attach to
bring a non-global zone up to the same patch level as the global zone versus just using Presence of Interim Diagnostic Relief (IDR) Patches and Special PatchesIf IDR patches provided by Sun are installed on the non-global zone being attached, then either the exact same IDR must be applied to the destination global zone or the IDR must be removed from the source non-global zone prior to detaching the non-global zone. (The Solaris 10 5/09 OS addresses this with a-b argument that is provided to the zoneadm attach command, to remove the IDR while the non-global zone is being attached.)
Also the presence of so called "special patches," which are patches used only in the construction of the Solaris 10 update images and are never released, must be resolved. Special patches are addressed by CR 6743776 in the currently released patch 140197. A permanent solution to the handling of these special patches is addressed in CR 6791625, which is delivered in the Solaris 10 5/09 OS by patch 139555-08. Steps for Running Update on Attach1. On the source system, run 2. Move the zonepath to the destination system. 3. If the destination global zone is not at kernel patch level 139555 (Solaris 5/09 or higher update level), then run the following command to force the regeneration of the source non-global zones packages. The relevant CR is 6685069. #rm <zonepath>/SUNWdetached.xml 4. Reconfigure the zone using 5. Finally, run this command: #zoneadm -z <zonename> attach -u Please see How to Migrate A Non-Global Zone for a full description of the steps that are required to migrate a zone. Error reporting in Solaris 10 5/09 has also been improved. For a package that was considered to be downgraded (that is, the version of the package in the non-global zone being attached was higher than the source global zone where it was being attached), prior releases reported every instance, one by one. In other words, For More InformationHere are some additional resources:
Comments (latest comments first)Discuss and comment on this resource in the BigAdmin Wiki
Unless otherwise licensed, code in all technical manuals herein (including articles, FAQs, samples) is provided under this License. |
BigAdmin SubscriptionsBigAdmin Areas
BigAdmin Sun Center
BigAdmin Topics | ||||