Summary
This article discusses how to lock a specific package version using yum.
Applies to
- DSE and agent package installations on RHEL-based systems using Yum
Symptoms
When installing a specific version of DSE or Agent packages, yum automatically installs or upgrades to a later version than specified.
For example you might run the following command:
sudo yum install datastax-agent-5.2.5 --exclude dse-full
but the Agent package version 6.7 will be installed rather than version 5.2.5
Solution
As per RedHat Technote 98873 users can restrict yum to install or upgrade a package to a fixed specific version using the versionlock plugin of yum.
To do this:
-
Install the package named
yum-plugin-versionlock
(calledyum-versionlock
in RHEL 5).# yum install yum-plugin-versionlock
The
/etc/yum/pluginconf.d/versionlock.list
will be created on the system. -
To install or lock the version of the DSE/Agent package, add that package name to the
/etc/yum/pluginconf.d/versionlock.list
file. As per previous example:# yum versionlock datastax-agent-5.2.5
(Alternatively, you can edit the filelist,
/etc/yum/pluginconf.d/versionlock.list
, directly.)
- The above configuration will not allow to upgrade the Agent package to a version later than what the version that was installed at the time the locking was performed.
- Yum will attempt to update all packages, while excluding the packages listed in the versionlock file.
See also
- Upgrading to earlier versions of DSE with YUM installs latest version
- Manually deploying DataStax Agents from RPM
Other Commands
To display the list, use:
# yum versionlock list
To discard the list, use:
# yum versionlock clear