Sun N1 System Manager 1.3 Operating System Provisioning Guide

Chapter 5 Managing Packages, Patches, and RPMs

The N1 System Manager enables you to perform the following OS update management tasks:

Introduction to Managing OS Updates

After you have installed an OS on a managed server, the N1 System Manager enables you to install OS updates. These OS updates consist of Solaris packages and patches and Linux RPMs.


Note –

The N1 System Manager does not enable you to install updates or patches for the Windows operating system. You must update the Windows operating system on a managed server outside of the Sun N1 System Manager environment.


Installing OS updates on servers for the first time involves the following four-step process when you use the N1 System Manager:

  1. Downloading the OS update.

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

    The N1 System Manager must have system access to the OS update before the update can be installed on the managed servers.

    By using the create update command, you can copy an OS update from a web site or an accessible file system on the management server. After an OS update is copied, you can display the update in the browser interface's Task Shortcuts pane, or you can use the show update command.

  3. Verifying that the OS update was copied by displaying the Shortcut in the browser interface or by using the show update command.

  4. Installing the OS update on the appropriate managed servers by using the browser interface or the load server or load group commands. The managed servers must have the base management feature supported.

OS update installations behave differently for every operating system because the native package installation mechanisms are used. For example, if a Solaris package is already installed on the target server, the installation might succeed without reporting an error. However, this same scenario for a Linux RPM results in an error message indicating that the package is already installed.

See OS Updates in Sun N1 System Manager 1.3 Troubleshooting Guide for troubleshooting information.

The following graphic describes the order in which these tasks should be completed.

This graphic illustrates the steps to update an OS.

Installing Custom OS Updates

The N1 System Manager also enables you to install OS updates that don't use the standard patch, package, or RPM update commands, such as .tgz, .tar, .Z, or .zip files. Examples of files you can install include:

The overall process to copy and install standard OS updates using N1 System Manager is the same for custom OS updates, with the following exceptions:

Installation Script Overview

When copying an OS update using the create update command, you can specify an installation script with the installscript attribute. Installation scripts are used to install an OS update and are available for the following scenarios:

The following information provides instructions on how to create a successful installation script for either standard or custom OS update installations:

Installing Multiple Solaris Packages

When you install a standard OS update that contains multiple Solaris packages in a tar file, follow these guidelines:

When you install a custom OS update that contains multiple Solaris packages in a tar file, follow these guidelines:

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.