Hi Matt,

Generally, looking good, but have some comments, mainly nits:

In auto_install.py:

- You could probably re-write the following code:

  641    zpools_to_import = None
  642    for zpool in [z for z in desired_zpools if not z.is_root]:
  643        if zpools_to_import is None:
  644            zpools_to_import = zpool.name
  645        else:
  646            zpools_to_import = zpools_to_import + " " + zpool.name

  as simply:

    non_root_zpools = [z.name for z in desired_zpool if not z.is_root]
    zpools_to_import = " ".join(non_root_zpools)

  This should work too.

- The zp_fh.close() shouldn't be required any more due to the with statement.

In svc-system-config;

- I wonder if the name "zpool" might be too generic, and maybe should be
  something more specific like "zpool_imports" or "zpool_config"?

- I'm assuming the need for the -f flag on the import is unavoidable due the
  fact that it's possible for a data zpool to have swap or dump devices in it,
  is that right?

Thanks,

Darren.


On 02/06/2011 12:03, Matt Keenan wrote:
> Hi,
>
> Can I get a code review for bug :
>    7048223 Multi-pool installed data pools need to be imported on first
>            boot
>    http://monaco.sfbay.sun.com/detail.jsf?cr=7048223
>
> Webrev:
>    http://cr.opensolaris.org/~mattman/bug-7048223/
>
>
> Some background :
>    With the integration of CUD based AI installations, Multi-Pool
> support has been added. All pools other than the root pool (data pools)
> created during an AI install do not get automatically imported when the
> installed client boots. This is because they are not created within the
> newly installed BE.
>
>    Not importing these pools on first boot could potentially have
> catastrophic effects, in scenarios where dump/swap volumes were being
> created on a data pool instead of the root pool, or where user account
> home directories are being created on a non root pool, These datasets
> would not be available on boot if the pools are not imported.
>
>    I've spent considerable time testing various scenarios to try and get
> this to happen, and initiated a discussion on zfs-discuss to determine
> the easiest means of achieving this.
>
>    Usage of zpool create/import with -R altroot and -o cachefile options
> were mentioned as potential solutions, however these have proved
> unsuccessful, due to hostid issues.
>
>    The proposed solution extends the System Config SMF used on first
> boot, adding support to import data zpools specified via a profile which
> is created during install and placed on the new BE.
>
> cheers
>
> Matt
> _______________________________________________
> caiman-discuss mailing list
> [email protected]
> http://mail.opensolaris.org/mailman/listinfo/caiman-discuss
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss

Reply via email to