Re: [OmniOS-discuss] GZ BE missing libbe:uuid property after Kayak installation --> breakage

2016-07-01 Thread Dan McDonald

> On Jul 1, 2016, at 3:21 PM, Volker A. Brandt  wrote:
> 
> In that case, you need to put it on the miniroot. :-)

Dammit.  That too.

Thanks,
Dan

___
OmniOS-discuss mailing list
OmniOS-discuss@lists.omniti.com
http://lists.omniti.com/mailman/listinfo/omnios-discuss


Re: [OmniOS-discuss] GZ BE missing libbe:uuid property after Kayak installation --> breakage

2016-07-01 Thread Volker A. Brandt
Dan McDonald writes:
> > On Jul 1, 2016, at 2:51 PM, Eric Sproul  wrote:
> > 
> > FWIW, since https://www.illumos.org/issues/4769 integrated we have
> > /usr/bin/uuidgen.  All currently-supported OmniOS releases should have
> > that (I know 014 does).
> 
> Yeah, uuidgen is the right way to do this, and since 014 is the earliest 
> supported release, you're insured of success.

In that case, you need to put it on the miniroot. :-)


Regards -- Volker
-- 

Volker A. Brandt   Consulting and Support for Oracle Solaris
Brandt & Brandt Computer GmbH   WWW: http://www.bb-c.de/
Am Wiesenpfad 6, 53340 Meckenheim, GERMANYEmail: v...@bb-c.de
Handelsregister: Amtsgericht Bonn, HRB 10513  Schuhgröße: 46
Geschäftsführer: Rainer J.H. Brandt und Volker A. Brandt

"When logic and proportion have fallen sloppy dead"
___
OmniOS-discuss mailing list
OmniOS-discuss@lists.omniti.com
http://lists.omniti.com/mailman/listinfo/omnios-discuss


Re: [OmniOS-discuss] GZ BE missing libbe:uuid property after Kayak installation --> breakage

2016-07-01 Thread Dan McDonald

> On Jul 1, 2016, at 2:51 PM, Eric Sproul  wrote:
> 
> FWIW, since https://www.illumos.org/issues/4769 integrated we have
> /usr/bin/uuidgen.  All currently-supported OmniOS releases should have
> that (I know 014 does).

Yeah, uuidgen is the right way to do this, and since 014 is the earliest 
supported release, you're insured of success.

Thanks!
Dan

___
OmniOS-discuss mailing list
OmniOS-discuss@lists.omniti.com
http://lists.omniti.com/mailman/listinfo/omnios-discuss


Re: [OmniOS-discuss] GZ BE missing libbe:uuid property after Kayak installation --> breakage

2016-07-01 Thread Eric Sproul
On Fri, Jul 1, 2016 at 2:24 PM, Volker A. Brandt  wrote:
> Some nice people put a bash-only version of a UUID generator up on
> serverfault.

FWIW, since https://www.illumos.org/issues/4769 integrated we have
/usr/bin/uuidgen.  All currently-supported OmniOS releases should have
that (I know 014 does).
___
OmniOS-discuss mailing list
OmniOS-discuss@lists.omniti.com
http://lists.omniti.com/mailman/listinfo/omnios-discuss


Re: [OmniOS-discuss] GZ BE missing libbe:uuid property after Kayak installation --> breakage

2016-07-01 Thread Volker A. Brandt
Volker A. Brandt writes:
> Yes, the install_help.sh is definitely where it should go.  I think it
> should be in the BuildBE() shell function somewhere after the "zfs set
> mountpoint" line.  I'll try to come up with something.

Some nice people put a bash-only version of a UUID generator up on
serverfault.  So here is a first stab:

--8<8<--
*** install_help.sh.origThu Apr 14 18:29:37 2016
--- install_help.sh Fri Jul  1 20:22:16 2016
***
*** 99,104 
--- 99,131 
sleep 1
  }
  
+ # taken from https://gist.github.com/markusfisch/6110640
+ CreateUUID() {
+   local N B C='89ab'
+ 
+   for (( N=0; N < 16; ++N ))
+   do
+ B=$(( $RANDOM%256 ))
+ 
+ case $N in
+   6)
+  printf '4%x' $(( B%16 ))
+  ;;
+   8)
+  printf '%c%x' ${C:$RANDOM%${#C}:1} $(( B%16 ))
+  ;;
+   3 | 5 | 7 | 9)
+  printf '%02x-' $B
+  ;;
+   *)
+  printf '%02x' $B
+  ;;
+ esac
+   done
+ 
+  echo
+ }
+ 
  BuildBE() {
BOOTSRVA=`/sbin/dhcpinfo BootSrvA`
MEDIA=`getvar install_media`
***
*** 112,117 
--- 139,148 
curl -s $MEDIA | pv -B 128m | bzip2 -dc | zfs receive -u rpool/ROOT/omnios
zfs set canmount=noauto rpool/ROOT/omnios
zfs set mountpoint=legacy rpool/ROOT/omnios
+   UUID=`CreateUUID`
+   log "Generated UUID $UUID for BE root dataset"
+   zfs set org.opensolaris.libbe:uuid=$UUID  rpool/ROOT/omnios
+   zfs set org.opensolaris.libbe:policy=static rpool/ROOT/omnios
log "Cleaning up boot environment"
beadm mount omnios /mnt
ALTROOT=/mnt
***
*** 225,231 
  }
  
  RunInstall(){
!   FetchConfig || bomb "Could not fecth kayak config for target"
. $ICFILE
Postboot 'exit $SMF_EXIT_OK'
ApplyChanges || bomb "Could not apply all configuration changes"
--- 256,262 
  }
  
  RunInstall(){
!   FetchConfig || bomb "Could not fetch kayak config for target"
. $ICFILE
Postboot 'exit $SMF_EXIT_OK'
ApplyChanges || bomb "Could not apply all configuration changes"
--8<8<--

Sorry about the diff; my github-fu is currently zero.  Also sorry
about fixing the ancient typo in RunInstall; could not resist.

I can't test this until I have a new box to install; feel free to play
with it or ignore me until I follow up with a "confirmed working" mail.


Regards -- Volker
-- 

Volker A. Brandt   Consulting and Support for Oracle Solaris
Brandt & Brandt Computer GmbH   WWW: http://www.bb-c.de/
Am Wiesenpfad 6, 53340 Meckenheim, GERMANYEmail: v...@bb-c.de
Handelsregister: Amtsgericht Bonn, HRB 10513  Schuhgröße: 46
Geschäftsführer: Rainer J.H. Brandt und Volker A. Brandt

"When logic and proportion have fallen sloppy dead"
___
OmniOS-discuss mailing list
OmniOS-discuss@lists.omniti.com
http://lists.omniti.com/mailman/listinfo/omnios-discuss


Re: [OmniOS-discuss] GZ BE missing libbe:uuid property after Kayak installation --> breakage

2016-07-01 Thread Volker A. Brandt
Eric Sproul writes:
> On Fri, Jul 1, 2016 at 1:13 PM, Volker A. Brandt  wrote:
> > But wouldn't that mean that all instances installed via Kayak have
> > the same uuid?  Not sure I like that... IMHO this should rather go
> > into the actual client installation process somewhere.
>
> Yes, building those properties into the image would be bad. I'd say
> the proper thing would be to either add the necessary commands to the
> ApplyChanges function [1] or make a new function and have it run
> before MakeBootable.

Yes, the install_help.sh is definitely where it should go.  I think it
should be in the BuildBE() shell function somewhere after the "zfs set
mountpoint" line.  I'll try to come up with something.


Regards -- Volker
-- 

Volker A. Brandt   Consulting and Support for Oracle Solaris
Brandt & Brandt Computer GmbH   WWW: http://www.bb-c.de/
Am Wiesenpfad 6, 53340 Meckenheim, GERMANYEmail: v...@bb-c.de
Handelsregister: Amtsgericht Bonn, HRB 10513  Schuhgröße: 46
Geschäftsführer: Rainer J.H. Brandt und Volker A. Brandt

"When logic and proportion have fallen sloppy dead"
___
OmniOS-discuss mailing list
OmniOS-discuss@lists.omniti.com
http://lists.omniti.com/mailman/listinfo/omnios-discuss


Re: [OmniOS-discuss] GZ BE missing libbe:uuid property after Kayak installation --> breakage

2016-07-01 Thread Eric Sproul
On Fri, Jul 1, 2016 at 1:13 PM, Volker A. Brandt  wrote:
> But wouldn't that mean that all instances installed via Kayak have
> the same uuid?  Not sure I like that... IMHO this should rather go
> into the actual client installation process somewhere.

Yes, building those properties into the image would be bad. I'd say
the proper thing would be to either add the necessary commands to the
ApplyChanges function [1] or make a new function and have it run
before MakeBootable.

Eric

[1] https://github.com/omniti-labs/kayak/blob/master/install_help.sh#L202-L209
___
OmniOS-discuss mailing list
OmniOS-discuss@lists.omniti.com
http://lists.omniti.com/mailman/listinfo/omnios-discuss


Re: [OmniOS-discuss] GZ BE missing libbe:uuid property after Kayak installation --> breakage

2016-07-01 Thread Dan McDonald

> On Jul 1, 2016, at 1:13 PM, Volker A. Brandt  wrote:
> 
> I have a workaround, so there's no rush.  Have a good vacation!
> We can continue the discussion when you're back.

I'm also trying to get LX up and running on OmniOS.  I'll have some status for 
the list today, but there's still a lot of work to be done.

Dan

___
OmniOS-discuss mailing list
OmniOS-discuss@lists.omniti.com
http://lists.omniti.com/mailman/listinfo/omnios-discuss


Re: [OmniOS-discuss] GZ BE missing libbe:uuid property after Kayak installation --> breakage

2016-07-01 Thread Volker A. Brandt
Dan McDonald writes:
> > On Jul 1, 2016, at 12:43 PM, Volker A. Brandt  wrote:
> >
> > Note the "(null)" value for the parent BE... probably a follow-on error
> > because there was no uuid in the GZ BE in the first place.
> >
> > The GZ was installed via Kayak using the vanilla 95eaa7e r151018.zfs.bz2
> > and the NGZ was installed with a simple "zoneadm install", no clone or
> > anything special.
> >
> > Do you have any idea?  I am willing to supply further data if you want.
>
> The creation of the Kayak ZFS send stream probably needs to set these 
> properties.  Looking around here:
>
>   https://github.com/omniti-labs/kayak/blob/master/build_zfs_send.sh#L68
>
> that seems the natural place to do it.

But wouldn't that mean that all instances installed via Kayak have
the same uuid?  Not sure I like that... IMHO this should rather go
into the actual client installation process somewhere.

> I'm not able to fix it today, and I'm on vacation starting COB today.
> After I get back, I can probably respin media with a fixed version of
> this in place.

I have a workaround, so there's no rush.  Have a good vacation!
We can continue the discussion when you're back.


Regards -- Volker
-- 

Volker A. Brandt   Consulting and Support for Oracle Solaris
Brandt & Brandt Computer GmbH   WWW: http://www.bb-c.de/
Am Wiesenpfad 6, 53340 Meckenheim, GERMANYEmail: v...@bb-c.de
Handelsregister: Amtsgericht Bonn, HRB 10513  Schuhgröße: 46
Geschäftsführer: Rainer J.H. Brandt und Volker A. Brandt

"When logic and proportion have fallen sloppy dead"
___
OmniOS-discuss mailing list
OmniOS-discuss@lists.omniti.com
http://lists.omniti.com/mailman/listinfo/omnios-discuss


Re: [OmniOS-discuss] GZ BE missing libbe:uuid property after Kayak installation --> breakage

2016-07-01 Thread Dan McDonald

> On Jul 1, 2016, at 12:43 PM, Volker A. Brandt  wrote:
> 
> Note the "(null)" value for the parent BE... probably a follow-on error
> because there was no uuid in the GZ BE in the first place.
> 
> The GZ was installed via Kayak using the vanilla 95eaa7e r151018.zfs.bz2
> and the NGZ was installed with a simple "zoneadm install", no clone or
> anything special.
> 
> Do you have any idea?  I am willing to supply further data if you want.

The creation of the Kayak ZFS send stream probably needs to set these 
properties.  Looking around here:

https://github.com/omniti-labs/kayak/blob/master/build_zfs_send.sh#L68

that seems the natural place to do it.  If you're feeling ambitious, you can 
fix this script and see if you can build your own Kayak send stream.  We do 
consider pull requests in any omniti-labs repo for OmniOS (illumos-omnios, 
omnios-build, pkg5, kayak).

I'm not able to fix it today, and I'm on vacation starting COB today.  After I 
get back, I can probably respin media with a fixed version of this in place.

Dan

___
OmniOS-discuss mailing list
OmniOS-discuss@lists.omniti.com
http://lists.omniti.com/mailman/listinfo/omnios-discuss