The c++ discovery client periodically calls ConnectionState::Update() with ConnectionStatus::UP on publish success.
ConnectionState::Update() should check for any change in the connection state before sending the NodeStatusUVE:process_status to avoid sending the duplicate information periodically.
In python, ConnectionState.update() checks for any connection state change before sending the NodeStatusUVE.
root@nodec39:~# contrail-logs --object-type analytics-node --object-id nodec39 --module contrail-collector --message-type NodeStatusUVE --last 15s
2016 Feb 18 01:04:00.523896 nodec39 [:contrail-collector:] : NodeStatusUVE: [NodeStatus: name = nodec39, [process_status: [module_id = contrail-collector, instance_id = 0, state = Functional, [connection_infos: [type = Collector, name = , [server_addrs: 127.0.0.1:8086], status = Up, description = Established] [type = Database, name = nodec39:Global, [server_addrs: 10.204.217.25:9042], status = Up, description = ] [type = Discovery, name = Collector, [server_addrs: 10.204.217.24:5998], status = Up, description = Publish Response - HeartBeat] [type = Redis-UVE, name = From, [server_addrs: 127.0.0.1:6379], status = Up, description = ] [type = Redis-UVE, name = To, [server_addrs: 127.0.0.1:6379], status = Up, description = ]], description = ]]]
2016 Feb 18 01:04:05.527109 nodec39 [:contrail-collector:] : NodeStatusUVE: [NodeStatus: name = nodec39, [process_status: [module_id = contrail-collector, instance_id = 0, state = Functional, [connection_infos: [type = Collector, name = , [server_addrs: 127.0.0.1:8086], status = Up, description = Established] [type = Database, name = nodec39:Global, [server_addrs: 10.204.217.25:9042], status = Up, description = ] [type = Discovery, name = Collector, [server_addrs: 10.204.217.24:5998], status = Up, description = Publish Response - HeartBeat] [type = Redis-UVE, name = From, [server_addrs: 127.0.0.1:6379], status = Up, description = ] [type = Redis-UVE, name = To, [server_addrs: 127.0.0.1:6379], status = Up, description = ]], description = ]]]
2016 Feb 18 01:04:10.534748 nodec39 [:contrail-collector:] : NodeStatusUVE: [NodeStatus: name = nodec39, [process_status: [module_id = contrail-collector, instance_id = 0, state = Functional, [connection_infos: [type = Collector, name = , [server_addrs: 127.0.0.1:8086], status = Up, description = Established] [type = Database, name = nodec39:Global, [server_addrs: 10.204.217.25:9042], status = Up, description = ] [type = Discovery, name = Collector, [server_addrs: 10.204.217.24:5998], status = Up, description = Publish Response - HeartBeat] [type = Redis-UVE, name = From, [server_addrs: 127.0.0.1:6379], status = Up, description = ] [type = Redis-UVE, name = To, [server_addrs: 127.0.0.1:6379], status = Up, description = ]], description = ]]]
root@nodec39:~# contrail-logs --object-type control-node --object-id nodec39 --module contrail-control --message-type NodeStatusUVE --last 10s
2016 Feb 18 01:04:55.600499 nodec39 [:contrail-control:] : NodeStatusUVE: [NodeStatus: name = nodec39, [process_status: [module_id = contrail-control, instance_id = 0, state = Functional, [connection_infos: [type = IFMap, name = IFMapServer, [server_addrs: 10.204.217.25:8443], status = Up, description = Connection with IFMap Server (irond)] [type = Collector, name = , [server_addrs: 10.204.217.24:8086], status = Up, description = Established] [type = Discovery, name = Collector, [server_addrs: 10.204.217.24:5998], status = Up, description = SubscribeResponse] [type = Discovery, name = IfmapServer, [server_addrs: 10.204.217.24:5998], status = Up, description = SubscribeResponse] [type = Discovery, name = xmpp-server, [server_addrs: 10.204.217.24:5998], status = Up, description = Publish Response - HeartBeat]], description = ]]]
2016 Feb 18 01:05:00.609936 nodec39 [:contrail-control:] : NodeStatusUVE: [NodeStatus: name = nodec39, [process_status: [module_id = contrail-control, instance_id = 0, state = Functional, [connection_infos: [type = IFMap, name = IFMapServer, [server_addrs: 10.204.217.25:8443], status = Up, description = Connection with IFMap Server (irond)] [type = Collector, name = , [server_addrs: 10.204.217.24:8086], status = Up, description = Established] [type = Discovery, name = Collector, [server_addrs: 10.204.217.24:5998], status = Up, description = SubscribeResponse] [type = Discovery, name = IfmapServer, [server_addrs: 10.204.217.24:5998], status = Up, description = SubscribeResponse] [type = Discovery, name = xmpp-server, [server_addrs: 10.204.217.24:5998], status = Up, description = Publish Response - HeartBeat]], description = ]]]
Review in progress for https:/ /review. opencontrail. org/17395
Submitter: Sundaresan Rajangam (<email address hidden>)