Old notifications not viewable in CLI with subscription replay asked
Hello, Below, a simple scenario fully driven from CLI based on v2.0.35 During this scenario, no any error in NC Server logs.
- Call Home
- subscribe with replay => No notification reported as expected
- user rpc to trigger generation of a Notification
- Notification generated
- disconnect from CLI
- Call Home as in step 1)
- 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"/>
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.
Thanks for the celerity of your support, more over it works now with those advises above!