Repository navigation
feat(server): log channels held by several IOCs - #191
Conversation
2625a7e to
f9d5487
Compare
tynanford
left a comment
There was a problem hiding this comment.
This would be useful for debugging. If restarting a IOC causes the overlap, the only concern would be a bunch of warning log statements for a somewhat normal circumstance. Should those cases be log.info instead?
|
Good point - I'll drop the level to info as you suggest. |
A site cannot tell how often one channel name is reported by more than one IOC. Two IOCs can serve the same PV, or an IOC can be started twice. The recCeiver tracks which IOCs hold each channel but never reports the overlap. The recCeiver now logs one warning for each batch that adds names another IOC already holds. The line gives the IOC, the counts, and up to 10 names with the IOCs that hold them. Reccaster uploads in batches of up to 5000 records, so a large IOC can log several lines, each with the counts for its batch. Aliases count if `alias` is enabled. A restarted IOC gets a new `iocid`, because the `iocid` contains the TCP source port. The new connection overlaps the old one until the old disconnect is processed. A holder with the same host and IOC name is therefore counted separately, as an earlier connection of the same IOC. An IOC started twice on one host looks the same and is counted that way too.
f9d5487 to
69bba2e
Compare
|
|
Fixed. Note, however, that the default loglevel is WARN, so the restart line is not shown at all unless the level is lowered. An IOC started twice on the same host looks the same as a restart and is hidden the same way. |
|
ChannelFinder/ChannelFinderService#259 This is based on the discussions at the codeathon. |
|
@shroffk did you mean #259 should replace this one, or was it just FYI? My thinking is that this remains useful on its own. On by default, lists which IOCs hold each name, and now differentiates restarted IOC from different IOC. |
|
Let us just treat it as FYI. For our setup I don't need the recciever to do the checks when the same checks can be done by CF without moving all the channels back and forth over the network.
The current check has all the existing properties (hostname, iocname, iocid ,etc.. ) Is there additional information in recciever which is not there in CF? Anyway, we can merge this since I am not planning on using |
recCeiver holds and has info from both/all open connections while CF (currently?) only can see current vs new data/metadata, so recCeiver can - if we want it to - provide more info about the "duplicate(s)" and their sources. Side note on your log: iocName shows 62537 -> 60561, i.e. the port. If that is how iocName is set in that test, a same-name check in CF would count every restart as a different IOC. |
The open connections should map to pvStatus, if it is active then it indicates the IOC and a recciever have an open connection... when this connection is gone then the PV should be marked Unknown. So I am still not sure I understand what additional information is there in the recciever. If two IOC's are started with the same PV's then the validators should trigger the "duplicate" warnings. The env variable iocName on my test is not setup... I am sure the production setup will not have this problem |
|
My point was that you asked if recCeiver has information that CF does not, and I answered that yeah, it can hold several connections that all claim to publish the same PV name. Open connections don't map to pvStatus. pvStatus is one value per channel in CF, and CF only ever sees current and new for any of those channels. recCeiver sees all the connections. Side point, but "Unknown" for pvStatus is also really strange to me. If Inactive already means the connection is gone, then all Inactive can be considered Unknown and we're back to two states. |
Ah, I see now, you are right... the above would be true with a single recciever setup ( might not be as useful if you have multiple subnets/reccievers? ) |



It is not known how often one channel name is reported by more than one IOC at a site. This happens when two IOCs serve the same PV, or when an IOC is started twice. The RecCeiver already tracks which IOCs hold each channel, but it never reports the overlap.
Each batch that adds names another IOC already holds now logs one warning. Reccaster sends a large upload in batches of up to 5000 records, so one IOC can log several lines and the counts are per batch. The line gives the IOC, the counts, and up to 10 names with the IOCs that hold them. Aliases count when
aliasis enabled.The
iocidcontains the TCP source port, so a restarted IOC gets a newiocid. Until the old disconnect is processed, the new connection overlaps the old one. A holder with the same host and IOC name is therefore counted apart as an earlier connection of the same IOC. An IOC started twice on one host cannot be told apart from this.