[
https://issues.apache.org/jira/browse/AMBARI-25219?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Viraj Jasani updated AMBARI-25219:
----------------------------------
Description:
Based on default yum behaviour, even though incomplete transaction causes any
delay in installing packages, yum internally performs cleanup and then proceeds
with installation of on-going packages.
However, our code prevents default yum behavior and fails to perform
installation of packages.
{code:java}
- - Identify the pending transactions with the command 'yum history list
<packages failed>'
2018-10-05 13:47:09,975 - - Revert each pending transaction with the command
'yum history undo'
- - Flush the transaction log with 'yum-complete-transaction --cleanup-only'
-
Traceback (most recent call last):
File
"/var/lib/ambari-agent/cache/custom_actions/scripts/install_packages.py", line
438, in <module>
InstallPackages().execute()
File
"/usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py",
line 381, in execute
method(env)
File
"/var/lib/ambari-agent/cache/custom_actions/scripts/install_packages.py", line
134, in actionexecute
raise Fail("Failed to distribute repositories/install packages")
resource_management.core.exceptions.Fail: Failed to distribute
repositories/install packages
{code}
With the changes submitted in PR, we have not found any issues with yum
installation of packages for the first time or multiple times on the same host
for upgrade. Even though agent kills yum, yum internally takes care of
completing the transaction itself.
was:
Based on default yum behaviour, even though incomplete transaction causes any
delay in installing packages, yum internally performs cleanup and then proceeds
with installation of on-going packages.
However, our code prevents default yum behavior and fails to perform
installation of packages.
{code:java}
- - Identify the pending transactions with the command 'yum history list
<packages failed>'
2018-10-05 13:47:09,975 - - Revert each pending transaction with the command
'yum history undo'
- - Flush the transaction log with 'yum-complete-transaction --cleanup-only'
-
Traceback (most recent call last):
File
"/var/lib/ambari-agent/cache/custom_actions/scripts/install_packages.py", line
438, in <module>
InstallPackages().execute()
File
"/usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py",
line 381, in execute
method(env)
File
"/var/lib/ambari-agent/cache/custom_actions/scripts/install_packages.py", line
134, in actionexecute
raise Fail("Failed to distribute repositories/install packages")
resource_management.core.exceptions.Fail: Failed to distribute
repositories/install packages
{code}
> Install packages failing due to incomplete transaction error
> ------------------------------------------------------------
>
> Key: AMBARI-25219
> URL: https://issues.apache.org/jira/browse/AMBARI-25219
> Project: Ambari
> Issue Type: Bug
> Components: ambari-server
> Affects Versions: trunk, 2.6.2, 2.7.4
> Reporter: Viraj Jasani
> Assignee: Viraj Jasani
> Priority: Critical
> Labels: pull-request-available
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Based on default yum behaviour, even though incomplete transaction causes any
> delay in installing packages, yum internally performs cleanup and then
> proceeds with installation of on-going packages.
> However, our code prevents default yum behavior and fails to perform
> installation of packages.
> {code:java}
> - - Identify the pending transactions with the command 'yum history list
> <packages failed>'
> 2018-10-05 13:47:09,975 - - Revert each pending transaction with the command
> 'yum history undo'
> - - Flush the transaction log with 'yum-complete-transaction --cleanup-only'
> -
> Traceback (most recent call last):
> File
> "/var/lib/ambari-agent/cache/custom_actions/scripts/install_packages.py",
> line 438, in <module>
> InstallPackages().execute()
> File
> "/usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py",
> line 381, in execute
> method(env)
> File
> "/var/lib/ambari-agent/cache/custom_actions/scripts/install_packages.py",
> line 134, in actionexecute
> raise Fail("Failed to distribute repositories/install packages")
> resource_management.core.exceptions.Fail: Failed to distribute
> repositories/install packages
> {code}
>
> With the changes submitted in PR, we have not found any issues with yum
> installation of packages for the first time or multiple times on the same
> host for upgrade. Even though agent kills yum, yum internally takes care of
> completing the transaction itself.
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)