Skip to content

Commit ada1306

Browse files
Merge remote-tracking branch 'origin/foundation-2024' into release-33.x
2 parents 0a0730d + 97c3a66 commit ada1306

File tree

4 files changed

+10
-15
lines changed

4 files changed

+10
-15
lines changed

docs/modules/operation/pages/deep-dive/device-config-backup/configuration.adoc

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,16 @@ ssh -p 8201 admin@localhost
2424
[source, karaf]
2525
----
2626
config:edit org.opennms.features.deviceconfig.tftp
27-
config:property-set port 10069 <1>
27+
config:property-set port 69 <1>
2828
config:update
2929
----
30-
<1> If you have set `CAP_NET_BIND_SERVICE` on the service unit, you can set the port to the TFTP default of `69` and skip the firewall port redirect steps below.
30+
<1> {page-component-title} ships with the `CAP_NET_BIND_SERVICE` capability set in the systemd service unit, in most cases you can set the port to the IANA-assigned default port `69` and skip the firewall port redirect steps below.
3131

3232
NOTE: Some devices (for example, Juniper) may allow TFTP upload on a non-default port.
33-
In these cases, you do not need to change the default port.
33+
In these cases, you may not need to change the default port.
3434

35-
The {page-component-title} core services run as an unprivileged user and cannot bind on port numbers lower than `1024` without escalated privileges.
36-
For this reason, the default port for the TFTP listener is set to `6969/udp` instead of the IANA-registered port number `69/udp`.
37-
The following example shows how to configure the local firewall daemon to forward port `69/udp` to `6969/udp`:
35+
{page-component-title} runs as a non-privileged user with the `CAP_NET_BIND_SERVICE` capability and can bind to IANA-registered TFTP port number `69/udp`.
36+
However, if you prefer the TFTP listener bind to the default non-privileged port `6969/udp` instead of port number `69/udp`, the following example shows how to configure the local firewall daemon to forward port `69/udp` to `6969/udp`:
3837

3938
[{tabs}]
4039
====

features/grpc/exporter/src/main/java/org/opennms/features/grpc/exporter/bsm/BsmInventoryExporter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public String getName() {
7777

7878
@Override
7979
public void onEvent(final IEvent event) {
80-
LOG.debug("Got inventory-event: {}", event);
80+
LOG.debug("Got BSM inventory-event with uei : {}", event.getUei());
8181

8282
switch (event.getUei()) {
8383
case EventConstants.NODE_GAINED_SERVICE_EVENT_UEI:

features/grpc/exporter/src/main/java/org/opennms/features/grpc/exporter/spog/InventoryExporter.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,16 +81,10 @@ public void onEvent(final IEvent event) {
8181
case EventConstants.NODE_GAINED_SERVICE_EVENT_UEI:
8282
case EventConstants.SERVICE_DELETED_EVENT_UEI:
8383
case EventConstants.INTERFACE_DELETED_EVENT_UEI:
84-
8584
if (event.getNodeid() == null) {
8685
return;
8786
}
88-
89-
final var node = this.nodeDao.get(event.getNodeid().intValue());
90-
if (node == null) {
91-
return;
92-
}
93-
this.inventoryService.sendAddNmsInventory(node);
87+
this.inventoryService.sendAddNmsInventory(event.getNodeid());
9488
break;
9589

9690
default:

features/grpc/exporter/src/main/java/org/opennms/features/grpc/exporter/spog/SpogInventoryService.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public void stop() {
8989
this.scheduler.shutdown();
9090
}
9191

92-
public void sendAddNmsInventory(OnmsNode node) {
92+
public void sendAddNmsInventory(Long nodeId) {
9393
if (!client.isEnabled()) {
9494
LOG.info("SPOG service disabled, not sending inventory updates");
9595
return;
@@ -99,7 +99,9 @@ public void sendAddNmsInventory(OnmsNode node) {
9999
LOG.info("SPOG Inventory Export disabled, not sending inventory updates");
100100
return;
101101
}
102+
final Long nodeIdToSend = nodeId;
102103
sessionUtils.withReadOnlyTransaction(() -> {
104+
final var node = this.nodeDao.get(nodeIdToSend.intValue());
103105
final var inventory = NmsInventoryMapper.INSTANCE.toInventoryUpdatesList(List.of(node),
104106
this.runtimeInfo, SystemInfoUtils.getInstanceId(), false);
105107
this.client.sendNmsInventoryUpdate(inventory);

0 commit comments

Comments
 (0)