8.10. System Update

There are two ways in which packages can be updated on a Rocks Cluster. You can create an update roll and then add it to the distribution (preferred method) or you can update your frontend using YUM and then add the update packages to your distribution. The next two chapters will explain in detail the two methodologies.

8.10.1. System update using update roll

This approach is preferred over the other because it allows to test the effect of updates on compute nodes and in case of problems there is an easy way to roll back the system to the previous configuration.

  1. Use rocks create mirror to create an update roll

        # rocks create mirror http://mirror.centos.org/centos/6/updates/<arch>/Packages/  rollname=Centos_6_X_update_2014_03_21
        

    Where arch is your current architecture (x86_64, i386) and the X should be the current minor release number (if latest stable version of Centos is 6.5 X should be 5).

  2. If the current minor release number changed since you installed your Rocks Cluster or if it changed since last upgrade using this procedure you must also create a new OS roll relative to the current release minor. For example if the current release number of Centos is 6.5 run the following command:

        # rocks create mirror http://mirror.centos.org/centos/6/os/<arch>/Packages/  rollname=Centos_6_X
        

    If you are in doubt, you should run also the previous command, since the only drow back is that you will waste some disk space. X should be substituted with the current minor release.

  3. Add the update roll created by the previous command to your distribution

        # rocks add roll Centos_6_X_update_2014_03_21-6.1-0.x86_64.disk1.iso
        # rocks add roll Centos_6_X-6.1-0.x86_64.disk1.iso
        # rocks enable roll Centos_6_X
        # rocks enable roll Centos_6_X_update_2014_03_21
        # cd /export/rocks/install
        # rocks create distro 
  4. New installed nodes will automatically get the updated packages. It is wise to test the update on a compute nodes to verify that updates did not break anything. To force a node to reinstall, run the command:

        # ssh hostname-0-0 /boot/kickstart/cluster-kickstart 
  5. If something goes wrong you can always revert the updates removing the update roll.

        # rocks remove roll Centos_6_X_update_2014_03_21
        # rocks remove roll Centos_6_X
        # cd /export/rocks/install
        # rocks create distro 
  6. After you tested the update on some nodes with the previous step, you can update the frontend using the standard yum command

        # yum update 

    Then reboot the frontend to make the update effective.

8.10.2. System update using YUM

To update using YUM you first have to update packages on your frontend (for this reason this approach is more risky) and then you can propagate the modification to the rest of the cluster.

  1. Several repositories are configured, but then disabled by Rocks at install time. This is done so that the user can have full control over the distribution. The local distribution IS a yum repository. If you have created an updates roll as in the previous section, then

        # yum clean all
        # yum check-update 
        

    might produce output that resembles the following

    [root@ ~]# yum check-update
    Rocks-6.0                                                | 1.9 kB     00:00     
    Rocks-6.0/primary                                        | 1.1 MB     00:00     
    Rocks-6.0                                                             2183/2183
    keyutils.x86_64                             1.4-3.el6                  Rocks-6.0
    keyutils-libs.x86_64                        1.4-3.el6                  Rocks-6.0
    keyutils-libs-devel.x86_64                  1.4-3.el6                  Rocks-6.0
    [root@ ~]# 
        

    Alternatively, you can enable the CentOS updates repo and do the following

        # yum clean all
        # yum --enablerepo=updates check-update 
        

    might produce output that resembles the following

    [root@ ~]# yum --enablerepo=updates check-update
    updates                                                  | 3.5 kB     00:00     
    
    firefox.x86_64                      10.0.4-1.el6.centos                updates  
    keyutils.x86_64                             1.4-3.el6                  Rocks-6.0
    keyutils-libs.x86_64                        1.4-3.el6                  Rocks-6.0
    keyutils-libs-devel.x86_64                  1.4-3.el6                  Rocks-6.0
    libpng.x86_64                       2:1.2.49-1.el6_2                   updates  
    libpng-devel.x86_64                 2:1.2.49-1.el6_2                   updates  
    libsmbclient.x86_64                 3.5.10-116.el6_2                   updates  
    openssl.x86_64                      1.0.0-20.el6_2.4                   updates  
    openssl-devel.x86_64                1.0.0-20.el6_2.4                   updates  
    qemu-kvm.x86_64                     2:0.12.1.2-2.209.el6_2.4           updates  
    samba-winbind-clients.x86_64        3.5.10-116.el6_2                   updates  
    xorg-x11-server-Xephyr.x86_64       1.10.4-6.el6_2.1.0.1.centos        updates  
    xorg-x11-server-Xorg.x86_64         1.10.4-6.el6_2.1.0.1.centos        updates  
    xorg-x11-server-common.x86_64       1.10.4-6.el6_2.1.0.1.centos        updates  
    xulrunner.x86_64                    10.0.4-1.el6.centos                updates  
    [root@ ~]# 
        
  2. Now, Actually install the updates on your frontend

        # yum --enablerepo=updates update
        
  3. When YUM installs update packages on your system, it stores a copy of downloaded RPMs in the directory /var/cache/yum/updates/packages. It is necessary to add this packages to the distribution copying them in the contrib directory:

        # cp /var/cache/yum/updates/packages/*  /export/rocks/install/contrib/7.0/<arch>/RPMS/ 

    Where arch is your current architecture (x86_64, i386).

  4. Finally rebuild your distribution:

        # cd /export/rocks/install
        # rocks create distro 
  5. New installed nodes will automatically get the updated packages. To force a node to reinstall, run the command:

        # ssh hostname-0-0 /boot/kickstart/cluster-kickstart