Sun N1 System Manager 1.3 Operating System Provisioning Guide

Managing OS Updates

Managing OS updates includes such tasks as copying OS updates, loading OS updates on a server or server group, listing OS updates, deleting OS updates, and uninstalling OS updates.

ProcedureTo Copy an OS Update

This procedure describes how to copy an OS update to the N1 System Manager. Once an OS update is copied, you can use the command line or the browser interface to install the OS update on a managed server.

This graphic illustrates the two-step process used to
create and verify a new OS update.
Before You Begin

Ensure that the OS update is available to the management server on the local file system, a network accessible file, or a web site. You can copy OS updates in the following formats:


Note –

The *.tar file must match the top-level directory name after the tar expansion. For example, if the tar file is SUNWstade.tar, the top-level directory of the tar expansion must be SUNWstade.


If you use the installscriptfile parameter when creating an OS update, consider loading the OS update on a single server to test whether the script is working correctly before loading on a large server group.

Steps
  1. Log in to the N1 System Manager.

    See To Access the N1 System Manager Command Line in Sun N1 System Manager 1.3 Discovery and Administration Guide for details.

  2. Copy the OS update to the N1 System Manager.


    N1-ok> create update update file file ostype ostype [adminfile adminfile]
    [responsefile responsefile] [installscriptfile installscriptfile]

    Use the tab completion help to find out the valid ostype values.

    See create update in Sun N1 System Manager 1.3 Command Line Reference Manual for details.

  3. Confirm that the OS update copy has been successful.


Example 5–1 Copying an OS Update Through the Command Line

The following example command shows how to copy an OS update named RH3_update. where the ostype is Red Hat Enterprise Linux, AS 3.0 and the location of the update file is /tmp/test-i386.rpm.


N1-ok> create update RH3_update file /tmp/test-i386.rpm ostype=redhat-as3


Example 5–2 Copying an OS Update With a Package Install Script Through the Command Line

This example shows an executable Bourne shell (/bin/sh) package installation script.

#!/bin/sh
echo "This is from the install script:"
echo "pkgadd -n -a /tmp/combo-pkgs.pkg.admin -d /tmp/combo-pkgs.pkg SUNWtest1 SUNWtest2"
pkgadd -n -a /tmp/combo-pkgs.pkg.admin -d /tmp/combo-pkgs.pkg SUNWtest1 SUNWtest2
exit $?

The following sample command shows how to associate the package installation script with the OS update files. This example assumes that you have copied the script to the management server's /tmp directory with the name install.sh.


N1-ok> create update combo file /tmp/combo-pkgs.pkg ostype solaris10x86 adminfile 
/tmp/combo-pkgs.pkg.admin installscriptfile /tmp/install.sh

In this example, /tmp/combo-pkgs.pkg contains two Solaris packages in the datastream format.

The script and the source files for the OS update are copied to the target server when the load server server-name update command is issued. The installation script file is executed by using the Bourne shell with the full path to the package file as the sole argument. If the adminfile subcommand is not specified, the default admin file is also copied to the target server and is renamed with .admin appended to the source file name.


Troubleshooting

Refer to OS Update Creation Fails in Sun N1 System Manager 1.3 Troubleshooting Guide for solutions to common errors.

See Also

To find out how to load an OS update, see To Load an OS Update on a Server or a Server Group

ProcedureTo Copy a Custom OS Update

Steps
  1. Log in to the N1 System Manager.

    See To Access the N1 System Manager Command Line in Sun N1 System Manager 1.3 Discovery and Administration Guide for details.

  2. Copy the custom OS update to the N1 System Manager.


    N1-ok> create update update updatetype other file file ostype ostype 
    installscriptfile installscriptfile [adminfile adminfile] [responsefile responsefile]

    Note –

    Even though the tab completion allows this argument anywhere in the create update command, the command will fail if updatetype other is not the first argument.


    Use the tab completion help to find out the valid ostype values.

    See create update in Sun N1 System Manager 1.3 Command Line Reference Manual for details.


Example 5–3 Copying an Custom OS Update With a Patch Installation Script Through the Command Line

This example shows an executable Bourne shell (/bin/sh) patch installation script.

#!/bin/sh
mkdir /tmp/layer
cd /tmp/layer
echo "untar the source:"
tar -xvf /tmp/mypatches.tar
echo "let's install mypatches:"
patchadd -M /tmp/layer 117448-01 117466-01
cd /tmp
rm -rf /tmp/layer
exit $?

The following sample command shows how to copy the patch installation script to N1 System Manager with the OS update files. This example assumes that you have copied the script to the management server's /tmp directory with the name install.sh.


N1-ok> create update mypatches updatetype other file /tmp/mypatches.tar ostype solaris10x86 installscriptfile 
/tmp/install.sh

In this example, /tmp/mypatches.tar contains the Solaris patches 117448–01 and 117466–01 in the datastream format.

The script and the source files for the OS update are copied to the target server when the load server server-name update command is issued. The script file is executed by using the Bourne shell with the full path to the package file as the sole argument.


ProcedureTo Load an OS Update on a Server or a Server Group

This procedure describes how to load an OS update by using the browser interface. The example that follows the procedure provides a command-line equivalent.

The following default admin file is used to install Solaris packages:


mail=root
instance=unique
partial=nocheck
runlevel=nocheck
idepend=nocheck
rdepend=nocheck
space=quit
setuid=nocheck
conflict=nocheck
action=nocheck
basedir=default
authentication=nocheck

The admin file is located in the /opt/sun/n1gc/etc directory on the management server.

Before You Begin
Steps
  1. Log in to the N1 System Manager.

    See To Access the N1 System Manager Browser Interface in Sun N1 System Manager 1.3 Discovery and Administration Guide for details.

  2. Navigate to the table that contains the server or the server group by performing one of the following actions:

    • Choose All Servers from the View Selector menu.

      The Servers table appears.

    • Choose Servers By Group from the View Selector menu.

      The Server Groups table appears.

  3. Drag and drop the OS update icon from the Task Shortcuts pane to the server or the server group.

    The Load OS Update confirmation dialog box appears.

  4. To begin loading the OS update on the selected servers, click the OK button.

    The dialog box closes.

  5. Click the Jobs tab.

    The Jobs table appears with information about your Load OS Update job.

  6. Verify that the installation was successful.


    N1-ok> show server server
    

Example 5–4 Loading an OS Update Through the Command Line

The following command shows you how to install an OS update on two servers by using the load command.


N1-ok> load server server1,server2 update SUNWn1gcsolsparcag 

See load server in Sun N1 System Manager 1.3 Command Line Reference Manual for details.



Example 5–5 Loading an OS Update on a Server Group Through the Command Line

The following command shows you how to install multiple OS updates on a server group by using the load command.


N1-ok> load group devgroup update SUNWupdate1,SUNWupdate2

See load group in Sun N1 System Manager 1.3 Command Line Reference Manual for details.


Troubleshooting

Solaris OS Update Deployment Failures in Sun N1 System Manager 1.3 Troubleshooting Guide

ProcedureTo List the Available OS Updates

This procedure describes how to list the available OS updates that have been copied to the N1 System Manager. These OS updates can be installed on a managed server.

The example that follows the procedure provides a command-line equivalent.

Steps
  1. Log in to the N1 System Manager.

    See To Access the N1 System Manager Browser Interface in Sun N1 System Manager 1.3 Discovery and Administration Guide for details.

  2. Click the System Dashboard tab.

    The Task Shortcuts pane appears.

  3. Click the Expand/Collapse icon on the Update title bar.

    The Update list expands.

  4. Click the Edit List button.

    The Edit List dialog box appears with the list of available updates.


Example 5–6 Listing Available OS Updates Through the Command Line

The following command shows you how to list all of the OS updates in the system.


N1-ok> show update all

ProcedureTo List the OS Updates Installed on a Managed Server


Tip –

You can also use the browser interface Server Details page to view all of the OS updates that are installed on a server.


Steps
  1. Log in to the N1 System Manager.

    See To Access the N1 System Manager Command Line in Sun N1 System Manager 1.3 Discovery and Administration Guide for details.

  2. List the OS updates that are installed on a managed server.


    N1-ok> show server server
    

    See show server in Sun N1 System Manager 1.3 Command Line Reference Manual for details

ProcedureTo Delete an OS Update

This procedure describes how to delete an OS update from the N1 System Manager. This procedure does not delete an OS update from a managed server. See To Uninstall an OS Update From a Managed Server for details on that specific task.

Steps
  1. Log in to the N1 System Manager.

    See To Access the N1 System Manager Command Line in Sun N1 System Manager 1.3 Discovery and Administration Guide for details.

  2. Delete an OS update from the N1 System Manager.


    N1-ok> delete update update
    

    See delete update in Sun N1 System Manager 1.3 Command Line Reference Manual for details.

ProcedureTo Uninstall an OS Update From a Managed Server

Before You Begin
Steps
  1. Log in to the N1 System Manager.

    See To Access the N1 System Manager Command Line in Sun N1 System Manager 1.3 Discovery and Administration Guide for details.

  2. Uninstall an OS update from a managed server.


    N1-ok> unload server server[,server...] update update
    

    Caution – Caution –

    If the user-specified update name is not found, the command tries to uninstall an OS update with a matching file name. The show update command enables you to list an OS update's corresponding file name.


    See unload server in Sun N1 System Manager 1.3 Command Line Reference Manual for details.

Troubleshooting

If you cannot uninstall an OS update that was installed with an admin file, check that the package file name matches the name of the package. If the name is not the same, rename the admin file in the managed server's /tmp directory to match the name of the package and try the unload command again. If the package still exists, remove it from the managed server by using pkgrm.

Refer to OS Update Uninstallation Failures in Sun N1 System Manager 1.3 Troubleshooting Guide for solutions to common problems.

ProcedureTo Uninstall an OS Update on a Server Group

Before You Begin
Steps
  1. Log in to the N1 System Manager.

    See To Access the N1 System Manager Command Line in Sun N1 System Manager 1.3 Discovery and Administration Guide for details.

  2. Uninstall an OS update on the managed servers in a server group.


    N1-ok> unload group group update update
    

    Caution – Caution –

    If the user-specified update name is not found, the command tries to uninstall an OS update with a matching file name. Use the show update command to list an OS update's corresponding file name.


    See unload group in Sun N1 System Manager 1.3 Command Line Reference Manual for details.