netopeer2 icon indicating copy to clipboard operation
netopeer2 copied to clipboard

Old notifications not viewable in CLI with subscription replay asked

Open robbynet opened this issue 3 years ago • 2 comments

Hello, Below, a simple scenario fully driven from CLI based on v2.0.35 During this scenario, no any error in NC Server logs.

  1. Call Home
  2. subscribe with replay => No notification reported as expected
  3. user rpc to trigger generation of a Notification
  4. Notification generated
  5. disconnect from CLI
  6. Call Home as in step 1)
  7. subscribe as in step 2) => No notification reported in CLI while expectation was to have displayed in CLI the notification generated in Step 4

=> Is it expected result that is wrong or it is a Netopeer2 issue ? Maybe usage of option --begin not well understood ?

== 1) ===
> listen --ssh --login netconf
Waiting 60s for an SSH Call Home connection on port 4334...
The authenticity of the host '::ffff:172.1.1.17' cannot be established.
ssh-rsa key fingerprint is 70:4b:f0:5c:25:e5:f1:6c:46:5f:5a:89:9b:17:05:bf:9f:a7:33:6d.
Are you sure you want to continue connecting (yes/no)? yes
netconf@::ffff:172.1.1.17 password:
Interactive SSH Authentication
Type your password:
Password:
>
>
> get --filter-xpath  /o-ran-fm:active-alarm-list
DATA
<data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"/>

== 2) ===
> subscribe --filter-xpath /o-ran-fm:alarm-notif --begin -10000
OK
>
notification (2022-01-06T14:00:36.418620469+00:00)
<replayComplete xmlns="urn:ietf:params:xml:ns:netmod:notification"/>

== 3) ===
> user-rpc --content /opt/dev/xml/backdoor/alarm/fm-test-1-alarm-fid_1.xml
DATA
<status xmlns="urn:o-ran-test:fm:1.0">OK</status>

== 4) ===
>
notification (2022-01-06T14:00:56.434339723+00:00)
<alarm-notif xmlns="urn:o-ran:fm:1.0">
  <fault-id>1</fault-id>
  <fault-source>Source 1</fault-source>
  <affected-objects>
    <name>Object 1</name>
  </affected-objects>
  <affected-objects>
    <name>Object 2</name>
  </affected-objects>
  <affected-objects>
    <name>Object 3</name>
  </affected-objects>
  <fault-severity>MINOR</fault-severity>
  <is-cleared>false</is-cleared>
  <fault-text>Fault caused by source 1 affecting 3 objects</fault-text>
  <event-time>2022-01-06T14:00:55+00:00</event-time>
</alarm-notif>

== 5 ) ===
> disconnect
== 6 ) ===
> listen --ssh --login netconf
Waiting 60s for an SSH Call Home connection on port 4334...
The authenticity of the host '::ffff:172.1.1.17' cannot be established.
ssh-rsa key fingerprint is 70:4b:f0:5c:25:e5:f1:6c:46:5f:5a:89:9b:17:05:bf:9f:a7:33:6d.
Are you sure you want to continue connecting (yes/no)? yes
netconf@::ffff:172.1.1.17 password:

== 7 ) ===
> subscribe --filter-xpath /o-ran-fm:alarm-notif --begin -10000
OK
>
notification (2022-01-06T14:01:21.885215051+00:00)
<replayComplete xmlns="urn:ietf:params:xml:ns:netmod:notification"/>



robbynet avatar Jan 06 '22 14:01 robbynet

Run sysrepoctl -l and find the module with namespace urn:o-ran:fm:1.0, it needs to have the R flag for it to store its notifications for replay, it is off by default. You can also learn that by NETCONF, find it in the nc-notifications module state data (/nc-notifications:netconf/streams/stream[name='<module-name>']/replaySupport). You can use sysrepoctl to enable replay support for modules.

michalvasko avatar Jan 06 '22 14:01 michalvasko

Thanks for the celerity of your support, more over it works now with those advises above!

robbynet avatar Jan 06 '22 14:01 robbynet