Bug 2075535 - net-snmp does not start with new rpm SQLite DB
Summary: net-snmp does not start with new rpm SQLite DB
Keywords:
Status: ASSIGNED
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: net-snmp
Version: CentOS Stream
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Josef Ridky
QA Contact: CS System Management SST QE
URL:
Whiteboard:
: 2094235 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-04-14 13:14 UTC by Daniel Juarez
Modified: 2023-08-10 07:42 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-118982 0 None None None 2022-04-14 13:18:19 UTC
Red Hat Knowledge Base (Solution) 7017761 0 None None None 2023-06-07 16:59:21 UTC

Description Daniel Juarez 2022-04-14 13:14:35 UTC
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

Comment 1 Josef Ridky 2022-07-07 08:06:32 UTC
*** Bug 2094235 has been marked as a duplicate of this bug. ***

Comment 2 Josef Ridky 2022-07-18 10:05:36 UTC
You're still getting set of installed packages correctly, the error message is the only redundant information in snmpd log.

I'll contact upstream authors and try to find some solution.

Comment 3 lionel.cons 2023-03-16 13:38:46 UTC
Josef, six months have passed now. Do you have any update?

Comment 4 Josef Ridky 2023-06-23 07:36:25 UTC
Hi,

I'll ping upstream for the update.


Note You need to log in before you can comment on or make changes to this bug.