[OpenNMS/opennms] b9ad63: NMS-20258: Keep the DataSource across an event tra...

OpenNMS Machine User via opennms-cvs <[email protected]>
Newsgroups gmane.network.opennms.cvs
Message-ID <OpenNMS/opennms/push/refs/heads/release-36.x/[email protected]>
  Branch: refs/heads/release-36.x
  Home:   https://github.com/OpenNMS/opennms
  Commit: b9ad63b5948e9e4df47a3ba40bc2cbb3f2b177fe
      https://github.com/OpenNMS/opennms/commit/b9ad63b5948e9e4df47a3ba40bc2cbb3f2b177fe
  Author: Marshall Massengill <[email protected]>
  Date:   2026-08-26 (Wed, 26 Aug 2026)

  Changed paths:
    M opennms-config/src/main/java/org/opennms/netmgt/config/EventTranslatorConfigFactory.java
    A opennms-config/src/test/java/org/opennms/netmgt/config/EventTranslatorConfigReloadTest.java

  Log Message:
  -----------
  NMS-20258: Keep the DataSource across an event translator config reload (#8814)

EventTranslatorConfigFactory.update() unmarshalled the new configuration
through an overload that passed a null DataSource, so m_dbConnFactory was
cleared on every reload. SqlValueSpec reads that field when it evaluates,
so after the first reloadDaemonConfig for the Translator every mapping
holding a type="sql" value threw

  NullPointerException: Cannot invoke "javax.sql.DataSource.getConnection()"
  because "this.m_db" is null

and stopped translating until OpenNMS was restarted. Mappings without a sql
value kept working, which is why the reload looked successful.

update() was the only caller of the single-argument overload, so it now
passes the DataSource it already holds and the overload is gone.

Reproduced on a live 36.0.4 instance against a translation whose values are
resolved in sql. The shipped translator-configuration.xml resolves ifDescr,
ifName and ifAlias that way, so a reload leaves the default link-down and
link-up translations broken. Present unchanged since 2012 and on every
maintained branch.


  Commit: 167337244656caa2ad3a649ac6b9dbcf5c662240
      https://github.com/OpenNMS/opennms/commit/167337244656caa2ad3a649ac6b9dbcf5c662240
  Author: CI/CD System <[email protected]>
  Date:   2026-08-26 (Wed, 26 Aug 2026)

  Changed paths:
    M opennms-config/src/main/java/org/opennms/netmgt/config/EventTranslatorConfigFactory.java
    A opennms-config/src/test/java/org/opennms/netmgt/config/EventTranslatorConfigReloadTest.java

  Log Message:
  -----------
  Merge remote-tracking branch 'origin/foundation-2024' into foundation-2025


  Commit: b673d2484793c18d5380c48bd5ccf02b04af56c2
      https://github.com/OpenNMS/opennms/commit/b673d2484793c18d5380c48bd5ccf02b04af56c2
  Author: CI/CD System <[email protected]>
  Date:   2026-08-26 (Wed, 26 Aug 2026)

  Changed paths:
    M opennms-config/src/main/java/org/opennms/netmgt/config/EventTranslatorConfigFactory.java
    A opennms-config/src/test/java/org/opennms/netmgt/config/EventTranslatorConfigReloadTest.java

  Log Message:
  -----------
  Merge remote-tracking branch 'origin/foundation-2025' into foundation-2026


  Commit: 48b76a191dd69c2acee461b7582bba1a41630d24
      https://github.com/OpenNMS/opennms/commit/48b76a191dd69c2acee461b7582bba1a41630d24
  Author: Marshall Massengill <[email protected]>
  Date:   2026-08-26 (Wed, 26 Aug 2026)

  Changed paths:
    M opennms-webapp-rest/src/main/java/org/opennms/web/rest/v2/SnmpConfigRestService.java
    M opennms-webapp-rest/src/test/java/org/opennms/web/rest/v2/SnmpConfigRestServiceIT.java

  Log Message:
  -----------
  NMS-20262: Make the JSON snmp-config download a faithful restore (#8816)

GET /snmp-config/download?format=json serialized SnmpConfig through its
getters, and those getters substitute a default when the backing field is
null (timeout and retry return 0, port 161, max-vars-per-pdu 10, and so
on). Every value a definition inherited from the top-level config was
therefore written out as an explicit one, and re-uploading the file
through POST /snmp-config/upload pinned each definition's timeout and
retry to 0 - agents that had been polling on the global 1800 ms timeout
were left with none. The XML pair was unaffected because JAXB binds to
the fields.

Serialize the download from the fields instead, dropping nulls, so the
file carries only what was actually configured. The upload path and the
other JSON endpoints keep the existing mapper.

Co-authored-by: Marshall Massengill <[email protected]>


  Commit: 25cd7ac0163d23134e1ba278cc362e963fb850e1
      https://github.com/OpenNMS/opennms/commit/25cd7ac0163d23134e1ba278cc362e963fb850e1
  Author: CI/CD System <[email protected]>
  Date:   2026-08-26 (Wed, 26 Aug 2026)

  Changed paths:
    M opennms-config/src/main/java/org/opennms/netmgt/config/EventTranslatorConfigFactory.java
    A opennms-config/src/test/java/org/opennms/netmgt/config/EventTranslatorConfigReloadTest.java
    M opennms-webapp-rest/src/main/java/org/opennms/web/rest/v2/SnmpConfigRestService.java
    M opennms-webapp-rest/src/test/java/org/opennms/web/rest/v2/SnmpConfigRestServiceIT.java

  Log Message:
  -----------
  Merge remote-tracking branch 'origin/foundation-2026' into release-36.x


Compare: https://github.com/OpenNMS/opennms/compare/4878ca79035d...25cd7ac0163d

To unsubscribe from these emails, change your notification settings at https://github.com/OpenNMS/opennms/settings/notifications


_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/wiki/index.php?page=MailingListFaq
opennms-cvs mailing list

To *unsubscribe* or change your subscription options, see the bottom of this page:
https://lists.sourceforge.net/lists/listinfo/opennms-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.