7166325 mountpoint option being lost for dataset creation for zones install
authorMatt Keenan <matt.keenan@oracle.com>
Tue, 08 May 2012 00:28:51 +0100
changeset 1668 ed1483d8def9
parent 1667 804eacbe41fc
child 1669 5889a0b7b4d6
7166325 mountpoint option being lost for dataset creation for zones install
usr/src/lib/install_target/instantiation_zone.py
--- a/usr/src/lib/install_target/instantiation_zone.py	Fri May 04 14:46:23 2012 -0600
+++ b/usr/src/lib/install_target/instantiation_zone.py	Tue May 08 00:28:51 2012 +0100
@@ -21,7 +21,7 @@
 #
 
 #
-# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
 #
 
 """ instantiation.py - target instantiation checkpoint.  Parses the Data Object
@@ -87,7 +87,17 @@
             shared_fs_zfs_properties_list = list()
             for fs in fs_list:
                 if fs.action == "create":
+                    # if mountpoint is set then append to zfs_options
                     zfs_options = fs.get_first_child(class_type=Options)
+                    if fs.mountpoint:
+                        if zfs_options:
+                            # Add mountpoint to zfs_options data_dict
+                            zfs_options.data_dict["mountpoint"] = fs.mountpoint
+                        else:
+                            # Create new Options object
+                            zfs_options = Options(fs.name,
+                                                {"mountpoint": fs.mountpoint})
+
                     if fs.in_be:
                         # Append filesystem name to BE filesystem list
                         be_fs_list.append(fs.name)