runas=root entry in opennms.conf gets duplicated
Description
Acceptance / Success Criteria
None
Lucidchart Diagrams
Activity
Show:
Alex May June 27, 2022 at 4:11 PM
Veena Kannan June 21, 2022 at 2:54 PM
This could be an external actor causing this, but let's investigate this to see if this could be our docker file.
Fixed
Assignee
Reporter
Marcel Fuhrmann
Marcel FuhrmannHB Backlog Status
Backlog
Sprint
None
Fix versions
Affects versions
Priority
Created June 14, 2022 at 6:40 AM
Updated July 6, 2022 at 5:42 PM
Resolved June 27, 2022 at 5:19 PM
I am running OpenNMS in Docker and I am running Horizon with root user.
It looks like every time when I restart OpenNMS the runas=root entry in opennms.conf is added again.
```
[06:11]root@fraithw001:/etc/docker/compose/opennms-config-fra# git diff container-fs/opt/opennms/etc/opennms.conf
diff --git a/container-fs/opt/opennms/etc/opennms.conf b/container-fs/opt/opennms/etc/opennms.conf
index 94f08036..91a1a4fc 100644
— a/container-fs/opt/opennms/etc/opennms.conf
+++ b/container-fs/opt/opennms/etc/opennms.conf
@@ -43,3 +43,5 @@ RUNAS=root
RUNAS=root
RUNAS=root
RUNAS=root
+RUNAS=root
+RUNAS=root
```
Just to give you a clue about my Docker Horizon setup:
```
horizon:
image: opennms/horizon:30.0.0
container_name: horizon
network_mode: 'host'
user: root:root
deploy:
resources:
limits:
memory: 16384M
cap_add:
NET_ADMIN
extra_hosts:
"database:127.0.0.1"
"horizon:127.0.0.1"
"pris:172.16.238.10"
environment:
TZ: Europe/Berlin
JAVA_OPTS: >
-Dsun.net.inetaddr.ttl=0 -Dcom.sun.management.jmxremote.port=18980
-Dcom.sun.management.jmxremote.rmi.port=18980
-Dcom.sun.management.jmxremote.local.only=false
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=true
-Dopennms.poller.server.serverHost=0.0.0.0
-Djava.rmi.server.hostname=fraithw001
-Dnetworkaddress.cache.ttl=0
depends_on:
database
volumes:
'./container-fs/opt/opennms/etc:/opt/opennms/etc'
'./container-fs/etc/confd/confd.toml:/etc/confd/confd.toml'
'./container-fs/opt/opennms/confd:/opt/opennms/confd'
'./container-fs/opt/opennms/deploy:/opt/opennms/deploy'
'/var/log/opennms:/opt/opennms/logs'
'./container-fs/opt/opennms-overlay:/opt/opennms-overlay'
Local volume for metrics
data-opennms:/opt/opennms/share/rrd
command: ["-s"]
healthcheck:
test: >
["CMD", "curl", "-f", "-I",
"http://localhost:8980/opennms/login.jsp"]
interval: 1m
timeout: 5s
retries: 3
dns:
172.21.65.210
172.21.65.211
dns_search: ad1.proemion.com
```