Skip to content

DB library error: db5 error(-30973) #172

Open

Description

Cookbook version

cookbook 'lvm', '~> 4.5.3'

Chef-client version

chef-14.7.17

Platform Details

redhat 7

Scenario:

We often see Thread died in Berkeley DB library error: db5 error(-30973) when chef-client attempt so run across our environments. We would need to do the following on the OS to fix issue: rm -f /var/lib/rpm/__db* and then rpm --rebuilddb

Details on this one:
yum_package[lvm2] (lvm::default line 20) had an error: RuntimeError: yum-helper.py had stderr/stdout output: error: rpmdb: BDB0113 Thread/process 98402/140067491477568 failed: BDB1507 Thread died in Berkeley DB library error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery error: cannot open Packages index using db5 - (-30973) error: cannot open Packages database in /var/lib/rpm error: rpmdb: BDB0113 Thread/process 98402/140067491477568 failed: BDB1507 Thread died in Berkeley DB library error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery error: cannot open Packages database in /var/lib/rpm Traceback (most recent call last): File "/opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/chef-14.7.17/lib/chef/provider/package/yum/yum_helper.py", line 203, in query(command) File "/opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/chef-14.7.17/lib/chef/provider/package/yum/yum_helper.py", line 88, in query enabled_repos = base.repos.listEnabled() File "/usr/lib/python2.7/site-packages/yum/init.py", line 1071, in repos = property(fget=lambda self: self._getRepos(), File "/usr/lib/python2.7/site-packages/yum/init.py", line 686, in _getRepos self.conf # touch the config class first File "/usr/lib/python2.7/site-packages/yum/init.py", line 1079, in conf = property(fget=lambda self: self._getConfig(), File "/usr/lib/python2.7/site-packages/yum/init.py", line 349, in _getConfig startupconf = config.readStartupConfig(fn, root, releasever) File "/usr/lib/python2.7/site-packages/yum/config.py", line 1115, in readStartupConfig startupconf.distroverpkg) File "/usr/lib/python2.7/site-packages/yum/config.py", line 1260, in _getsysver raise Errors.YumBaseError("Error: " + str(e)) yum.Errors.YumBaseError: Error: rpmdb open failed

This one would come from:
https://supermarket.chef.io/cookbooks/lvm

https://github.com/chef-cookbooks/lvm/blob/master/recipes/default.rb

LINE 20 it attempts is:
package 'lvm2'

Steps to Reproduce:

[If you are filing an issue what are the things we need to do in order to repro your problem? How are you using this cookbook or any resources it includes?]

Expected Result:

chef-client run successful

Actual Result:

chef-client fails once it get to lvm2 package

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions