Search code examples
amazon-web-servicesrhelsnappyambari

Error creating a Cluster in Apache Ambari (snappy package)


I get the following error:

resource_management.core.exceptions.Fail: Execution of '/usr/bin/yum -d 0 -e 0 -y install snappy-devel' returned 1. Error: Package: snappy-devel-1.0.5-1.el6.x86_64 (HDP-UTILS-1.1.0.20)
       Requires: snappy(x86-64) = 1.0.5-1.el6
       Installed: snappy-1.1.0-3.el7.x86_64 (@anaconda/7.1)
           snappy(x86-64) = 1.1.0-3.el7
       Available: snappy-1.0.5-1.el6.x86_64 (HDP-UTILS-1.1.0.20)
           snappy(x86-64) = 1.0.5-1.el6

I tried the solution of HortonWorks, but it doesn't work.

I disabled all repositories and leave only one required versions snappy, but neither works. Still gives the error you have installed the 1.1.0-3.el7 version, but if you look at the information for that package is not. I have installed the 1.0.5-1.el6

My operating system is RHEL 7.


Solution

  • I've been doing some work to automate ambari clusters for CI tests and also hit this problem with rhel7. Workaround in that HDP doc is not really possible as it needs manual intervention when install fails. Having said that I was able to come up with a workaround of some sort.

    Trouble really is that snappy is already in yum repos used by rhel7 itself and when ambari adds its own HDP yum repos, those contain older versions for snappy and snappy-devel. Simply by removing existing snappy package wont work because ambari will install both snappy and snappy-devel. It would work if ambari would only install snappy-devel which would pull correct snappy version.

    Workaround seem to be by using yum version locking. You can't use yum versionlock snappy-1.0.5-1.el6.x86_64 as is because actual package has to be present from repos(which doesn't exist until ambari provisions its own nodes) at a time of command invocation. Thought it looks like you can manually append that package to versionlock config.

    When I boot a plain ami or any other rhel7 based vm, I run below commands which seem to be enough for ambari cluster provisioning to succeed later.

    yum -y remove snappy
    yum -y install yum-plugin-versionlock
    echo 'snappy-1.0.5-1.el6.*' >> /etc/yum/pluginconf.d/versionlock.list