Bug 8661 - AI fails to continue installation if Slices exists from previous configuration
: AI fails to continue installation if Slices exists from previous configuration
Status: ACCEPTED
Product: installer
autoinstall
: unspecified
: i86pc/i386 OpenSolaris
: P2 major (vote)
: 2010.1H
Assigned To: installer watcher
:
:
: x64-solaris-qt, reviewed-2009.06, rn5
:
:
: 8562
  Show dependency treegraph
 
Reported: 2009-05-05 15:25 UTC by Praveen Shivasharan
Modified: 2009-05-07 15:24 UTC (History)
5 users (show)

See Also:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description Praveen Shivasharan 2009-05-05 15:25:53 UTC
While installing osol_111a I noticed that AI fails to proceed because the 
slice it's trying to create already exists. I'm not sure if that's a 
prerequisite for AI. IMO if a user/administrator has pre-defined the slice 
information in ai_manifest file then I guess it should take precedence and AI 
should simply create them or reuse them if they match the properties defined in 
ai_manifest file. BTW, it's not even clear which Slice it's complaining about 
Slice 1 (Root) or Slice 4 or 7 (defined by administrator)

The reason why we need this feature is we will create/mount slices and use them
in future within our automated testing environment. More or less it's 
a pain to destroy  the slices every now and then when we reinstall the OS. 

root@opensolaris:/tmp#
root@opensolaris:/tmp# tail -20 /tmp/install_log
<AI May  5 14:35:40> /tmp/ai_combined_manifest.xml is a valid manifest
<AI May  5 14:35:40> Auto reboot disabled
<AI May  5 14:53:32> Disk = c8t0d0 found on the system
<AI May  5 14:53:32> Disk name selected for installation is c8t0d0
<AI May  5 14:53:32> no manifest partition information found
<OM May  5 14:53:32> disk partition info not changed
<OM May  5 14:53:32> System reports enough physical memory for installation,
swap is optional
<OM_E May  5 14:53:32> creating slice which already exists
<AI May  5 14:53:32> failed to modify slice(s) specified in the manifest
<AI May  5 14:53:32> Auto install failed

root@opensolaris:/tmp# prtvtoc /dev/rdsk/c8t0d0s2
* /dev/rdsk/c8t0d0s2 partition map
*
* Dimensions:
*     512 bytes/sector
*      63 sectors/track
*     255 tracks/cylinder
*   16065 sectors/cylinder
*   17826 cylinders
*   17824 accessible cylinders
*
* Flags:
*   1: unmountable
*  10: read-only
*
* Unallocated space:
*       First     Sector    Last
*       Sector     Count    Sector
*           0  62910540  62910539
*
*                          First     Sector    Last
* Partition  Tag  Flags    Sector     Count    Sector  Mount Directory
       1      2    00   62910540 223415955 286326494
       2      5    00          0 286342560 286342559
       4      0    00      16065  20948760  20964824
       7      0    00   20964825  41929650  62894474
       8      1    01          0     16065     16064
root@opensolaris:/tmp#

Manifest files
==============
::::::::::::::
ai_d53c_111a.xml
::::::::::::::
<ai_manifest name="ai_d53c_111a.xml">
    <ai_target_device>
         <target_device_name>c8t0d0</target_device_name>

<target_device_install_slice_number>1</target_device_install_slice_number>
    </ai_target_device>
    <ai_device_vtoc_slices>
         <slice_action>create</slice_action>
         <slice_number>4</slice_number>
         <slice_size>10</slice_size>
         <slice_size_units>GB</slice_size_units>
     </ai_device_vtoc_slices>
    <ai_device_vtoc_slices>
         <slice_action>create</slice_action>
         <slice_number>7</slice_number>
         <slice_size>20</slice_size>
         <slice_size_units>GB</slice_size_units>
     </ai_device_vtoc_slices>
    <ai_pkg_repo_default_authority>
        <main url="http://ipkg.sfbay/dev" authname="ipkg.sfbay"/>
    </ai_pkg_repo_default_authority>
    <ai_pkg_repo_addl_authority>
        <main url="http://pkg.opensolaris.org/dev" authname="opensolaris.org"/>
   </ai_pkg_repo_addl_authority>
    <ai_packages>
        <package_name>entire@0.5.11,5.11-0.111:20090418T200225Z</package_name>
        <package_name>SUNWcsd</package_name>
        <package_name>SUNWcs</package_name>
        <package_name>babel_install</package_name>
    </ai_packages>
    <ai_uninstall_packages>
         <pkg name="babel_install"/>
         <pkg name="slim_install"/>
     </ai_uninstall_packages>
    <ai_auto_reboot>false</ai_auto_reboot>
</ai_manifest>
::::::::::::::
criteria_d53c_111a.xml
::::::::::::::
<ai_criteria_manifest>
        <ai_criteria name="MAC">
            <range>
                00:1e:68:49:b7:9c
                00:1e:68:49:b7:9c
            </range>
        </ai_criteria>
        <ai_manifest_file URI="./ai_d53c_111a.xml"/>
        <sc_manifest_file name="AI" URI="./sc_d53c_111a.xml"/>
</ai_criteria_manifest>
::::::::::::::
sc_d53c_111a.xml
::::::::::::::
<?xml version='1.0'?>
<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
<service_bundle type='profile' name='name'>

  <service name='ai_properties' version='1' type='service'>
    <instance name='default' enabled='true'>
      <property_group name='ai' type='application'>
        <propval name='rootpass' type='astring'
value='$5$bh8iAJNq$B.hzKao4NVmZF.VQ9GRzo2yBbs9pBZU7PzBrinNx9D6' />
        <propval name='timezone' type='astring' value='US/Pacific' />
        <propval name='hostname' type='astring' value='d53c' />
      </property_group>
    </instance>
  </service>
</service_bundle>
root@mpk1200-ai:/export/ai/manifests#
Comment 1 Praveen Shivasharan 2009-05-06 16:41:26 UTC
Some more inputs, even if the disk has only one slice i.e slice 1 which 
by default is the target slice for root, AI fails. 

root@opensolaris:/tmp# more ai_combined_manifest.xml
<ai_criteria_manifest>
        <ai_embedded_manifest>
<ai_manifest name="ai_d53c_111a.xml">
    <ai_target_device>
         <target_device_name>c7t0d0</target_device_name>

<target_device_install_slice_number>1</target_device_install_slice_number>

root@opensolaris:/tmp# prtvtoc /dev/rdsk/c7t0d0s2
* /dev/rdsk/c7t0d0s2 partition map
*
* Dimensions:
*     512 bytes/sector
*      63 sectors/track
*     255 tracks/cylinder
*   16065 sectors/cylinder
*   17826 cylinders
*   17824 accessible cylinders
*
* Flags:
*   1: unmountable
*  10: read-only
*
* Unallocated space:
*       First     Sector    Last
*       Sector     Count    Sector
*           0  62910540  62910539
*
*                          First     Sector    Last
* Partition  Tag  Flags    Sector     Count    Sector  Mount Directory
       1      2    00   62910540 223415955 286326494
       2      5    00          0 286342560 286342559
       8      1    01          0     16065     16064
root@opensolaris:/tmp#
root@opensolaris:~# more /tmp/install_log
<AI May  6 15:40:15> /tmp/ai_combined_manifest.xml is a valid manifest
<AI May  6 15:40:15> Auto reboot disabled
<AI May  6 15:57:56> Disk = c7t0d0 found on the system
<AI May  6 15:57:56> Disk name selected for installation is c7t0d0
<AI May  6 15:57:56> no manifest partition information found
<OM May  6 15:57:56> disk partition info not changed
<OM May  6 15:57:56> System reports enough physical memory for installation,
swap is optional
<OM_E May  6 15:57:56> creating slice which already exists
<AI May  6 15:57:56> failed to modify slice(s) specified in the manifest
<AI May  6 15:57:56> Auto install failed
Comment 2 Ethan Quach 2009-05-06 18:38:03 UTC
This is indeed a bug.  I was just able to reproduce this behavior.

In general, when the <slice_action>create</slice_action>
tag is used to create a slice, it expects that slice to not
already be existing; if that slice already exists it fails.

It would seem like the specification of "create" should imply
that the user wants to blow away that slice if it already
exists there.

A workaround that works only in some cases is to additionally
define the <slice_action>delete</slice_action> tag in the manifest
to specify to delete that slice as well.  If your disk has available
space (not counting the existing slice you're trying to create)
to accommodate the size of the slice you want to create, then
the install won't fail.
Comment 3 Ethan Quach 2009-05-06 18:40:00 UTC
(In reply to comment #1)
> Some more inputs, even if the disk has only one slice i.e slice 1 which 
> by default is the target slice for root, AI fails. 
> 
> root@opensolaris:/tmp# more ai_combined_manifest.xml
> <ai_criteria_manifest>
>         <ai_embedded_manifest>
> <ai_manifest name="ai_d53c_111a.xml">
>     <ai_target_device>
>          <target_device_name>c7t0d0</target_device_name>
>         
> <target_device_install_slice_number>1</target_device_install_slice_number>

This failure is surprising.  I tested this as well, and it worked for
me.  Can you attach the entire manifest used for this case.  Thanks.
Comment 4 Ethan Quach 2009-05-07 08:50:38 UTC
Not a blocker for 2009.06; marking reviewed.
We will release note this bug.
Comment 5 Praveen Shivasharan 2009-05-07 10:09:56 UTC
Here is the combined ai_manifest file requested in comments#3 

root@opensolaris:/tmp# more ai_combined_manifest.xml
<ai_criteria_manifest>
        <ai_embedded_manifest>
<ai_manifest name="ai_d53c_111a.xml">
    <ai_target_device>
         <target_device_name>c7t0d0</target_device_name>

<target_device_install_slice_number>1</target_device_install_slice_number>
    </ai_target_device>
    <ai_device_vtoc_slices>
         <slice_action>create</slice_action>
         <slice_number>4</slice_number>
         <slice_size>10</slice_size>
         <slice_size_units>GB</slice_size_units>
     </ai_device_vtoc_slices>
    <ai_device_vtoc_slices>
         <slice_action>create</slice_action>
         <slice_number>7</slice_number>
         <slice_size>20</slice_size>
         <slice_size_units>GB</slice_size_units>
     </ai_device_vtoc_slices>
    <ai_pkg_repo_default_authority>
        <main url="http://ipkg.sfbay/dev" authname="ipkg.sfbay"/>
    </ai_pkg_repo_default_authority>
    <ai_pkg_repo_addl_authority>
        <main url="http://pkg.opensolaris.org/dev" authname="opensolaris.org"/>
    </ai_pkg_repo_addl_authority>
    <ai_packages>
        <package_name>entire@0.5.11,5.11-0.111:20090418T200225Z</package_name>
        <package_name>SUNWcsd</package_name>
        <package_name>SUNWcs</package_name>
        <package_name>babel_install</package_name>
    </ai_packages>
    <ai_uninstall_packages>
         <pkg name="babel_install"/>
         <pkg name="slim_install"/>
     </ai_uninstall_packages>
    <ai_auto_reboot>false</ai_auto_reboot>
</ai_manifest>
        </ai_embedded_manifest>
        <sc_embedded_manifest name = "AI">
                <!-- <?xml version='1.0'?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<service_bundle type="profile" name="name">

  <service name="ai_properties" version="1" type="service">
    <instance name="default" enabled="true">
      <property_group name="ai" type="application">
        <propval name="rootpass" type="astring"
value="$5$bh8iAJNq$B.hzKao4NVmZF.VQ9GRzo2yBbs9pBZU7PzBrinNx9D6"/>
        <propval name="timezone" type="astring" value="US/Pacific"/>
        <propval name="hostname" type="astring" value="d53c"/>
      </property_group>
    </instance>
  </service>
</service_bundle>
         -->
        </sc_embedded_manifest>
        </ai_criteria_manifest>
Comment 6 Ethan Quach 2009-05-07 15:24:07 UTC
(In reply to comment #5)
> Here is the combined ai_manifest file requested in comments#3 
> 

I'm still unable to reproduce this part.  I've cut'n'pasted the
slice definitions from your manifest, and setup up a disk to have
the same pre-existing slices and it doesn't fail for me.  slice1 gets
used as the target root, and slice4 and slice7 are created.

Does this happen again and again when you reboot this system into AI
using this same manifest?

Other things I can ask you to try so that we can possibly narrow
down the issue are:

    1.  In the manifest, remove definition of slice4 and slice7
        See if this installation works.

    2.  Reintroduce the slice4 definition, see if this install works.