[OmniOS-discuss] Recommended way to keep Zones up to date?

Eric Sproul esproul at omniti.com
Wed May 1 11:35:27 EDT 2013


On Wed, May 1, 2013 at 12:21 AM, Philippe <philippe.hanrigou at gmail.com> wrote:
> Hi,
>
> <noob question>
> What is the recommended way to update the packages in the global and non global zones?
> </noob question>

A perfectly legitimate question, regardless of experience. :)

> I used to just run 'pkg update' in the global zone and then in each of the non-global zones. Since it is cumbersome, and the non global zones would always complain about not being able to update the boot environment, I googled around and decided to try the 'zoneadm -z my-zone detach' / 'zoneadm -z my-zone attach -u' strategy described in http://www.oracle.com/technetwork/articles/servers-storage-dev/updatesoftwarezones-450942.html#Upgrading. Not only it seemed non ideal to have to bring the zone offline, but once I detached it my zone would never attach again due to some incorporation problem that I could not troubleshoot due to my limited IPS understanding.

Using detach/'attach -u' is the recommended way to move zones between
stable releases of OmniOS.  Within a given stable release, a simple
'pkg update' from within the zone will suffice.  We try very hard not
to introduce breaking changes in core within a single release cycle.

Your issue with reattaching sounds like the attaching zone has a
different version of the 'entire' package than the global zone (you'll
see this in the output of the attach operation, and it also goes into
the attach log).  Did you upgrade the global at some point after the
zone in question was created?  If you could paste a copy of the attach
log where you see the failure, that would help.

>
> So my question is what is the best practice here? What should I have been doing all along (ideally without taking downtime)?

You should be able to run 'pkg update' within the zone for most
updates.  Only when moving between releases will you need to
detach/attach.

Eric


More information about the OmniOS-discuss mailing list