Unsupported content

 

This version of the documentation is no longer supported. However, the documentation is available for your convenience. You will not be able to leave comments.

Using BMC Server Automation to patch or update to SuSE 11 SP2

This topic was edited by a BMC Contributor and has not been approved.  More information.

Due to changes in Novell's patching methodology for SuSE 11 SP2, the process for updating to SuSE 11 SP2 and patching SuSE 11 SP2 through BMC Server Automation has also changed. To update from SP1 to SP2 and to patch on SP2, the system must stay subscribed to the SP1 Pool and SP1 Update channels while also being subscribed to the SP2 Core and SP2 Update channels. SP3 brings back the Pool and Updates catalogs and there is no need to subscribe to the previous repositories to update to SP3 or to patch on SP3.

There is no way to do a patch analysis with multiple patch catalogs, nor is there a way to include multiple channels of the same OS type in a single catalog. Therefore, there is no way to upgrade properly to SP2. Below are examples of methods to perform the upgrade (and patch as well). Both of these methods are presented as an overview and assume some basic BMC Server Automation and SuSE product knowledge.

Method 1 - Monolithic Patch Catalog (Upgrade and Patch)

  1. Using the offline patch downloader from BMC, download each of the required repos (SP1-Pool, SP1-Updates, SP2-Core, SP2-Updates) into a single directory. This is accomplished by running the downloader multiple times using the same directory path and the different URLs.
  2. After downloading the payloads, run the offline downloader with the createRepo option:

    suse_downloader.sh -createRepo -srcLocation"/Source_Location1,SLES11-x86;" -repoLocation"/Repository_Location"

    Note that the source and repository location can be the same here.

  3. Create an offline patch catalog pointed at this repository location and run the catalog update job.
  4. Create a Patching Job using your new catalog.
  5. Run the Patching Job and the Remediation Job against your target server.

The system is now upgraded to SLES11 SP2. This catalog can be updated by re-running the offline downloader against the Updates channels for SP1 and SP2, then re-running the createrepo option, and finally running the Catalog Update Job and Patch Analysis Job. This will ensure that updated RPMs in the SP1 Updates and SP2 Updates channels are available to the target system.

Method 2 - Zypper Repositories and zypper dup (Upgrade)

While  method 1 will update the RPMs from whatever the target system is, using to the latest available in SP2, the zypper dup command in the following procedure performs additional actions, such as updating the Products listing and other upgrade-specific actions. The following method involves setting up a zypper repository that is accessible through an HTTP connection and triggering the upgrade against that repository. After the system is upgraded, you can use method 1 for patching — using a catalog that contains RPMs from both the SP1 Updates and SP2 Updates channels.

SLES 11 SP2

  1. Using the offline patch downloader from BMC download each of the required repos (SP1-Pool, SP1-Updates, SP2-Core, SP2-Updates) into their own, separate directory.
  2. Run createrepo against each directory so that a repodata subdirectory is created in each repository's directory.
  3. Using gpg, generate a signing key: gpg -q --gen-key
  4. Make a detached signature for each repodata/repomd.xml  (gpg -a --detach-sign repomd.xml).
  5. Export the public key to repodata/repomd.xml.key (gpg -a --export <key name> > repomd.xml.key).
  6. Expose the directory containing the repositories via http.
  7. Create some zypper repo definition files. Use the following format and specify the appropriate URL:

    [SLES11_SP2_Updates_i386]
    name=SLES11 SP2 Updates i386
    enabled=1
    autorefresh=1
    baseurl=http://blprov01-82.demodrive.com/patch2/sles11-sp2-updates-i386
    path=/
    type=rpm-md
    keeppackages=0
    
  8. Create a BLPackage to deploy these files (one for SP1 Pool, SP1 Updates, SP2 Core, SP2 Updates) into /etc/zypp/repos.d directory on the target server(s).
  9. Add an external command to the BLPackage that runs the following command. Use the repository names that you specified in your repo files.  

    zypper -n ref
    zypper -n --gpg-auto-import-keys dup -l --from "SLES11_SP2_Core_i386" --from "SLES11_SP2_Updates_i386"
  10. Deploy the BLPackage and the upgrade will run.

SLES 11 SP3

If you prefer to use the zypper dup method for updating to SLES 11 SP3 instead of analyzing against an SP3-Pool Catalog, then you can use the following update method. This method is similar to the previous method, instead of analyzing against a SLES 11 SP3 Pool Patch Catalog. After the update is done, you can analyze for missing patches using a SLES 11 SP3 Updates Patch Catalog.

  1. Using the offline patch downloader from BMC download each of the required repos (SP3-Pool, SP3-Updates) into their own, separate directory.
  2. Run createrepo against each directory so that a repodata subdirectory is created in each repository's directory.
  3. Using gpg, generate a signing key: gpg -q --gen-key
  4. Make a detached signature for each repodata/repomd.xml  (gpg -a --detach-sign repomd.xml).
  5. Export the public key to repodata/repomd.xml.key (gpg -a --export <key name> > repomd.xml.key).
  6. Expose the directory containing the repositories via http.
  7. Create some zypper repo definition files. Use the following format and specify the appropriate URL:

    [SLES11_SP3_Updates_i386\]
    name=SLES11 SP3 Updates i386
    enabled=1
    autorefresh=1
    baseurl=http://blprov01-82.demodrive.com/patch2/sles11-sp3-updates-i386
    path=/
    type=rpm-md
    keeppackages=0
    
  8. Create a BLPackage to deploy these files (one for SP3 Pool, SP3 Updates) into /etc/zypp/repos.d directory on the target server(s).
  9. Add an external command to the BLPackage that runs the following command. Use the repository names that you specified in your repo files.  

    # Do a pre-dup upgrade to latest SP2
    zypper mr --disable "sles-11-i386-SP3-Pool" "sles-11-i386-SP3-Updates"
    zypper -n ref -s
    zypper -n in --force-resolution sles-release
    zypper -n up
    # Start the SP3 dup
    zypper mr --enable "sles-11-i386-SP3-Pool" "sles-11-i386-SP3-Updates"
    zypper -n ref -s
    zypper -n -v --gpg-auto-import-keys dup -l --from "sles-11-i386-SP3-Updates" --from "sles-11-i386-SP3-Pool" --from "sles-11-i386-SP2-Updates" --from "sles-11-i386-SP2-Core"
    rpm -q sles-release-11.3
    if [ $? -ne 0 ]
    then
    echo "System Not Upgraded to SLES 11 SP3"
    exit 1
    else 
    zypper mr --disable "sles-11-i386-SP2-Updates" "sles-11-i386-SP2-Core" "sles-11-i386-SP1-Pool" "sles-11-i386-SP1-Updates"
    fi
  10. Deploy the BLPackage and the upgrade will run.
Was this page helpful? Yes No Submitting... Thank you

Comments