Flag Days » Flag Day: AI Manifest Changes
en

Flag Day: AI Manifest Changes

Changes To AI Manifest for AI

Overview

In a recent push to Caiman we have changed the Auto Install Manifest format to provide better support for selection of targets. This is an update from the Solaris 11 Express release's format.

We have updated the Target specification significantly, making it simpler, yet more functional if you wish to do more than the basic install.

We also made a minor change to the Software nodes to more correctly reflect its expected behaviour.

This document tries to outline these changes.

Actions

As a result of this change there are several task that people will need to perform to be able to use this update:

  • Ensure you are running your AI server on a very recent build - this should not prevent you from serving older AI client configurations.
  • Update your AI XML manifest to reflect the changes in the format, details on this are documented below.
  • If using the default.xml, because of some changes in that file, please ensure you are using the current version for snv_167 onwards. The file is located at:
    • /usr/share/auto_install/default.xml

Changes in Target Nodes

The <target> section of the manifest changed in the following ways:

  • The <target_spec> tag has been removed since it was felt it provided no real function.
  • The <swap> and <dump> tags have been removed in favour of specifying attributes on a <zvol>
  • <zpool> tags have been moved into a new <logical> section.
  • On X86, slices can only be specified within a <partition> tag.
  • You can influence the automatic creation of a swap or dump device via attributes of the <logical> tag.
  • A zpool consists of several <vdev> groups, each with its own redundancy type.
  • To specify what disk, partition or slice is included in a <vdev> group you specify the attributes in_zpool and/or in_vdev. The values of these need to be able to uniquely identify the vdev in a zpool.
  • It’s no longer possible to specify that a slice is_root, to achieve this you now add that slice to zpool that has the attribute is_root by specifying that zpools name and/or vdev name in the in_zpool and in_vdev attributes of the slice.
  • Filesystems (ZFS datasets) may be created as being contained within a BE, so that each BE has a separate version of that dataset. This is done by specifying the in_be attribute on a <filesystem> tag.
  • The <partition> action use_existing is now changed to use_existing_solaris2 to more accurately reflect its meaning.
  • It is now possible to set the name of the new Boot Environment using the <be name="be_name"> tag within the root pool definition.
  • In all cases when specifying partitions or slices, if there are prior existing if either, these will be merged into what is specified in the manifest - the aim being to cause "least damage".
    • If you wish to really delete existing slices or paritions, you will need to specify these. 
    • Order does tend to be important, best to delete first, create partitions with specific sizes next, and finally if you want to allocate rest of disk to another, put it last. 
    • There is no need to delete a partition you're creating - the assumption is to delete it if it's the same name and you want to create it.

Removal of DTDs in /usr/share/auto_install

For Solaris 11 Express an AI Manifest would have referenced the DTDs in the directory:

  • /usr/share/auto_install

Part of the change in the format of the AI manifest is to switch to using an XML DTD schema that shares elements with Distro Constructor. 

In doing this, the new DTDs have been placed in a common directory:

  • /usr/share/install

For example:


<!DOCTYPE auto_install SYSTEM "file:///usr/share/auto_install/ai.dtd">

You should change these references at the top of your AI XML files, to read more like:


<!DOCTYPE auto_install SYSTEM "file:///usr/share/install/ai.dtd">

Conversion Utility

To help people migrate pre-167 versions of their AI manifests, a utility is provided that transforms the existing AI manifest to the newer format using XSLT.

The utility is provided in the install sources (slim_source) in the directory:

  • usr/src/cmd/auto-install/xslt  

If you don't know how to access the sources, you can also down load the files from:

or by right-clicking on the files:

and saving them.

The aim with the script is to lessen the load when migrating existing AI manifests, some manual editing may still be required, depending on your use of the manifest.

To convert a 151a up to 166 version of the AI manifest to the new version in 167, please run the new_to_newer.py script, the usage of this command is:

new-to-newer.py - Convert old-style XML AI Manifests to the new schema.

For convenience, the command-line interface has similar semantics to cp(1).

Usage:
        new-to-newer.py [options] infile outfile
        new-to-newer.py [options] infile... outdir
        new-to-newer.py -r [options] indir... outdir

Options:
       -f        : force overwrite if output already exists
       -r        : recursively transform .xml files in named sub-directory
       -h --help : print this help page and exit

After converting your manifests you should run the command:

  • xmllint -valid <file>

to see if the file you are using validates before using it to install your client.

Examples

Some examples of what this now looks like are:

Example 1: Specify to use the whole of a specific disk and no swap or dump

<target>
 <!-- Any disk here will be added to root pool, since no root pool is specified -->
 <disk whole_disk="True">
   <disk_name name="c10t0d0" name_type="ctd"/>
 </disk>
 <logical noswap="true" nodump="true"/>            <!-- default rpool will be added ->
</target>

Example 2: Specify to delete existing slices on SPARC

<target>
 <!-- Any disk here will be added to root pool, since no root pool is specified -->
 <disk whole_disk="False">
   <disk_name name="c3t0d0" name_type="ctd"/>
   <!-- Delete slices we don't want first -->
   <slice name="1" action="delete"/>
   <slice name="2" action="delete"/>
   <slice name="3" action="delete"/>
   <slice name="4" action="delete"/>
   <slice name="5" action="delete"/>
   <slice name="6" action="delete"/>
   <!-- Create slices with sizes first -->
   <slice name="7" action="create">
     <size val="512m"/>
   </slice>
   <!-- Now allocate the rest of the disk to slice 0 -->
   <slice name="0" action="create"/>
 </disk>
 <!-- default rpool with swap and dump zvols will be added ->
</target>

Example 3: Specify to delete existing partitions, preserving 1 on X86

<target>
 <!-- Any disk here will be added to root pool, since no root pool is specified -->
 <disk whole_disk="False">
   <disk_name name="c3t0d0" name_type="ctd"/>
     <!-- Preserve Windows partition -->
     <patition name="1" action="preserve"/>
     <!-- Delete other partitions -->
     <patition name="3" action="delete"/>
     <patition name="4" action="delete"/>
     <!-- Now add a solaris partition to use available space -->
     <patition name="2" action="create"/>
       <!-- Create slices with sizes first -->
       <slice name="7" action="create">
         <size val="512m"/>
       </slice>
       <!-- Now allocate the rest of the disk to slice 0 -->
       <slice name="0" action="create"/>
 </disk>
 <!-- default rpool with swap and dump zvols will be added ->
</target>

Example 4: Specify two whole disks for inclusion in the root pool

<target>
 <!-- Disks are added to the root pool using the in_zpool value -->
 <disk whole_disk="true" in_zpool="myrpool">
   <disk_name name="c10t0d0" name_type="ctd" />
 </disk>
 <disk whole_disk="true" in_zpool="myrpool">
   <disk_name name="c7d0" name_type="ctd"/>
 </disk>
 <logical>
   <!-- Define a root pool that will have the name 'myrpool' -->
   <zpool name="myrpool" is_root="true"/>
 </logical>
</target>

Example 5: Specify two disks in a root pool with a hot-spare and a cache disk

<target>
  <!--
        Disks are added to the root pool using the in_zpool value

        Since there are multiple <vdev> tags it is necessary to tell which of
        these a disk should be put in using the in_vdev attribute as well.
   -->

  <disk whole_disk="true" in_zpool="myroot" in_vdev="mymirrored">
    <disk_name name="c7d0" name_type="ctd"/>
  </disk>
  <disk whole_disk="true" in_zpool="myroot" in_vdev="mymirrored">
    <disk_name name="c7d1" name_type="ctd"/>
  </disk>
  <disk whole_disk="true" in_zpool="myroot" in_vdev="myspare">
    <disk_name name="c8d0" name_type="ctd"/>
  </disk>
  <disk whole_disk="true" in_zpool="myroot" in_vdev="mycache">
    <disk_name name="c8d1" name_type="ctd"/>
  </disk>
  <logical>
    <zpool name="myroot" is_root="true" action="create">
      <vdev name="mymirrored" redundancy="mirror"/>
      <vdev name="myspare" redundancy="spare"/>
      <vdev name="mycache" redundancy="cache"/>
    </zpool>
  </logical>
</target>

Example 6: Specify a root pool with one disk, and a data pool with two disks

<target>
 <!-- Put this disk in the root pool "myroot" -->
 <disk whole_disk="true" in_zpool="myroot">
   <disk_name name="c7d1" name_type="ctd"/>
 </disk>
 <!-- Put these disks in the non-root (data) pool "data" -->
 <disk whole_disk="true" in_zpool="data">
   <disk_name name="c8d0" name_type="ctd"/>
 </disk>
 <disk whole_disk="true" in_zpool="data">
   <disk_name name="c8d1" name_type="ctd"/>
 </disk>
 <logical>
   <zpool name="myroot" is_root="true" action="create"/>
   <!--
        A default vdev with redundancy of mirror will be created if there are
        more than one disk, otherwise it will default to 'none' for the
        redundancy
    -->

   <zpool name="data"/>
 </logical>
</target>

Example 7: Specify a root pool with 1 disk, and a data pool with two mirrored disks and 2 mirrored logs

<target>
  <disk whole_disk="true" in_zpool="myroot">
    <disk_name name="c10t0d0" name_type="ctd"/>
  </disk>
  <disk whole_disk="true" in_zpool="data" in_vdev="mirrored">
    <disk_name name="c7d0" name_type="ctd"/>
  </disk>
  <disk whole_disk="true" in_zpool="data" in_vdev="mirrored">
    <disk_name name="c7d1" name_type="ctd"/>
  </disk>
  <disk whole_disk="true" in_zpool="data" in_vdev="mirrored-log">
    <disk_name name="c8d0" name_type="ctd"/>
  </disk>
  <disk whole_disk="true" in_zpool="data" in_vdev="mirrored-log">
    <disk_name name="c8d1" name_type="ctd"/>
  </disk>
  <logical>
    <zpool name="myroot" is_root="true" action="create"/>
    <zpool name="data" is_root="false" action="create">
      <vdev name="mirrored" redundancy="mirror"/>
      <vdev name="mirrored-log" redundancy="logmirror"/>
    </zpool>
  </logical>
</target>

Example 8: Automatic selection of disk, but layout the root pool, adding some datasets.

<target>
  <!--
        The omitted listing of disks will cause AI to automatically discover
        the root disk to use.
   -->

  <logical>
    <zpool name="myrpool" is_root="true">
      <!-- Add two datasets -->
      <filesystem name="tank"/>
      <filesystem name="tank/home"/>
      <!-- Define the name of the Boot Environment to be 'mysolaris' -->
      <be name="mysolaris"/>
    </zpool>
  </logical>
</target>

Example 9: Define a root pool, with one whole-disk, and one slice on a disk, and define specific swap and dump zvols rather than automatic creation

<target>
 <disk whole_disk="true" in_zpool="myrpool">
   <disk_name name="c10t0d0" name_type="ctd" />
 </disk>
 <disk whole_disk="false">
   <disk_name name="c7d0" name_type="ctd" />
   <!-- Define a Solaris partition -->
   <partition action="create" name="1" part_type="191">
     <size val="390714880secs" start_sector="512" />
     <!-- Define a slice, and add this slice to the root pool -->
     <slice name="0" action="create" force="false" is_swap="false" in_zpool="myrpool">
       <size val="390714880secs" start_sector="512" />
     </slice>
   </partition>
 </disk>
 <logical>
   <zpool name="myrpool" is_root="true">
     <!-- Define the Swap and Dump zvols to use a size of 747 Megabytes -->
     <zvol name="swap" action="create" use="swap">
       <size val="747m" />
     </zvol>
     <zvol name="dump" action="create" use="dump">
       <size val="747m" />
     </zvol>
   </zpool>
 </logical>
</target>

Changes in Software Node

In the <software> node, it was possible to specify different install types on the <software_data> node, but this would later fail since its not a supported configuration and you can only specify one type of install per <software> node.

So the change made here was to move the type attribute from the <software_data> node to the <software> node since it more accurately reflects what is possible. To perform multiple install types, you need to repeat the <software> section.

An example of this would be:

<software type="IPS">
 <source>
   <publisher name="solaris">
     <origin name="http://pkg.oracle.com/solaris/release"/>
   </publisher>
 </source>

 <software_data action="install">
   <name>pkg:/entire</name>
   <name>pkg:/babel_install</name>
 </software_data>

 <software_data action="uninstall">
   <name>pkg:/babel_install</name>
   <name>pkg:/slim_install</name>
 </software_data>
</software>
<software type="IPS">
   <!-- ... and so on -->
</software>
Tags:
Created by Darren Kenny on 2011/05/26 11:59
Last modified by Ethan Quach on 2011/06/16 22:43

Collectives

Project caiman Pages


XWiki Enterprise 2.7.1.34853 - Documentation