Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-14396

runas=root entry in opennms.conf gets duplicated

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Minor
    • Resolution: Fixed
    • Meridian-2022.1.4, 30.0.0
    • 29.0.11, Meridian-2022.1.5, 30.0.1
    • None
    • Security Level: Default (Default Security Scheme)
    • None
    • Horizon 22 - Jun 23 - Jul 7
    • Backlog

    Description

      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'
      1. 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
        ```

      Attachments

        Activity

          People

            amay Alex May
            fuhrmann Marcel Fuhrmann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: