Troubleshoot > Troubleshoot Solaris patch installation

Troubleshoot Solaris patch installation

Changing the Solaris patch install mode

When you remediate a Solaris patch that has the Install Mode (under Install Parameters in the Properties view) set to Single User Mode, the server will be rebooted into single user-mode before installing the patch. If the remediation fails for some reason (such as when there is a network outage or a hardware failure), the system will remain in single-user mode.

To return the system to multi-user mode:

  1. Log in to the Solaris server console.
  2. Depending on the Solaris version, change to the directory by entering one of the following commands:

    cd /etc/rcS.d/    # On Solaris 5.10
    cd /etc/rc1.d    # On Solaris 5.6 - 5.9

  3. Enter the following command.

    ./S99zOpswPatching exit_single_user_mode

  4. Reboot the server by entering the following command or another method. This will reboot the server into multi-user mode.

    shutdown -y -g 0 -i 6

If you do not have access to a server console on your Solaris server, use the SA Global Shell (OGSH) rosh utility:

  1. Using an SA user who has the OGFS permission “Log in to Server”, open an OGSH session. For example, you could enter an ssh command such as:

    ssh -p 2222 <user-name>@<ogfs-host>

  2. Navigate to your Solaris server using a command such as:

    cd /opsw/Server/@/<server name>/files/root

  3. Launch the rosh utility.

  4. Depending on the Solaris version, change to the directory by entering one of the following commands:

    cd /etc/rcS.d/    # On Solaris 5.10
    cd /etc/rc1.d    # On Solaris 5.6 - 5.9

  5. Enter the following command:

    ./S99zOpswPatching exit_single_user_mode

  6. Reboot the server entering the following command or another method. This will reboot the server into multi-user mode.

    shutdown -y -g 0 -i 6

When you reboot the server, your rosh process will be terminated. Make sure the server is configured to auto-reboot.

If a patch requires single-user mode and fails to install for some other reason, such as a dependent patch is not installed, the Solaris host will be rebooted to single-user mode, the patch installation will be attempted, and the host will be rebooted to multi-user mode. These two reboots occur even if the path installation fails.

Channel-specific sections

Here is an example of a channel specific section. In this case, it enables the Oracle Enterprise Linux 5 Update 6 Patch channel, creating a policy composed of all the packages in that channel. Note that this section is enabled by default as long as the ‘channels’ option is not specified in the [main] section. If the ‘channels’ option is specified in the [main] section, then it must be explicitly enabled via the "enabled" option. Also, channel_path is defined here only as we don't wish to create channel policies for top-level channels

[ol5_u6_x86_64_patch]
; enabled=1
# You may wish to import all versions of each packages in the channel. By
# default, only the latest version of each package is imported. Note that
# when importing all versions, it is recommended that packages_only=1 also be
# used since it is not useful to have a policy with more than one version of
# each package.
; which_packages=all
# You may wish to download the packages for this channel only and then
# create the policies manually. Also useful in combination with
# which_packages=all:
; packages_only=1
# To locate a child channel's packages next to the corresponding policy in
# the library, use a path such as the following:
; package_path=/ULN/Channels/$channel_name Packages

Mounting the staging directory in single-user mode

When one item in a remediation process requires a server to restart in single-user mode it can prohibit the rest of the items from being processed if the item is stored in an atypical directory that is not available in single-user mode.

Single-user mode will need to mount the staging directory upon startup. The default staging directory is /var/opt/opsware/agent. If the next item is not in the default directory, then the remediation process will not be able to find it and the job will fail.

To resolve this, the managed server just needs to mount the staging directory where the items are stored prior to running the remediation. The simplest way to do this is to write a server script with mount instructions and add it to an existing Solaris start-up script.

For example:

echo "mount<stage_dir>">>/etc/rcS.d/S99mount_stage

where '<stage_dir>' is the directory where the item is stored and '/etc/rcS.d/S99mount_stage' is the start-up script on a Solaris managed server.