Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-6854

net-snmp does not start with new rpm SQLite DB

    • net-snmp-5.9.1-13.el9
    • None
    • Important
    • rhel-sst-cs-system-management
    • 22
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • If docs needed, set a value
    • None

      Description of problem:

      After https://fedoraproject.org/wiki/Changes/Sqlite_Rpmdb, rpm changed from Berkeley DB to SQLite. SNMP is using these hardcoded paths to determine where RPM info is, so for example net-snmp-5.9.1-7.el9 [1] is trying to search for /var/lib/rpm/Packages and fails with the following error otherwise

      Can't find directory of RPM packages

      [1] https://fossies.org/linux/net-snmp/agent/mibgroup/host/data_access/swinst_rpm.c

      Version-Release number of selected component (if applicable):

      net-snmp-5.9.1-7.el9

      Steps to Reproduce:
      1. yum install net-snmp net-snmp-utils
      2. systemctl enable snmpd
      3. systemctl start snmpd

      Basically you get a different rpm dir struct, so code should take this into account:

      [root@juarezcs9 ~]# ls /var/lib/rpm
      rpmdb.sqlite rpmdb.sqlite-shm rpmdb.sqlite-wal

              jridky Josef Řídký
              djuarezg_cern djuarezg@cern.ch (Inactive)
              Josef Řídký Josef Řídký
              Evgeny Fedin Evgeny Fedin
              Votes:
              0 Vote for this issue
              Watchers:
              17 Start watching this issue

                Created:
                Updated:
                Resolved: