This content has been marked as final. Show 1 reply
sudhir_harikant wrote:In Solaris 11, packages do not automatically propagate from the global zone to the non-global zone(s) unless there is a "parent dependency" on the package that forces the packages to be in sync. Parent dependencies only kick in if the package is installed in a zone - the purpose is to be sure that that incompatible versions (e.g. of the kernel and system libraries) don't exist.
I have a Solaris 11 host with 30 solaris brand zones (native). I have a software application which needs to be installed in the global zone and some of the packages also needs to be installed in each of these brand zones. In Solaris 10 system it was possible as the packages were configured with appropriate settings (SUNW_PKG_ALLZONES, SUNW_PKG_HOLLOW, SUNW_PKG_THISZONE).
With this it was easy to install/uninstall our 3rd-party applications into all the 30 local-zones directly from the global-zone.
1. How can we do this in Solaris 11 ?
If the organization that creates the packages adds a parent dependency to their pkg manifests, it will ensure that if a package is installed in a zone, the same package is installed in the global zone. That is, the package will not be installable in a zone unless it already exists within the global zone and version skew between the zone an global zone will not be allowed. Future pkg update operations will be sure that any changes to this package happen lockstep between the global zone and the zone(s) with that package installed. Adding such a parent dependency is as simple as adding the following line to the pkg manifest before publishing the package:
depend fmri=feature/package/dependency/self type=parent variant.opensolaris.zone=nonglobal
I can never remember that line. I remind myself of what it is by running:
# pkg contents -m system/library | grep type=parent
I'll write a blog entry that explains how you can use something like this to set a policy for packages that need to be installed in all zones. Once that is done (may be a few days) I'll update this thread.
2. When we have a newer release of Solaris 11 ( Solaris 11 Update 1), if we upgrade the global zone, will the "attach -u" of the local-zones upgrade all the OS packages within the zones ?You shouldn't need to do an attach -u. In Solaris 11 Express, you did need to do that. Solaris 11 has a feature called "linked images" that automatically perform the required updates to each zone when you update the global zone. The parent dependencies that I mentioned above is part of the mechanism used by linked images to ensure that zones stay in sync with the global zone.