Bug 1715763

Summary: [RFE] Upgrade of host failed - yum lockfile is held by another process
Product: [oVirt] ovirt-engine Reporter: Petr Matyáš <pmatyas>
Component: BLL.InfraAssignee: Dana <delfassy>
Status: CLOSED CURRENTRELEASE QA Contact: Petr Matyáš <pmatyas>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.3.4CC: bugs, lleistne, mperina, mtessun
Target Milestone: ovirt-4.4.0Keywords: FutureFeature, Reopened
Target Release: ---Flags: pm-rhel: ovirt-4.4+
mtessun: planning_ack+
mperina: devel_ack+
pm-rhel: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-20 20:03:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1795184    
Bug Blocks:    
Attachments:
Description Flags
engine logs none

Description Petr Matyáš 2019-05-31 07:55:25 UTC
Created attachment 1575600 [details]
engine logs

Description of problem:
When running upgrade of host, the upgrade has failed because yum lockfile was held by another process (regular scheduled check for updates started by engine)

Version-Release number of selected component (if applicable):
ovirt-engine-4.3.4.2-0.1.el7.noarch

How reproducible:
random

Steps to Reproduce:
1. run upgrade of host
2. run check for upgrade in specific time just after upgrade of ovirt-host and before update of other packages
3.

Actual results:
yum lockfile is held by another process

Expected results:
upgraded host

Additional info:

Comment 1 Martin Perina 2019-05-31 10:00:29 UTC
There's nothing we could do about it, the same situation could for example happen by running 'yum check-update' directly at the host at the same time you execute host upgrade from UI. And writing some synchronization between check-for-upgrade and upgrade executed from engine it's just too much work for this corner case. When this happen administrators just need to run the action again

Comment 2 Petr Matyáš 2019-07-15 14:19:59 UTC
This happens always if you try to upgrade a host right after engine restart.

Comment 3 Ondra Machacek 2019-08-30 11:40:23 UTC
In Ansible 2.8 there is 'lock_timeout' for 'yum' module, which 'wait for the yum lockfile to be freed.' We can use and increase this timeout when we will use Ansible 2.8.

Comment 4 Dana 2019-12-17 17:21:25 UTC
I wasn't able to reproduce, but I've posted a patch that should handle this

Comment 5 Petr Matyáš 2020-03-20 10:33:56 UTC
Verified on ovirt-engine-4.4.0-0.25.master.el8ev.noarch

Comment 6 Sandro Bonazzola 2020-05-20 20:03:19 UTC
This bugzilla is included in oVirt 4.4.0 release, published on May 20th 2020.

Since the problem described in this bug report should be
resolved in oVirt 4.4.0 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.