Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
+++ This bug was initially created as a clone of Bug #730857 +++
There's a bug observed in RHEL testing which we assume to be present in Fedora 16 as well.
"When installing packages in "%post" section of kickstart installation or
manually in chroot before restarting the installation, yum throws a traceback:
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in <module>
yummain.user_main(sys.argv[1:], exit_code=True)
File "/usr/share/yum-cli/yummain.py", line 276, in user_main
errcode = main(args)
File "/usr/share/yum-cli/yummain.py", line 211, in main
return_code = base.doTransaction()
File "/usr/share/yum-cli/cli.py", line 586, in doTransaction
resultobject = self.runTransaction(cb=cb)
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 1436, in
runTransaction
lastdbv = self.history.last()
File "/usr/lib/python2.6/site-packages/yum/history.py", line 1259, in last
ret = self.old([], 1, complete_transactions_only)
File "/usr/lib/python2.6/site-packages/yum/history.py", line 1208, in old
executeSQL(cur, sql, params)
File "/usr/lib/python2.6/site-packages/yum/sqlutils.py", line 166, in
executeSQLQmark
return cursor.execute(query)
sqlite3.OperationalError: database is locked"
"Looking through the patches changed from -17 to -18 I see this which feels
completely dead on:
-- a/yum/history.py
+++ b/yum/history.py
@@ -627,6 +627,14 @@ class YumHistory:
self.conf.readable = False
return None
+ # Note that this is required due to changing the history DB in
the
+ # callback for removed txmbrs ... which happens inside the chroot,
+ # as against all our other access which is outside the chroot. So
+ # we need sqlite to not open the journal.
+ # In theory this sucks, as history could be shared. In reality
+ # it's deep yum stuff and there should only be one yum.
+ executeSQL(self._conn.cursor(), "PRAGMA locking_mode = EXCLUSIVE")
+
return self._conn.cursor()
def _commit(self):
Since at the point in the anaconda run you have 2 yums (sorta) one inside
anaconda and the one you're execing in %post."
This is a significant issue for kickstart installs. Proposing as Beta blocker (to feed into the discussion we need to have on kickstart criteria) and marking as CommonBugs.
--- Additional comment from Panu Matilainen on 2011-08-16 02:52:29 EDT ---
The exclusive sqlite access mode is largely a hack to deal with chroot issues, but me thinks this is a case of it simply exposing a flaw in the way things have been done so far: there shouldn't be two yum instances running on the same system, and this should be dealt with in anaconda by fully shutting down its internal yum instance before entering %post (it doesn't need it at that point for anything).
--- Additional comment from seth vidal on 2011-08-16 15:30:06 EDT ---
Agreed on the anaconda changes. The comment I made above was to deal w/the issue pre-6.2 - not to suggest that yum solve it all internally.
--- Additional comment from James Antill on 2011-08-17 15:34:05 EDT ---
Note that we already have a yb.history.close() API ... and it'll automatically do it when "freed", so unless you want us to automatically do it at the end of the transaction (kind of icky, but probably nothing breaks) ... then I guess we just need to change anaconda.
--- Additional comment from Fedora Update System on 2011-08-30 15:51:52 EDT ---
anaconda-16.16-1.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/anaconda-16.16-1.fc16
--- Additional comment from Fedora Update System on 2011-08-30 22:30:56 EDT ---
anaconda-16.16-1.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.
--- Additional comment from Chris Lumens on 2011-09-05 15:24:35 EDT ---
I've failed to install rhvm-appliance-4.1.20170126.0-1.el7ev.noarch.rpm package on RHEVH4.1 host with these components:
sanlock-3.4.0-1.el7.x86_64
ovirt-node-ng-nodectl-4.1.0-0.20170104.1.el7.noarch
qemu-kvm-rhev-2.6.0-28.el7_3.3.x86_64
vdsm-4.19.4-1.el7ev.x86_64
ovirt-imageio-common-1.0.0-0.el7ev.noarch
ovirt-engine-sdk-python-3.6.9.1-1.el7ev.noarch
ovirt-setup-lib-1.1.0-1.el7ev.noarch
ovirt-vmconsole-host-1.0.4-1.el7ev.noarch
mom-0.5.8-1.el7ev.noarch
ovirt-imageio-daemon-1.0.0-0.el7ev.noarch
ovirt-hosted-engine-ha-2.1.0.1-1.el7ev.noarch
ovirt-hosted-engine-setup-2.1.0.1-1.el7ev.noarch
ovirt-vmconsole-1.0.4-1.el7ev.noarch
libvirt-client-2.0.0-10.el7_3.4.x86_64
ovirt-host-deploy-1.6.0-1.el7ev.noarch
Linux version 3.10.0-514.6.1.el7.x86_64 (mockbuild.eng.bos.redhat.com) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC) ) #1 SMP Sat Dec 10 11:15:38 EST 2016
Linux 3.10.0-514.6.1.el7.x86_64 #1 SMP Sat Dec 10 11:15:38 EST 2016 x86_64 x86_64 x86_64 GNU/Linux
Red Hat Enterprise Linux release 7.3
Marking /var/tmp/yum-root-xHybhj/rhvm-appliance-4.1.20170126.0-1.el7ev.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package rhvm-appliance.noarch 1:4.1.20170126.0-1.el7ev will be installed
--> Finished Dependency Resolution
Dependencies Resolved
======================================================================================================================
Package Arch Version Repository Size
======================================================================================================================
Installing:
rhvm-appliance noarch 1:4.1.20170126.0-1.el7ev /rhvm-appliance-4.1.20170126.0-1.el7ev.noarch 1.6 G
Transaction Summary
======================================================================================================================
Install 1 Package
Total size: 1.6 G
Installed size: 1.6 G
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in <module>
yummain.user_main(sys.argv[1:], exit_code=True)
File "/usr/share/yum-cli/yummain.py", line 370, in user_main
errcode = main(args)
File "/usr/share/yum-cli/yummain.py", line 276, in main
return_code = base.doTransaction()
File "/usr/share/yum-cli/cli.py", line 773, in doTransaction
resultobject = self.runTransaction(cb=cb)
File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1833, in runTransaction
lastdbv = self.history.last()
File "/usr/lib/python2.7/site-packages/yum/history.py", line 1271, in last
ret = self.old([], 1, complete_transactions_only)
File "/usr/lib/python2.7/site-packages/yum/history.py", line 1220, in old
executeSQL(cur, sql, params)
File "/usr/lib/python2.7/site-packages/yum/sqlutils.py", line 166, in executeSQLQmark
return cursor.execute(query)
sqlite3.OperationalError: database is locked