Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

salt state pkg.latest break rpmdb #55808

Open
mrpk1906 opened this issue Jan 8, 2020 · 1 comment
Open

salt state pkg.latest break rpmdb #55808

mrpk1906 opened this issue Jan 8, 2020 · 1 comment
Assignees
Labels
Bug broken, incorrect, or confusing behavior severity-high 2nd top severity, seen by most users, causes major problems

Comments

@mrpk1906
Copy link

mrpk1906 commented Jan 8, 2020

Description of Issue

Using pkg.latest break rpmdb

[root@xxx ~]# rpm -qa
error: rpmdb: BDB0113 Thread/process 1673923/139949096433728 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 1673923/139949096433728 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

Setup

install wazuh-agent:
  pkg.latest:
    - name: wazuh-agent
    - refresh: True
    - cache_valid_time: 300

Steps to Reproduce Issue

Logs from /var/log/salt/minion

2020-01-08 00:08:17,448 [salt.loaded.int.module.cmdmod:841 ][ERROR   ][3766154] Command '[u'rpm', u'-qa', u'--queryformat', u'%{NAME}_|-%{EPOCH}_|-%{VERSION}_|-%{RELEASE}_|-%{ARCH}_|-(none)_|-%{INSTALLTIME}\n']' failed with return code: 1
2020-01-08 00:08:17,449 [salt.loaded.int.module.cmdmod:843 ][ERROR   ][3766154] stdout: error: rpmdb: BDB0113 Thread/process 3747786/140121840220224 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 3747786/140121840220224 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

Versions Report

both master and minion are using version 2019.2.2

  1. Master
root@master:~# salt --versions-report
Salt Version:
           Salt: 2019.2.2

Dependency Versions:
           cffi: Not Installed
       cherrypy: Not Installed
       dateutil: 2.6.1
      docker-py: Not Installed
          gitdb: 2.0.3
      gitpython: 2.1.8
          ioflo: Not Installed
         Jinja2: 2.10
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: Not Installed
           Mako: 1.0.7
   msgpack-pure: Not Installed
 msgpack-python: 0.5.6
   mysql-python: Not Installed
      pycparser: Not Installed
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 2.7.15+ (default, Oct  7 2019, 17:39:04)
   python-gnupg: 0.4.1
         PyYAML: 5.1.2
          PyZMQ: 16.0.2
           RAET: Not Installed
          smmap: 2.0.3
        timelib: Not Installed
        Tornado: 4.5.3
            ZMQ: 4.2.5

System Versions:
           dist: Ubuntu 18.04 bionic
         locale: UTF-8
        machine: x86_64
        release: 4.15.0-22-generic
         system: Linux
        version: Ubuntu 18.04 bionic
  1. Minion
[root@minion ~]# salt-minion --versions-report
/usr/lib/python2.7/site-packages/salt/scripts.py:198: DeprecationWarning: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date.  Salt will drop support for Python 2.7 in the Sodium release or later.
Salt Version:
           Salt: 2019.2.2

Dependency Versions:
           cffi: Not Installed
       cherrypy: Not Installed
       dateutil: Not Installed
      docker-py: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
         Jinja2: 2.7.2
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.5.6
   mysql-python: Not Installed
      pycparser: Not Installed
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 2.7.5 (default, Oct 30 2018, 23:45:53)
   python-gnupg: Not Installed
         PyYAML: 3.11
          PyZMQ: 15.3.0
           RAET: Not Installed
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.2.1
            ZMQ: 4.1.4

System Versions:
           dist: centos 7.6.1810 Core
         locale: UTF-8
        machine: x86_64
        release: 3.10.0-957.10.1.el7.x86_64
         system: Linux
        version: CentOS Linux 7.6.1810 Core
@mrpk1906 mrpk1906 changed the title salt state pkg.latest break rpmdb salt state pkg.latest break rpmdb Jan 8, 2020
@BlackMetalz
Copy link

Confirm, I do have the same issue.

@sagetherage sagetherage added Packaging Related to packaging of Salt, not Salt's support for package management. Bug broken, incorrect, or confusing behavior labels Jan 9, 2020
@Ch3LL Ch3LL added this to the Approved milestone Jan 13, 2020
@sagetherage sagetherage added Phosphorus v3005.0 Release code name and version severity-high 2nd top severity, seen by most users, causes major problems and removed Packaging Related to packaging of Salt, not Salt's support for package management. labels Jun 16, 2021
@sagetherage sagetherage modified the milestones: Approved, Phosphorus Jun 16, 2021
@s0undt3ch s0undt3ch added the Sulfur v3006.0 release code name and version label Apr 14, 2022
@s0undt3ch s0undt3ch removed the Phosphorus v3005.0 Release code name and version label Apr 14, 2022
@waynew waynew removed the Sulfur v3006.0 release code name and version label Dec 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior severity-high 2nd top severity, seen by most users, causes major problems
Projects
None yet
Development

No branches or pull requests

6 participants