Re: [zones-discuss] updating zones question

2009-09-30 Thread William A. Fiveash
I just tried to update my zones to snv_124 in the manner you describe.  Here's 
what I see:

/usr/sbin/beadm create opensolaris_124
/usr/sbin/beadm mount opensolaris_124 /mnt
/usr/bin/pkg -R /mnt image-update
/usr/sbin/bootadm update-archive -R /mnt
zoneadm -R /mnt -z master detach
zoneadm: zone 'master': cannot detach zone in alternate root

I then  tried:
zoneadm -z master detach

which worked however:
zoneadm -R /mnt -z master attach -u 

zoneadm: zone 'master': cannot attach zone in alternate root

So this is a bug in the ipkg brand, yes?
-- 
This message posted from opensolaris.org
___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] updating zones question

2009-09-30 Thread William A. Fiveash
As a follow up I tried:

zoneadm -z master attach

mount failed: Device busy
ERROR: Unable to mount the zone's ZFS dataset.

So how do I attach my master zone to the running BE?  Note, this is the same BE 
I detached master from.
-- 
This message posted from opensolaris.org
___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] updating zones question

2009-09-30 Thread William A. Fiveash
 As a follow up I tried:
 
 zoneadm -z master attach
 
 
 mount failed: Device busy
 ERROR: Unable to mount the zone's ZFS dataset.
 
 So how do I attach my master zone to the running BE?
  Note, this is the same BE I detached master from.

I edited /usr/lib/brand/ipkg/attach and uncommented set -o xtrace then I ran 
the zoneadm attach command again.  Here is the interesting output:

+ /usr/sbin/zfs list -H -o zoned rpool/zones/master/ROOT/zbe-1
+ zoned=on
+ [ on = off ]
+ /usr/sbin/mount -F zfs rpool/zones/master/ROOT/zbe-1 /zones/master/root
mount failed: Device busy
+ fail_fatal $'Unable to mount the zone\'s ZFS dataset.'
+ printf 'ERROR: '
+ 1 2
ERROR: + printf $'Unable to mount the zone\'s ZFS dataset.'
+ Unable to mount the zone's ZFS dataset.1 2

I  then ran:
$ mount |grep '/zones/master'
/zones/master on rpool/zones/master 
read/write/setuid/devices/nonbmand/exec/xattr/atime/dev=2d9003d on Thu Sep 24 
16:03:05 2009
/mnt/zones/master on /zones/master read only/setuid/devices/nosub/dev=2d9003d 
on Wed Sep 30 14:17:47 2009
/mnt/zones/master/root on rpool/zones/master/ROOT/zbe-2 
read/write/setuid/devices/nonbmand/exec/xattr/atime/dev=2d90056 on Wed Sep 30 
14:17:47 2009

It is unclear to me why those zfs filesystems are mounted.
-- 
This message posted from opensolaris.org
___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] updating zones question

2009-09-30 Thread William A. Fiveash
 I  then ran:
 $ mount |grep '/zones/master'
 /zones/master on rpool/zones/master
 read/write/setuid/devices/nonbmand/exec/xattr/atime/de
 v=2d9003d on Thu Sep 24 16:03:05 2009
 /mnt/zones/master on /zones/master read
 only/setuid/devices/nosub/dev=2d9003d on Wed Sep 30
 14:17:47 2009
 /mnt/zones/master/root on
 rpool/zones/master/ROOT/zbe-2
 read/write/setuid/devices/nonbmand/exec/xattr/atime/de
 v=2d90056 on Wed Sep 30 14:17:47 2009
 
 It is unclear to me why those zfs filesystems are
 mounted.

BTW, I ended up running umount on all the master related mounts above
then run zoneadm -z master attach which succeeded and my master zone is
now functional in my currently active opensolaris_123 BE.  I will wait
to update my zones to snv_124 when the opensolaris_124 BE is currently
active.

As an aside there appears to be a bug in /usr/lib/brand/ipkg/attach,
line 129:
if [ $aarg -eq 1 -o $rarg -eq 1 -o $allow_update -eq 1 ]; then

If I use the -n arg but on -u arg to the activate command it causes the
if clause above to be executed but allow_update is not set so complains
about the [] test.
-- 
This message posted from opensolaris.org
___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] updating zones question

2009-09-29 Thread Jerry Jelinek

Will Fiveash wrote:

As an aside it would  be nice if the pkg image-update command provided
an option to update all zones configured in the BE being updated.


There is no option because it will eventually do that
automatically, just like upgrading s10 today will also
upgrade all zones.  We're just not there yet.

Jerry

___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] updating zones question

2009-09-28 Thread Jerry Jelinek

Will Fiveash wrote:

 This is in the FAQ.

 http://www.opensolaris.org/os/community/zones/faq/#os


I wish the info was more detailed/explicit.  How do I use zones
attach/detach to do an image-update on the zone exactly?


# zoneadm -z myzone foo detach
# zoneadm -z myzone foo attach -u


Also I don't see anything in there on what I need to do if I want to
snapshot an existing zone in case I want to rollback the zone to the
state it was in prior to the image-update.


When you image-update the system that will happen automatically.
When you go back to an earlier global zone BE, then the earlier
zone BEs will automatically be used.  If you want to do something
like this independently of the global zone, then you have to
roll your own stuff.

Jerry

___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] updating zones question

2009-09-28 Thread Jerry Jelinek

Will Fiveash wrote:

On Mon, Sep 28, 2009 at 12:20:53PM -0600, Jerry Jelinek wrote:

 Will Fiveash wrote:

 This is in the FAQ.

 http://www.opensolaris.org/os/community/zones/faq/#os

I wish the info was more detailed/explicit.  How do I use zones
attach/detach to do an image-update on the zone exactly?

 # zoneadm -z myzone foo detach
 # zoneadm -z myzone foo attach -u


The man page for zoneadm does not describe the -u flag for attach.  It
is also unclear to me which zoneadm parameter foo represents.


Sorry, I mistyped the example.  It should have been:

# zoneadm -z myzone detach
# zoneadm -z myzone attach -u

The string foo should not have been in the example.
The -u flag is not in the zoneadm man page because it is
a brand specific option.  Not all brands support -u (e.g. lx
does not).  There is no man page for the ipkg brand yet but
you can read about this option on the native(5) man page.


Given I created and updated a BE by doing:

beadm create opensolaris_123
beadm mount opensolaris_123 /mnt
pkg -R /mnt image-update

and I have a non-local zone called master, can you provide the exact
commands I should have run in order for the master zone to be updated to
snv_123 when I boot the opensolaris_123 BE and still have be able to
access a master zone at snv_111 when I boot the opensolaris_111 BE?
Is this what I should have done:

beadm create opensolaris_123
beadm mount opensolaris_123 /mnt
zoneadm -z master detach
pkg -R /mnt image-update
zoneadm -z master attach -u


More like:

beadm create opensolaris_123
beadm mount opensolaris_123 /mnt
pkg -R /mnt image-update
zoneadm -R /mnt -z master detach
zoneadm -R /mnt -z master attach -u

Although I haven't tested that to see if the ipkg brand will
handle the zone update correctly on an alternate root.  If
not, thats a bug in the brand.  I do know that booting the
opensolaris_123 BE then detaching/attaching the zone will
properly update the zone.  We're still working on getting
IPS and zones to work properly together so that the zones
get updated when you image-update the global zone.


?  Do I need to recreate the opensolaris_123 BE and do the above in
order to get the master zone properly updated?


No, if you're running opensolaris_123, just detach the zone
then attach -u and the right thing should happen.  If the zone
is already up-to-date, then the zone will simply be attached.

Jerry
___
zones-discuss mailing list
zones-discuss@opensolaris.org


[zones-discuss] updating zones question

2009-09-25 Thread William A. Fiveash
- zones updating question: I was running snv_111b when I created a
  master zone and installed redistributable.  I think used master to
  clone several other zones.  Later I created a new BE and updated that
  BE to snv_123 by doing:

  beadm mount opensolaris_123 /mnt
  pkg -R /mnt image-update
  
  When I booted the snv_123 BE I was able to boot the zones but I notice
  that the packages in the zone were still at snv_111 level.  What I see
  with zfs list -t snapshot,filesystem is:

rpool/zones/master   5.07M   655G
22K  /zones/master
rpool/zones/master/ROOT  5.05M   655G
19K  legacy
rpool/zones/master/ROOT/zbe46K   655G  
6.39G  legacy
rpool/zones/master/ROOT/zbe-14.98M   655G  
6.39G  legacy
rpool/zones/master/ROOT/zb...@zbe-1  0  -  
6.39G  -

   My questions are:

   - Should the zones have been updated when I did the pkg -R /mnt
 image-update to BE opensolaris_123?

   - If not, how can I fix the zones so that when I boot them while
 running the opensolaris_123 BE they have 123 level packages and if
 I run in the opensolaris_111 BE the zones have 111 packages
 install?
-- 
This message posted from opensolaris.org
___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] updating zones question

2009-09-25 Thread Jerry Jelinek

William A. Fiveash wrote:

   My questions are:

   - Should the zones have been updated when I did the pkg -R /mnt
 image-update to BE opensolaris_123?

   - If not, how can I fix the zones so that when I boot them while
 running the opensolaris_123 BE they have 123 level packages and if
 I run in the opensolaris_111 BE the zones have 111 packages
 install?


This is in the FAQ.

http://www.opensolaris.org/os/community/zones/faq/#os

Jerry
___
zones-discuss mailing list
zones-discuss@opensolaris.org