Support Questions

Find answers, ask questions, and share your expertise

HDP-2.3.4.0-3485 upgrade failed due to HDP-UTILS-2.3.4.0-3485 snappy

avatar
Contributor

2016-02-11 21:20:20,569 - Package Manager failed to install packages. Error: Execution of '/usr/bin/yum -d 0 -e 0 -y install '--disablerepo=HDP-*' --enablerepo=HDP-2.3.4.0-3485,HDP-UTILS-2.3.4.0-3485 snappy' 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
           Removing: snappy-1.0.5-1.el6.x86_64 (@HDP-UTILS-1.1.0.20)
               snappy(x86-64) = 1.0.5-1.el6
           Updated By: snappy-1.1.0-3.el7.x86_64 (ol7_latest)
               snappy(x86-64) = 1.1.0-3.el7
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/custom_actions/scripts/install_packages.py", line 357, in install_packages
    skip_repos=[self.REPO_FILE_NAME_PREFIX + "*"] if OSCheck.is_redhat_family() else [])
  File "/usr/lib/python2.6/site-packages/resource_management/core/base.py", line 154, in __init__
    self.env.run()
  File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 158, in run
    self.run_action(resource, action)
  File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 121, in run_action
    provider_action()
  File "/usr/lib/python2.6/site-packages/resource_management/core/providers/package/__init__.py", line 49, in action_install
    self.install_package(package_name, self.resource.use_repos, self.resource.skip_repos)
  File "/usr/lib/python2.6/site-packages/resource_management/core/providers/package/yumrpm.py", line 49, in install_package
    shell.checked_call(cmd, sudo=True, logoutput=self.get_logoutput())
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 70, in inner
    result = function(command, **kwargs)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 92, in checked_call
    tries=tries, try_sleep=try_sleep)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 140, in _call_wrapper
    result = _call(command, **kwargs_copy)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 291, in _call
    raise Fail(err_msg)
Fail: Execution of '/usr/bin/yum -d 0 -e 0 -y install '--disablerepo=HDP-*' --enablerepo=HDP-2.3.4.0-3485,HDP-UTILS-2.3.4.0-3485 snappy' 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
           Removing: snappy-1.0.5-1.el6.x86_64 (@HDP-UTILS-1.1.0.20)
               snappy(x86-64) = 1.0.5-1.el6
           Updated By: snappy-1.1.0-3.el7.x86_64 (ol7_latest)
               snappy(x86-64) = 1.1.0-3.el7
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/custom_actions/scripts/install_packages.py", line 478, in <module>
    InstallPackages().execute()
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 219, in execute
    method(env)
  File "/var/lib/ambari-agent/cache/custom_actions/scripts/install_packages.py", line 162, in actionexecute
    raise Fail("Failed to distribute repositories/install packages")
resource_management.core.exceptions.Fail: Failed to distribute repositories/install packages
stdout: /var/lib/ambari-agent/data/output-11887.txt
2016-02-11 21:20:11,346 - Will install packages for repository version 2.3.4.0-3485
2016-02-11 21:20:11,347 - Repository['HDP-2.3.4.0-3485'] {'append_to_file': False, 'base_url': 'http://Lnx0.localdomain.com/hdp/HDP/centos7/2.x/updates/2.3.4.0', 'action': ['create'], 'components': [u'HDP', 'main'], 'repo_template': '[{{repo_id}}]\nname={{repo_id}}\n{% if mirror_list %}mirrorlist={{mirror_list}}{% else %}baseurl={{base_url}}{% endif %}\n\npath=/\nenabled=1\ngpgcheck=0', 'repo_file_name': 'HDP-2.3.4.0-3485', 'mirror_list': None}
2016-02-11 21:20:11,357 - File['/etc/yum.repos.d/HDP-2.3.4.0-3485.repo'] {'content': '[HDP-2.3.4.0-3485]\nname=HDP-2.3.4.0-3485\nbaseurl=http://Lnx0.localdomain.com/hdp/HDP/centos7/2.x/updates/2.3.4.0\n\npath=/\nenabled=1\ngpgcheck=0'}
2016-02-11 21:20:11,358 - Writing File['/etc/yum.repos.d/HDP-2.3.4.0-3485.repo'] because contents don't match
2016-02-11 21:20:11,358 - Repository['HDP-UTILS-2.3.4.0-3485'] {'append_to_file': True, 'base_url': 'http://Lnx0.localdomain.com/hdp/HDP-UTILS-1.1.0.20/repos/centos7', 'action': ['create'], 'components': [u'HDP-UTILS', 'main'], 'repo_template': '[{{repo_id}}]\nname={{repo_id}}\n{% if mirror_list %}mirrorlist={{mirror_list}}{% else %}baseurl={{base_url}}{% endif %}\n\npath=/\nenabled=1\ngpgcheck=0', 'repo_file_name': 'HDP-2.3.4.0-3485', 'mirror_list': None}
2016-02-11 21:20:11,363 - File['/etc/yum.repos.d/HDP-2.3.4.0-3485.repo'] {'content': '[HDP-2.3.4.0-3485]\nname=HDP-2.3.4.0-3485\nbaseurl=http://Lnx0.localdomain.com/hdp/HDP/centos7/2.x/updates/2.3.4.0\n\npath=/\nenabled=1\ngpgcheck=0\n[HDP-UTILS-2.3.4.0-3485]\nname=HDP-UTILS-2.3.4.0-3485\nbaseurl=http://Lnx0.localdomain.com/hdp/HDP-UTILS-1.1.0.20/repos/centos7\n\npath=/\nenabled=1\ngpgcheck=0'}
2016-02-11 21:20:11,364 - Writing File['/etc/yum.repos.d/HDP-2.3.4.0-3485.repo'] because contents don't match
2016-02-11 21:20:11,404 - Package['fuse'] {}
2016-02-11 21:20:11,558 - Skipping installation of existing package fuse
2016-02-11 21:20:11,558 - Package['fuse-libs'] {}
2016-02-11 21:20:11,587 - Skipping installation of existing package fuse-libs
2016-02-11 21:20:11,602 - Package['rpcbind'] {'use_repos': ['HDP-2.3.4.0-3485', 'HDP-UTILS-2.3.4.0-3485'], 'skip_repos': ['HDP-*']}
2016-02-11 21:20:11,603 - Installing package rpcbind ('/usr/bin/yum -d 0 -e 0 -y install '--disablerepo=HDP-*' --enablerepo=HDP-2.3.4.0-3485,HDP-UTILS-2.3.4.0-3485 rpcbind')
2016-02-11 21:20:12,250 - Package['hadoop_2_3_*'] {'use_repos': ['HDP-2.3.4.0-3485', 'HDP-UTILS-2.3.4.0-3485'], 'skip_repos': ['HDP-*']}
2016-02-11 21:20:12,250 - Installing package hadoop_2_3_* ('/usr/bin/yum -d 0 -e 0 -y install '--disablerepo=HDP-*' --enablerepo=HDP-2.3.4.0-3485,HDP-UTILS-2.3.4.0-3485 'hadoop_2_3_*'')
2016-02-11 21:20:12,932 - Package['snappy'] {'use_repos': ['HDP-2.3.4.0-3485', 'HDP-UTILS-2.3.4.0-3485'], 'skip_repos': ['HDP-*']}
2016-02-11 21:20:12,932 - Installing package snappy ('/usr/bin/yum -d 0 -e 0 -y install '--disablerepo=HDP-*' --enablerepo=HDP-2.3.4.0-3485,HDP-UTILS-2.3.4.0-3485 snappy')
2016-02-11 21:20:20,569 - Package Manager failed to install packages. Error: Execution of '/usr/bin/yum -d 0 -e 0 -y install '--disablerepo=HDP-*' --enablerepo=HDP-2.3.4.0-3485,HDP-UTILS-2.3.4.0-3485 snappy' 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
           Removing: snappy-1.0.5-1.el6.x86_64 (@HDP-UTILS-1.1.0.20)
               snappy(x86-64) = 1.0.5-1.el6
           Updated By: snappy-1.1.0-3.el7.x86_64 (ol7_latest)
               snappy(x86-64) = 1.1.0-3.el7
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/custom_actions/scripts/install_packages.py", line 357, in install_packages
    skip_repos=[self.REPO_FILE_NAME_PREFIX + "*"] if OSCheck.is_redhat_family() else [])
  File "/usr/lib/python2.6/site-packages/resource_management/core/base.py", line 154, in __init__
    self.env.run()
  File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 158, in run
    self.run_action(resource, action)
  File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 121, in run_action
    provider_action()
  File "/usr/lib/python2.6/site-packages/resource_management/core/providers/package/__init__.py", line 49, in action_install
    self.install_package(package_name, self.resource.use_repos, self.resource.skip_repos)
  File "/usr/lib/python2.6/site-packages/resource_management/core/providers/package/yumrpm.py", line 49, in install_package
    shell.checked_call(cmd, sudo=True, logoutput=self.get_logoutput())
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 70, in inner
    result = function(command, **kwargs)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 92, in checked_call
    tries=tries, try_sleep=try_sleep)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 140, in _call_wrapper
    result = _call(command, **kwargs_copy)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 291, in _call
    raise Fail(err_msg)
Fail: Execution of '/usr/bin/yum -d 0 -e 0 -y install '--disablerepo=HDP-*' --enablerepo=HDP-2.3.4.0-3485,HDP-UTILS-2.3.4.0-3485 snappy' 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
           Removing: snappy-1.0.5-1.el6.x86_64 (@HDP-UTILS-1.1.0.20)
               snappy(x86-64) = 1.0.5-1.el6
           Updated By: snappy-1.1.0-3.el7.x86_64 (ol7_latest)
               snappy(x86-64) = 1.1.0-3.el7
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
2016-02-11 21:20:20,570 - Installation of packages failed. Checking if installation was partially complete
2016-02-11 21:20:20,570 - Old versions: ['2.3.2.0-2950', '2.3.4.0-3485']
2016-02-11 21:20:20,614 - New versions: ['2.3.2.0-2950', '2.3.4.0-3485']
2016-02-11 21:20:20,615 - Deltas: set([])

But snappy.x86_64 1.0.5-1.el6 has been installed already, pls check below:

[root@Lnx0 ambari]# yum list snappy

Loaded plugins: langpacks, ulninfo

Repository HDP-2.3.4.0 is listed more than once in the configuration

Repository HDP-UTILS-1.1.0.20 is listed more than once in the configuration Installed Packages

snappy.x86_64 1.0.5-1.el6 @hdp-UTILS-1.1.0.20 Available Packages

snappy.i686 1.1.0-3.el7 ol7_latest

snappy.x86_64 1.1.0-3.el7 ol7_latest

[root@Lnx0 ambari]#

1 ACCEPTED SOLUTION

avatar
Expert Contributor

I encountered this same issue. After reading @wei yang's follow up response I downgraded snappy instead of removing. So far so good.

yum downgrade snappy

Output Below

Removed:

snappy.x86_64 0:1.1.0-3.el7

Installed:

snappy.x86_64 0:1.0.5-1.el6

View solution in original post

10 REPLIES 10

avatar
Master Mentor

@wei yang

Try this

Remove redhat/centos repo

mv /etc/yum.repos.d/redhat.repo or centos repo

Remove snappy + devel and then force install snappy 1.0.5 from snappy-devel:

yum clean all

yum remove snappy snappy-devel

yum install snappy*

It should pick snappy from HDP repo.

avatar
Contributor

I moved public-yum-ol7.repo and nux-dextop.repo into /etc/yum.repos.d/bk and tried upgrade again, it works !!

Thank you very much for the help !!

avatar
Master Mentor

@wei yang Perfect! Please accept the answer to close the thread.

avatar
Contributor

I accepted your answer

avatar
Contributor

I would look at the alternate answers to this question, which are simpler and allow the package manager to gracefully downgrade the snappy library without breaking dependencies or unnecessarily removing other packages.

avatar
Contributor

@wei yang

try to downgrade snappy instead of remove.

We blew away the kdump.conf files, plus some other files, when we did that uninstall.

We should do this with the downgrade command.

snappy removal, removed following packages.

abrt-addon-vmcore abrt-cli abrt-console-notification crashcrash-gcore-command kexec-tools

avatar
Expert Contributor

I encountered this same issue. After reading @wei yang's follow up response I downgraded snappy instead of removing. So far so good.

yum downgrade snappy

Output Below

Removed:

snappy.x86_64 0:1.1.0-3.el7

Installed:

snappy.x86_64 0:1.0.5-1.el6

avatar
Contributor

I would never remove and reinstall a package (which is the more complex answer listed as the 'Best Answer' above) when a simple downgrade or upgrade will work, as the RPM package manager will retain the dependencies and prevent unnecessary uninstallation of related packages. Kirk's answer here looks legitimately easier and better.

avatar
Master Mentor

@Kirk Haslbeck and @David Kaiser I have accepted this as best answer.