Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-25219

Install packages failing due to incomplete transaction error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Won't Fix
    • trunk, 2.6.2, 2.7.4
    • None
    • ambari-server

    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.

      - - 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
      

       

      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. 

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            vjasani Viraj Jasani
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h 50m
                1h 50m