Novell is now a part of Micro Focus

Patching Open Enterprise Server Tips and Tricks

Novell Cool Solutions: Feature
By Aaron Gresko

Digg This - Slashdot This

Posted: 21 Sep 2005

Patching Open Enterprise Server (OES) with rug is unfamiliar to many who are familiar with SUSE Linux and NetWare. After working with rug, I've developed a series of tips and tricks to make sure everything runs smoothly. The first tip: don't use Red Carpet, the graphical interface. Novell recommends using rug at the command line to patch OES.

Ensure Free Disk Space

The process of downloading and installing patches on OES from the public patch channel at can become problematic if the server has insufficient disk space.

Before installing the system, plan the partitions to have adequate disk space for patching. Plan for the following:

  • Patch caching
  • Installation targets

Patch Caching

When rug and Red Carpet install patches, they first download the patches to the rcd cache. The default rcd cache directory is /var/cache/rcd. The patches get stored in /var/cache/rcd/patch_data. Plan to have at least 3 GB free in /var to accord the patch files. As of this writing, which is right before OES SP1 ships, there are 1 GB of patches in the oes channel. When OES SP1 ships, the size will go up.

The best thing to do is to have at least 3 GB free on /var and to monitor disk space usage as rug downloads the patches using the command df -h.

The rcd cache can be moved anywhere on the system. To change the rcd cache location, enter the following at the command line:

#rug set-prefs cache-directory /new/cache/location

Installation Targets

After the patches are downloaded to the rcd cache, rug installs the patch rpm files. If the system has insufficient space to handle the installation of the new rpm files, installation will fail. The best practice here is to monitor disk free space as the installation progresses. Also, make sure common application directories, such as /opt, have lots of free space prior to starting the installation.

Monitoring the Patch Installation Process

The most common problem seen with installing patches with rug is having rug freeze during patch download. The status bar in rug is not accurate, which makes it difficult to tell if the installation is stuck or not.

Understanding what rug does to install patches is helpful when trying to ascertain installation progress. When rug receives the rug pin command, it does the following:
  1. Downloads the specified patch(es) to the rcd cache directory. The Red Carpet daemon, rcd, handles the download work.
  2. Installs the contents of the specified patch(es) on the system. The most common installation tool called by rcd is rpm.
The most common problem area is the patch download, so I do two things. First monitor the download, looking for the point at which the patch download is complete and the installation begins. The telltale sign that installation has begun is when rpm starts running on the system, which is identifiable using top.

How to perform a monitored OES patch installation:
  1. Make sure the system has the necessary free space.
  2. Open a terminal and su to root.
  3. Activate the system and subscribe to the oes channel.
  4. Start the patch installation using the command rug pin oes:*. This command installs every patch in the channel on the system.
  5. Note: On a new system, the rug status bar usually never advances past zero percent, even though the process is running. Press Ctrl+c to kill the process and then start it again using rug pin oes:*.
  6. Open a second terminal by pressing Ctrl+Shift+n and enter df a couple of times to see if disk free space is decreasing, signaling that the patches are being downloaded.
  7. Open a third terminal by pressing Ctrl+Shift+n and enter top to monitor system processes.
  8. Toggle back and forth between terminal 1, which is running rug, and terminal three. If the status bar on the rug terminal stops increasing, or stays at 99 percent, look at terminal three to see if the installation has begun. If rpm, ldconfig, or mkinitrd are active processes, the installation has begun.
  9. If rcd is active without rpm being active, check on terminal two to see if the disk free space is decreasing using df.
  10. If rcd is active, rpm is not, disk free space is not increasing and rug's status bar is stuck, the installation is stuck and will never complete. Press Ctrl+c to kill the installation and start it again.
  11. Under normal operation, rug will always advance to 99 percent and wait for a long time. This is because the status bar only counts the download and not the installation process. Use top to see the patch installation processes being run. Be patient at this point as the installation process almost always completes once it begins.

Verify a Patch is Installed

The rug pl command lists the install status of patches in the channel in the leftmost column, as shown below.

rug pl output showing status "i" for installed products.

rug displays a patch as installed if it has processed it. That doesn't mean the rpm packages in the patch are installed on the system. A specific patch may not have its rpm installed for few reasons:
  • The software package the patch applies to isn't installed. In this case, rug will mark a patch as installed even though nothing was actually installed on the system.
  • A later version of the software package is also in the patch channel. The patch that gets installed last will be the installed version.
  • rug has a bug where occasionally it installs a package, but doesn't list the patch as installed.
To verify if the packages in a patch are installed, first find what packages the patch includes and then query rpm to find what version is installed on the system.

To find what packages are included in a patch, do the following:
  1. Enter rug pi patch-number.
  2. The bottom of the patch information output lists the packages included in the patch. For example patch-10004 is a php4 patch and include a number of php4 rpms such as php4.rpm and apache-mod_php4.rpm. The patch information unfortunately doesn't list the version information for a package, and since multiple versions of a package can be in the channel that information is important.
  3. To find the version of the package associated with a patch enter grep -E 'Filename:|Version:' /var/cache/rcd/patch_data/patch-number. The output will display all of the files with their version in the patch. For the example patch, patch-10004, the version of  php4.rpm is 4.3.4-43.28
Once the package name and version are in hand, query the package installed on the system by entering rpm -q package_name. For the example package, php4, enter rpm -q php4. The output will identify the version of the installed package or indicate the package is not installed at all.

Installing Software From Already Installed Patches

The recommended practice for patching OES is to have all base software packages installed before patching. If the system must have an additional package installed after patching, the version on the installation CD and not the patch channel will be installed.

To install software after patching, do the following:
  1. Install the base version of the software using YaST. This example will use php4, which is not installed by default on OES. After installing off the original OES CD media, rpm -q php4 reveals the version to be  php4-4.3.4-43.25.
  2. Since patch-10004 has already been installed, running rug pin patch-10004 results in an error stating no newer version of the patch is available.
From here, two paths are possible to get the updated version of the package.
  1. Install the package from the rcd cache directory. To do so, simply cd to /var/cache/rcd/patch_data and ls the available packages. There may be multiple versions of the target package in the directory, so identify the latest one. To update the package enter rpm -U package-name-and-version.rpm. For example rpm -U php4-4.3.4-43.25.
  2. The second option is to run rug pin oes:*. This command processes all the packages in the channel and compares them against the installed packages. Any outdated packages are updated even if the patch is already installed. If multiple version of a package are present in the channel, it's best to manually update the package, instead of using rug pin oes:* as rug doesn't sort packages by version.

Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions.

© Copyright Micro Focus or one of its affiliates