Error after creating Notifications

I have successfully implemented notifications and subscribed to these notifications and everything works fine i.e. whenever a particular variable changes in the database all the subscribers get a notification. I have tested tested this feature using a third party Netconf Browser (MGsoft). I followed the example to implement the notifications.

After this when i do a “get” from the netconf CLI, even though i get everything there are errors in the log.

    root@orion:/# /opt/confd/bin/netconf-console --get
. /*got all data successfully*/
.
    root@orion:/# tail /var/log/messages     
    Jan  1 00:34:44 orion daemon.err confd[550]: devel-c no registration found for callpoint overheat/get_log_times of type=external
    Jan  1 00:34:44 orion daemon.crit confd[550]: - no registration found for callpoint overheat/get_log_times of type=external
    Jan  1 00:34:44 orion daemon.err confd[550]: devel-c no registration found for callpoint overheat/get_log_times of type=external
    Jan  1 00:34:44 orion daemon.crit confd[550]: - no registration found for callpoint overheat/get_log_times of type=external
    Jan  1 00:34:44 orion daemon.err confd[550]: devel-c no registration found for callpoint overheat/get_log_times of type=external
    Jan  1 00:34:44 orion daemon.crit confd[550]: - no registration found for callpoint overheat/get_log_times of type=external
    Jan  1 00:34:44 orion daemon.err confd[550]: devel-c no registration found for callpoint overheat/get_log_times of type=external
    Jan  1 00:34:46 orion daemon.info confd[550]: netconf id=15 close-session attrs: message-id="0"
    Jan  1 00:34:46 orion daemon.info confd[550]: netconf id=15 sending rpc-reply, attrs: message-id="0"
    Jan  1 00:34:46 orion daemon.info confd[550]: audit user: admin/0 Logged out ssh <local> user
    root@orion:/# 

overheat in the name of the notification stream i created. i did not add anything called “get_log_times”.
I do not see this error in the log when i add a xpath filter and then get each module individually.
for ex:
root@orion:~# /opt/confd/bin/netconf-console --get -x /system
root@orion:~# /opt/confd/bin/netconf-console --get -x /bridge

The error log is only seen when i do a get of the whole data model at once, and the behaviour is same even when i do the get operation from the netconf browser.

I would like to get some insight as to why this is happening.

What does your YANG model look like under /overheat?
If you do a

$ confd --check-callbacks

What does that say about your callpoint under /overheat ?

Overheat is not part of the yang model its only a name of a stream.

memset(&ncb, 0, sizeof(ncb));
ncb.fd = notifsock;
strcpy(ncb.streamname, "overheat");
ncb.cb_opaque = NULL;
   
if (confd_register_notification_stream(dctx, &ncb, &live_ctx) != CONFD_OK)
{
    confd_fatal("Couldn't register stream %s\n", ncb.streamname);
}

This notification is tied to the overheat stream and find below the elements related to the notification in the YANG model.

   notification temp-alarm {
    		leaf temperature-alarm {
    			type leafref {
    			path "/.../.../.../temperature-alarm";
        		}
        		 mandatory true;
    		}
    	}

    leaf temperature-alarm {
                    description 
                    "Alarm for temperature overheat";
                    type temperature-alarm;
                }
   
  typedef temperature-alarm {
        type enumeration {
            enum "normal";
            enum "too-high";
        }
        default normal;
    }

When registering your notification stream provider, did you set get_log_times = NULL? Assuming that you are not implementing your own external replay support.

From $CONFD_DIR/examples.confd/netconf_notifications/notifier_builtin_replay_store.c

    ncb.fd = workersock;
    ncb.get_log_times = NULL;
    ncb.replay = NULL;
    strcpy(ncb.streamname, "interface");
    ncb.cb_opaque = NULL;
    if (confd_register_notification_stream(dctx, &ncb, &live_ctx) != CONFD_OK) {
        confd_fatal("Couldn't register stream %s\n", ncb.streamname);
    }

I added ncb.get_log_times = NULL; now but i still get the same error in the log.

Your issue is likely that in confd.conf (the confd configuration file) you enabled replay support but did not enable the built in replay store. From the ConfD NETCONF notification example:

<notifications>
    <eventStreams>
      <stream>
        <name>interface</name>
        <description>Example notifications</description>
        <replaySupport>true</replaySupport>
        <builtinReplayStore>
Here you need to add: <enabled>true</enabled>
or you may want to disable replay support above
          <dir>./</dir>
          <maxSize>S1M</maxSize>
          <maxFiles>5</maxFiles>
        </builtinReplayStore>
      </stream>
    </eventStreams>
  </notifications>

Since you did not enable the built in replay store, but you enabled replay, ConfD expects that you registered the callback to handle the replay, e.g, the get_log_times callback.

1 Like