Skip to content

Instantly share code, notes, and snippets.

@pkoro
Last active November 8, 2016 01:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pkoro/cc2ce75a0867a835f15d2f4d3fe50f44 to your computer and use it in GitHub Desktop.
Save pkoro/cc2ce75a0867a835f15d2f4d3fe50f44 to your computer and use it in GitHub Desktop.
Issues with umd-release package and suggested workarounds

Due to a bug within the pre- and post-install scriplets (scripts) contained within the umd-release package upgrading is not a safe choice.

Problem description

The umd-release package installs the repository definitions for obtaining and installing UMD packages.

In addition to installing the repository definitions files the umd-release package also adds the check_obsoletes flag within the yum priorities plugin configuration file. It does so after installation as a post-scriplet action defined within the spec file. At the end of the installation procedure the contents of the priorites plugin configuration file should be:

[main]
# added by the umd-release package
check_obsoletes = 1
enabled = 1

This file resides on both CentOS 6 and 7 in the following path: /etc/yum/pluginconf.d/priorities.conf

Upon removal (uninstallation) of the package these two lines are removed.

The bug that was only recently revealed is that when upgrading the same effect as when uninstalling takes place.

Note that your systems may have already been affected by this bug. The only way to know for sure is to check the contents of the aforementioned file and see if they match the contents given above.

Actions taken for future releases

All new releases contain a fix for this behaviour. Hence when upgrading the package from the next version and henceforth this behaviour will not be noticed.

Suggested workaround

As the post-scriplet of the rpm package already installed on a given service (host) cannot change you are advised to not upgrade the specific package once the new release becomes available (otherwise the post-scriplet that removes these two lines will kick in upon the next upgrade).

To work around the issue you are advised to first check the contents of the priorities plugin configuration file /etc/yum/pluginconf.d/priorities.conf.

There are three possible scenarios:

  1. The file is empty
  2. The file only contains two lines (the check_obsoletes flag has been removed due to a previous upgrade)
  3. The file contains the contents it should (the four lines as given in the first section of these notes)

Cases 1 & 2

The yum priorites configuration file is already erroneous (in a state it should not have been). Restore its contents using the following command before proceding:

# cat > /etc/yum/pluginconf.d/priorities.conf << EOF
[main]
# added by the umd-release package
check_obsoletes = 1
enabled = 1
EOF

Then remove the umd-release package currently installed and install the latest available version found in the UMD software repository:

# yum remove umd-release
# yum install http://repository.egi.eu/sw/production/umd/U/F/A/updates/N-V-R.noarch.rpm

Note that the link given above is generic. To find which exact link you should be using on your service(s) check the last section of this note.

Case 3

Remove the umd-release package currently installed and install the latest available version found in the UMD software repository:

# yum remove umd-release
# yum install http://repository.egi.eu/sw/production/umd/U/F/A/updates/N-V-R.noarch.rpm

Note that the link given above is generic. To find which exact link you should be using on your service(s) check the section below.

Latest versions available once the release containg the fix is made:

UMD-3 (sl6): http://repository.egi.eu/sw/production/umd/3/sl6/x86_64/updates/umd-release-3.14.3-1.el6.noarch.rpm UMD-4 (sl6): http://repository.egi.eu/sw/production/umd/4/sl6/x86_64/updates/umd-release-4.1.2-1.el6.noarch.rpm UMD-4 (centos7): http://repository.egi.eu/sw/production/umd/4/centos7/x86_64/updates/umd-release-4.1.2-1.el7.centos.noarch.rpm

@rptaylor
Copy link

rptaylor commented Nov 8, 2016

There is an error while updating:

  Cleanup    : umd-release-3.14.2-1.el6.noarch                                                                                                                                       2/2 
sed: -e expression #1, char 1: unknown command: `,'
  Verifying  : umd-release-3.14.3-1.el6.noarch                                                                                                                                       1/2 
  Verifying  : umd-release-3.14.2-1.el6.noarch         ```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment