7007793 target instantiation does not handle 'preserve' action correctly
authorAlok Aggarwal <Alok.Aggarwal@Sun.COM>
Mon, 20 Dec 2010 15:30:30 -0800
changeset 967 524de3368b08
parent 966 8c40f979a2a0
child 968 196eafb14485
7007793 target instantiation does not handle 'preserve' action correctly 7007794 DC does not abort if target instantiation or manifest parser fails
usr/src/cmd/distro_const/__init__.py
usr/src/lib/install_target/ti.py
--- a/usr/src/cmd/distro_const/__init__.py	Mon Dec 20 13:11:17 2010 -0800
+++ b/usr/src/cmd/distro_const/__init__.py	Mon Dec 20 15:30:30 2010 -0800
@@ -267,9 +267,8 @@
                               CalledProcessError):
                     DC_LOGGER.debug(os.strerror(
                         err.error_data[ES_DATA_EXCEPTION].returncode))
-        DC_LOGGER.info("Please check the log for additional error messages.")
-        DC_LOGGER.info("Log: %s" % log)
-
+        raise RuntimeError("Please check the log for additional error "
+                           "messages. \nLog: " + log) 
 
 def parse_manifest(manifest):
     """ function to parse the manifest
@@ -600,11 +599,6 @@
 
                 execute_checkpoint(new_detaillog, resume_checkpoint,
                     pause_checkpoint)
-                if errsvc._ERRORS:
-                    return 1
-
-                return 0
-
     # catch any errors and log them.
     except BaseException as msg:
         if DC_LOGGER is not None:
--- a/usr/src/lib/install_target/ti.py	Mon Dec 20 13:11:17 2010 -0800
+++ b/usr/src/lib/install_target/ti.py	Mon Dec 20 15:30:30 2010 -0800
@@ -153,8 +153,9 @@
                     # if the dataset doesn't exist, create it
                     if not new_fs.exists:
                         new_fs.create()
-                    if filesystem_entry.mountpoint is not None:
-                        new_fs.set("mountpoint", filesystem_entry.mountpoint)
+                        if filesystem_entry.mountpoint is not None:
+                            new_fs.set("mountpoint", 
+                                filesystem_entry.mountpoint)
 
             zvol_list = dataset_entry.get_descendants(class_type=Zvol)
             # walk all zvols