From 00b9c69cd5bf5a397db66fd1b79be506c3bf10fc Mon Sep 17 00:00:00 2001 From: fperez Date: Mon, 2 Sep 2024 15:44:53 -0300 Subject: [PATCH] Fix SNMP configmap libsnmpAuditPlugin When applying the SNMP app, the ConfigMap "snmpd-etc-config" was found to refer to a non-existing directory. This commit replaces references to /usr/lib64 with /usr/lib. Additionally, it removes unused definitions. Test plan: PASS: Build stx-snmp docker image. PASS: Install and configure snmp in a local environment. Run kubectl get cm -n kube-system snmpd-etc-config -o yaml and verify that this is using /usr/lib instead of /usr/lib64 closes-bug: 2078734 Change-Id: I83e2aca0b8185f5853ca33d7e33b73d2b10668d5 Signed-off-by: fperez --- .../custom/snmp-helm/snmp-helm/snmp/snmpd/snmpd.conf | 2 +- stx-snmp-helm/docker/stx-snmp/src/Makefile | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/helm-charts/custom/snmp-helm/snmp-helm/snmp/snmpd/snmpd.conf b/helm-charts/custom/snmp-helm/snmp-helm/snmp/snmpd/snmpd.conf index 54b876f..e685674 100755 --- a/helm-charts/custom/snmp-helm/snmp-helm/snmp/snmpd/snmpd.conf +++ b/helm-charts/custom/snmp-helm/snmp-helm/snmp/snmpd/snmpd.conf @@ -13,7 +13,7 @@ master agentx agentXSocket tcp:705 -dlmod snmpAuditPlugin /usr/lib64/libsnmpAuditPlugin.so +dlmod snmpAuditPlugin /usr/lib/libsnmpAuditPlugin.so # Insert the snmpAudit hander into specific sections of the mib tree injectHandler snmpAudit null diff --git a/stx-snmp-helm/docker/stx-snmp/src/Makefile b/stx-snmp-helm/docker/stx-snmp/src/Makefile index 7f759e1..c7401b5 100644 --- a/stx-snmp-helm/docker/stx-snmp/src/Makefile +++ b/stx-snmp-helm/docker/stx-snmp/src/Makefile @@ -8,7 +8,7 @@ LIBCGTSAGENT_SO := libsnmpAuditPlugin.so MAJOR ?= 1 MINOR ?= 0 PATCH ?= 0 -DESTDIR ?= /usr/lib64 +DESTDIR ?= /usr/lib build: lib @@ -24,7 +24,7 @@ clean: @rm -f $(OBJ) *.o *.so.* install: - install -m 755 -d $(DESTDIR)$(LIB_DIR) - install -m 755 $(LIBCGTSAGENT_SO).$(MAJOR).$(MINOR).$(PATCH) $(DESTDIR)$(LIB_DIR) - ln -s $(LIBCGTSAGENT_SO).$(MAJOR).$(MINOR).$(PATCH) $(DESTDIR)$(LIB_DIR)/$(LIBCGTSAGENT_SO).$(MAJOR) - ln -s $(LIBCGTSAGENT_SO).$(MAJOR).$(MINOR).$(PATCH) $(DESTDIR)$(LIB_DIR)/$(LIBCGTSAGENT_SO) + install -m 755 -d $(DESTDIR) + install -m 755 $(LIBCGTSAGENT_SO).$(MAJOR).$(MINOR).$(PATCH) $(DESTDIR) + ln -s $(LIBCGTSAGENT_SO).$(MAJOR).$(MINOR).$(PATCH) $(DESTDIR)/$(LIBCGTSAGENT_SO).$(MAJOR) + ln -s $(LIBCGTSAGENT_SO).$(MAJOR).$(MINOR).$(PATCH) $(DESTDIR)/$(LIBCGTSAGENT_SO)