Task #3934
closedAdd more logging messages to NLSR
100%
Description
The primary tool for diagnosing problems on the testbed right now are nlsr.log files. As such, they need to contain as much information about NLSR's actions as is practical.
The dark spot that prompted this is in the LSA pipeline: NLSR logs that it received the LSA interest, but does not log any of its following actions, including if it even sent the reply. This in particular makes debugging prefix issues hard.
Updated by Damian Coomes over 7 years ago
Nick, below are some suggested additions. Did you have any source code files in particular you wanted me to look at? I found interests being scheduled, sent, and received, but did not find the reply you were referencing.
nlsr.cpp
- (lines 308 and 313) should log certificate retrieval failures
lsdb.cpp
- (line 197) lsdb::installNameLsa
- * (Line 260) removes names not being advertised anymore; not sure where the method is to check if debug message is located there. Only see (line 307) removeNameLSA() not (line 269) removeName() which is pointed to by ChkName
- (line 108) lsdb::afterFetchLsa()
- * Maybe mention something in first else if block about the seqNo being updated
- (line 575) scheduleAdjLsaBuild()
- * (Line 580) doesn’t say anything when an adjLsa is not built due to Hyperbolic state
- (Line 845, 888, 941) edit debug: “form” to “from”. It looks like a typo.
hello-protocol.cpp
- (line 53) sendScheduledInterest()
- * Log that it is now sending the scheduled interest
- * Display what interest is being sent. It’s located in the if block.
- (line 89) processInterest()
- * (line 95) needs to log that the interestName is not an INFO_COMPONENT
- * Also maybe we should add logs showing a neighbor has become active again or a new one has been created. Should we place at the end of this method (line 131) or at the end of registerPrefixes() (line 128)?
- (line 134) processInterestTimedOut()
- * Needs to show that a neighbor has become inactive
Updated by Nicholas Gordon over 7 years ago
Those are fine suggestions. You should look particularly at Lsdb::putLsaData and the its callers and callees. You can make this a little easier by doing this:
- Install doxygen (via package manager, whatever)
- Edit docs/doxygen.conf and change
EXTRACT_PRIVATE = NO
toEXTRACT_PRIVATE = YES
(I have it on line 405) - Issue
./waf configure
and then./waf doxygen
- Open
build/docs/doxygen/index.html
in your web browser, and browse the API there. That will give you a better caller/callee graph.
Note: You can reach this documentation at http://named-data.net/doc/NLSR/current/doxygen/annotated.html also, but that link doesn't extract private methods. You want this because it gives you a better map of the code structure.
Updated by Damian Coomes over 7 years ago
- Status changed from New to Code review
Updated by Damian Coomes over 7 years ago
- Status changed from Code review to Closed
- % Done changed from 90 to 100