Categories

ID #1149

How do I upgrade Bright from SLES11sp2 to SLES11sp3?

How do I upgrade Bright from SLES11sp2 to SLES11sp3?
With the following recipe:

Contents

Introduction

Bright Cluster Manager versions 6.0 and 6.1 support SLES11sp3. They also both support an upgrade from SLES11sp2 to SLES11sp3.

Prerequisites:

  • The head node must be able to access the Bright RPM repositories
  • The head node must be able to access the SuSE RPM repositories

 

Upgrading a software image from SLES11sp2 to SLES11sp3

To upgrade a software image it is advised to clone a SLES11sp2 software image to, for example a "draft" software image, say sles11sp3-image. Then do the upgrade on the 'sles11sp3-image' software image. For example if 'default-image' is a SLES11sp2 software image:

# cmsh
% softwareimage
% clone default-image sles11sp3-image
% commit

Wait for the cloning process to finish.

Then make sure the Bright Cluster Manager packages are updated to the latest version/release, as follows:

Check if the Bright repositories are enabled, then refresh the repository info, and update the packages:

# zypper -R /cm/images/sles11sp3-image lr                                                  
 # | Alias                   | Name                          | Enabled | Refresh
 --+-------------------------+-------------------------------+---------+--------
 1 | Cluster_Manager_Base    | Cluster Manager 6.1 - Base    | Yes     | No               
 2 | Cluster_Manager_Updates | Cluster Manager 6.1 - Updates | Yes     | No
 ...
 # zypper -R /cm/images/sles11sp3-image ref                                                       
 # zypper -R /cm/images/sles11sp3-image up                                                  


To upgrade the software image we can use the zypper command in a chroot environment, because it is the software image that is being upgraded. Thus, we end up using the following commands during the upgrade:

(Error messages and warnings about failing to generate the initrd, not finding the root device can be ignored)

# export PBL_SKIP_BOOT_TEST=1
# chroot /cm/images/sles11sp3-image suse_register -d 2 -n -a email=<email address> -a regcode-sles=<key> --restore-repos
# zypper -R /cm/images/sles11sp3-image ref -s
# zypper -R /cm/images/sles11sp3-image update -t patch
# zypper -R /cm/images/sles11sp3-image update -t patch
# zypper -R /cm/images/sles11sp3-image se -t product | grep -h -- "-migration" | cut -d\| -f2
 SUSE_SLES-SP3-migration
 sle-sdk-SP3-migration
# zypper -R /cm/images/sles11sp3-image in -t product sle-sdk-SP3-migration SUSE_SLES-SP3-migration
# chroot /cm/images/sles11sp3-image suse_register -d 2 -L /root/.suse_register.log

To check if the SP3 Pool and Updates repositories are enabled:

# zypper -R /cm/images/sles11sp3-image lr
# zypper -R /cm/images/sles11sp3-image dup --from SLE11-SDK-SP3-Pool --from SLE11-SDK-SP3-Updates --from SLES11-SP3-Pool --from SLES11-SP3-Updates
# zypper -R /cm/images/sles11sp3-image update -t patch
# chroot /cm/images/sles11sp3-image suse_register -d 2 -L /root/.suse_register.log

Install the libstdc++ 4.7 devel packages:

# zypper -R /cm/images/sles11sp3-image in libstdc++47-devel libstdc++47-devel-32bit        

Generate an ECDSA ssh host key:

# chroot /cm/images/sles11sp3-image ssh-keygen -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key -C  -N 

Check that nothing is mounted in the software image during the upgrade. If something is mounted in it, then unmount it:

# grep " /cm/images/sp3-image" /proc/mounts
 sysfs /cm/images/sp3-image/sys sysfs rw,relatime 0 0
 proc /cm/images/sp3-image/var/lib/named/proc proc ro,nosuid,nodev,noexec,relatime 0 0
# umount -l /cm/images/sp3-image/sys /cm/images/sp3-image/var/lib/named/proc

Set the kernel to be used for the 'sles11sp3-image' software image. In the following case it is kernel version '3.0.82-0.7-default':

# cmsh
% softwareimage use sp3-image
% set kernelversion 3.0.82-0.7-default
% commit
% createramdisk

 

Upgrading the head node from SLES11sp2 to SLES11sp3

Before upgrading the head node, make sure there is a recent backup of the head node available, which can be restored!

Then make sure the Bright Cluster Manager packages are updated to the latest version/release.

Check if the Bright repositories are enabled, refresh the repository info, and update the packages:

# zypper lr
 # | Alias                   | Name                          | Enabled | Refresh
 --+-------------------------+-------------------------------+---------+--------
 1 | Cluster_Manager_Base    | Cluster Manager 6.1 - Base    | Yes     | No
 2 | Cluster_Manager_Updates | Cluster Manager 6.1 - Updates | Yes     | No
 ...
# zypper ref
# zypper up

The following commands can then be run for the upgrade:

# chroot /cm/images/sles11sp3-image suse_register -d 2 -n -a email=<email address> -a regcode-sles=<key> --restore-repos
# zypper ref -s
# zypper update -t patch
# zypper update -t patch
# reboot

Because MySQL is upgraded with the upgrade from SLES11sp2 to SLES11sp3, stopping the MySQL and CMDaemon services is a good idea:

# service cmd stop
# service mysql stop
# zypper se -t product | grep -h -- "-migration" | cut -d\| -f2
 SUSE_SLES-SP3-migration
 sle-sdk-SP3-migration
# zypper in -t product sle-sdk-SP3-migration SUSE_SLES-SP3-migration
# suse_register -d 2 -L /root/.suse_register.log

Upgrade to SLES11sp3, where the gcc46 packages will be uninstalled (Solution 1):

# zypper dup --from SLE11-SDK-SP3-Pool --from SLE11-SDK-SP3-Updates --from SLES11-SP3-Pool --from SLES11-SP3-Updates
# zypper update -t patch
# suse_register -d 2 -L /root/.suse_register.log

Installation of the gcc 4.7 packages:

# zypper in gcc47 gcc47-32bit gcc47-c++ gcc47-fortran gcc47-fortran-32bit cpp47

Changes for the upgrade of MySQL, and advised upgrade of MySQL:

# ln -sf my.cnf.5.5 /cm/conf/etc/my.cnf
# cp /cm/conf/etc/my.cnf /etc/my.cnf
# touch /var/lib/mysql/.force_upgrade
# rcmysql restart

Change the SP version in the motd file:

# sed -i -e 's/Based on SUSE Linux Enterprise Server 11 SP.*$/Based on SUSE Linux Enterprise Server 11 SP3/g' /etc/motd 

Reboot the head node to use the upgraded kernel:

# reboot

If needed PHP can also be upgraded. PHP is upgraded to version 5.3 in SLES11sp3. PHP is used for the Cluster Manager web-portal: (Accept deinstall for the php5 packages)

# zypper in php53
# zypper in apache2-mod_php53 php53-devel php53-ctype php53-dom php53-iconv php53-json php53-pdo php53-sqlite php53-tokenizer php53-xmlreader php53-xmlwriter php53-ldap php53-soap php53-openssl

The PHP Apache module may get removed from the Apache module list. To add it again:

# a2enmod php5

Remove the cm-php-pam package and install the cm-php-pam53 package:

# rpm -e cm-php-pam
# zypper in cm-php-pam53
# service apache2 restart

Tags: -

Related entries:

You cannot comment on this entry