Login to participate
Endpoint Management & Virtualization ArticlesRSS

Installing Solaris Cluster Patches With NS7

dougj's picture

Introduction

This document details the procedure of the Sun Solaris quarterly cluster patch installation for systems running Solaris 10 x86. However, the same procedure can be applied to the following Solaris versions: 10 SPARC, 9 SPARC and 9 x86.

SUN Microsystems about recommended cluster: "Solaris Recommended patches included in the cluster are considered the most important and highly recommended patches that avoid the most critical system, user, or security related bugs, which have been reported and fixed to date. In most cases a Solaris security patch will be included in the recommended patch set. It is possible, however, that a security patch may not be included in the recommended set if it is determined to be a more obscure application specific issue and not generally applicable."

Obtaining a patch cluster from SUN

To download a patch cluster (10_x86_Recommended.zip) from SUN with valid username that is linked to a current SUN support contract, go to http://sunsolve.sun.com/show.do?target=patches/pat...

imagebrowser image

imagebrowser image

imagebrowser image

It is also possible to download patch cluster patches using a sunsolve account and a wget script similar to the following:


#!/bin/sh

SUN_ONLINE_USER="SUN_ONLINE_USER"
SUN_ONLINE_PASSWORD="SUN_ONLINE_PASSWORD"

RELEASES="10_x86"

for RELEASE in $RELEASES ; do
wget --no-verbose --timestamping --http-user="$SUN_ONLINE_USER" --http-
passwd="$SUN_ONLINE_PASSWORD" --no-check-certificate
"https://sunsolve.sun.com/private-
cgi/pdownload.pl?target=${RELEASE}_Recommended&method=h" -O
${RELEASE}_Recommended.zip
done 

Prerequisites & Scripts

Checking for prerequisites can be built as a series of jobs in a client task:

imagebrowser image

Check OS script

#!/bin/sh

# PREREQUISITES
REQUIRED_OS="SunOS"
REQUIRED_PLATFORM="i86pc"
REQUIRED_RELEASE="5.10"

# POPULATING VARS
OS=`uname -s`
PLATFORM=`uname -i`
RELEASE=`uname -r`

if [ $OS -ne $REQUIRED_OS ]; then
echo "ERROR: Current OS is not compatible with this patch"
exit 1
fi

if [ $PLATFORM -ne $REQUIRED_PLATFORM ]; then
echo "ERROR: Current PLATFORM is not compatible with this patch"
exit 1
fi

if [ $RELEASE != $REQUIRED_RELEASE ]; then
echo "ERROR: Current RELEASE is not compatible with this patch"
exit 1
fi

echo "The cluster patch is compatible with the current OS, PLATFORM and RELEASE"
exit 0 

Check Disk Space script

#!/bin/sh
REQUIRED_DISK_SPACE=2048000; # Will require 2GB of available disk space for /tmp and /
for fs in / /tmp
do
DISK_SPACE=`df -b $fs | tail -1 | awk '{print $2}'`;
if [ $DISK_SPACE -lt $REQUIRED_DISK_SPACE ]; then
echo "$fs: NOT ENOUGH DISK SPACE $DISK_SPACE (kb) < $REQUIRED_DISK_SPACE(kb)"
exit 1
else
echo "$fs: DISK SPACE OK $DISK_SPACE (kb) > $REQUIRED_DISK_SPACE(kb)"
fi
done 

Solaris 10 x86 Recommended cluster patch package

imagebrowser image

Patch Distribution command line

mkdir -p /patch && mv 10_x86_Recommended.zip /patch && unzip -o -d/
S99clusterpatch_sol10_x86.zip && rm -f S99clusterpatch_sol10_x86.zip

Solaris 10 x86 Recommended cluster patch package properties

imagebrowser image

Solaris 10 x86 Recommended cluster patch directory content

imagebrowser image

S99clusterpatch_sol10_x86.zip file content

Please note that S99clusterpatch_sol10_x86.zip file is created on Solaris machine. Editing this file in windows environment may break permissions and content which will lead to the script inside of that archive dysfunctional. Always edit the file in UNIX/Solaris environment.

#!/bin/sh

rm -f /etc/rcS.d/S99clusterpatch
echo "Unziping /patch/10_x86_Recommended to /tmp PLEASE WAIT..." >/dev/console

cd /tmp
/usr/bin/unzip -o -q /patch/10_x86_Recommended.zip

cd /tmp/10_x86_Recommended
rm -f install_cluster_question
./install_cluster -q >/dev/console

echo "Removing patch distribution to free up disk space..."
rm -f /patch/10_x86_Recommended.zip
rmdir /patch

/usr/sbin/reboot -- -r 

Deploy 10_x86_Recommended job

imagebrowser image

Successful job execution

imagebrowser image

Back-out Procedures

In a highly unlikely event the back-out procedure will include restore of the backup, as cluster patch does not allow automatic back out of patches applied in a cluster.

(The content of this article is provided by James Chernikov, Sr. SQA Engineer, Symantec Corporation and posted by request.)