Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

how to resolve - Incomplete Yum Transactions when performing HDP upgrade

avatar

we are in the middle of HDP upgrade to 2.6.4

but on all cluster nodes we get the following errors during installation

how to resolve this isshue ?

2018-02-26 12:27:37,484 - *** Incomplete Yum Transactions ***
2018-02-26 12:27:37,484 -     
2018-02-26 12:27:37,484 - Ambari has detected that there are incomplete Yum transactions on this host. This will interfere with the installation process and must be resolved before continuing.
2018-02-26 12:27:37,485 - 
2018-02-26 12:27:37,485 - - Identify the pending transactions with the command 'yum history list <packages failed>'
2018-02-26 12:27:37,485 - - Revert each pending transaction with the command 'yum history undo'
2018-02-26 12:27:37,485 - - Flush the transaction log with 'yum-complete-transaction --cleanup-only'
2018-02-26 12:27:37,485 - 
Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/custom_actions/scripts/install_packages.py", line 473, in <module>
    InstallPackages().execute()
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 375, in execute
    method(env)
  File "/var/lib/ambari-agent/cache/custom_actions/scripts/install_packages.py", line 133, in actionexecute
    raise Fail("Failed to distribute repositories/install packages")
resource_management.core.exceptions.Fail: Failed to distribute repositories/install packages
Michael-Bronson
1 ACCEPTED SOLUTION

avatar
Master Mentor

@Michael Bronson

Please try this:

1. Cleanup/Remove some old files at "/var/lib/yum/transaction*" which are old transactions and not cleaned up by any chance.

2. Use the "yum-complete-transaction" utility to cleanup old incomplete transactions:

# yum install yum-utils -y

# yum-complete-transaction --cleanup-only
(OR)
# yum-complete-transaction

.

Then retry the installation process. Please run these commands on all those hosts where the installation failed.

View solution in original post

2 REPLIES 2

avatar
Master Mentor

@Michael Bronson

Please try this:

1. Cleanup/Remove some old files at "/var/lib/yum/transaction*" which are old transactions and not cleaned up by any chance.

2. Use the "yum-complete-transaction" utility to cleanup old incomplete transactions:

# yum install yum-utils -y

# yum-complete-transaction --cleanup-only
(OR)
# yum-complete-transaction

.

Then retry the installation process. Please run these commands on all those hosts where the installation failed.

avatar

now we install again ( re-install ) , from ambari GUI ( upgrade )

but we get now the following down

its very strange because we set in the ambari GUI the repo for HDP , SDP-GPL and HDP-UTILS

and also the 3 repo also exists on each machine

what is unclear is that

when we try to install the pkg on the machine

/usr/bin/yum -d 0 -e 0 -y install '--disablerepo=*' --enablerepo=HDP-2.6-GPL-repo-53,HDP-2.6-repo-53,HDP-UTILS-1.1.0.22-repo-53 hdp-select
Package hdp-select-2.6.4.0-91.noarch already installed and latest version

then its tell us that pkg already exists

but from the log seems that he not found the pkg - hdp-select

how it can be?

<br>2018-02-26 13:59:25,315 - Will install packages for repository version 2.6.4.0
2018-02-26 13:59:25,316 - Repository['HDP-2.6-repo-53'] {'append_to_file': False, 'base_url': 'http://98.45.232.167/HDP/centos7/2.6.4.0-91', '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': 'ambari-hdp-53', 'mirror_list': None}
2018-02-26 13:59:25,333 - File['/etc/yum.repos.d/ambari-hdp-53.repo'] {'content': '[HDP-2.6-repo-53]\nname=HDP-2.6-repo-53\nbaseurl=http://98.45.232.167/HDP/centos7/2.6.4.0-91\n\npath=/\nenabled=1\ngpgcheck=0'}
2018-02-26 13:59:25,334 - Writing File['/etc/yum.repos.d/ambari-hdp-53.repo'] because contents don't match
2018-02-26 13:59:25,335 - Repository['HDP-2.6-GPL-repo-53'] {'append_to_file': True, 'base_url': 'http://98.45.232.167/HDP-GPL/centos7/2.6.4.0-91', 'action': ['create'], 'components': [u'HDP-GPL', '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': 'ambari-hdp-53', 'mirror_list': None}
2018-02-26 13:59:25,343 - File['/etc/yum.repos.d/ambari-hdp-53.repo'] {'content': '[HDP-2.6-repo-53]\nname=HDP-2.6-repo-53\nbaseurl=http://98.45.232.167/HDP/centos7/2.6.4.0-91\n\npath=/\nenabled=1\ngpgcheck=0\n[HDP-2.6-GPL-repo-53]\nname=HDP-2.6-GPL-repo-53\nbaseurl=http://98.45.232.167/HDP-GPL/centos7/2.6.4.0-91\n\npath=/\nenabled=1\ngpgcheck=0'}
2018-02-26 13:59:25,343 - Writing File['/etc/yum.repos.d/ambari-hdp-53.repo'] because contents don't match
2018-02-26 13:59:25,344 - Repository['HDP-UTILS-1.1.0.22-repo-53'] {'append_to_file': True, 'base_url': 'http://98.45.232.167/', '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': 'ambari-hdp-53', 'mirror_list': None}
2018-02-26 13:59:25,352 - File['/etc/yum.repos.d/ambari-hdp-53.repo'] {'content': '[HDP-2.6-repo-53]\nname=HDP-2.6-repo-53\nbaseurl=http://98.45.232.167/HDP/centos7/2.6.4.0-91\n\npath=/\nenabled=1\ngpgcheck=0\n[HDP-2.6-GPL-repo-53]\nname=HDP-2.6-GPL-repo-53\nbaseurl=http://98.45.232.167/HDP-GPL/centos7/2.6.4.0-91\n\npath=/\nenabled=1\ngpgcheck=0\n[HDP-UTILS-1.1.0.22-repo-53]\nname=HDP-UTILS-1.1.0.22-repo-53\nbaseurl=http://98.45.232.167/\n\npath=/\nenabled=1\ngpgcheck=0'}
2018-02-26 13:59:25,353 - Writing File['/etc/yum.repos.d/ambari-hdp-53.repo'] because contents don't match
2018-02-26 13:59:25,354 - Yum non-completed transactions check passed
2018-02-26 13:59:25,354 - call[('ambari-python-wrap', u'/usr/bin/hdp-select', 'versions')] {}
2018-02-26 13:59:25,426 - call returned (0, '2.6.0.3-8\n2.6.4.0-91')
2018-02-26 13:59:25,427 - Package['hdp-select'] {'retry_on_repo_unavailability': False, 'retry_count': 5, 'use_repos': {u'HDP-2.6-repo-53': u'ambari-hdp-53', u'HDP-2.6-GPL-repo-53': u'ambari-hdp-53', u'HDP-UTILS-1.1.0.22-repo-53': u'ambari-hdp-53'}, 'action': ['upgrade']}
2018-02-26 13:59:25,428 - Installing package hdp-select ('/usr/bin/yum -d 0 -e 0 -y install '--disablerepo=*' --enablerepo=HDP-2.6-GPL-repo-53,HDP-2.6-repo-53,HDP-UTILS-1.1.0.22-repo-53 hdp-select')
2018-02-26 13:59:27,565 - Looking for matching packages in the following repositories: HDP-2.6-repo-53, HDP-2.6-GPL-repo-53, HDP-UTILS-1.1.0.22-repo-53
2018-02-26 13:59:35,337 - No package found for hadoop_${stack_version}(hadoop_(\d|_)+$)<br>
<br>
Michael-Bronson