[
https://bro-tracker.atlassian.net/browse/BIT-1489?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=23200#comment-23200
]
Justin Azoff commented on BIT-1489:
-----------------------------------
This looks pretty good, though it's a bit large. One thing I do notice, that
is even more apparent when looking at diffs, is what we need to use namedtuple
more. Lines like this:
{code}
cmds = [(node, postterminate, [node.type, node.cwd(), "crash"]) for node in
nodes]
{code}
are pretty hard to understand right now. We have the whole CmdResult thing
now, we should probably add a CmdRequest type namedtuple so that line could
look like
{code}
cmds = [CmdRequest(host=node, cmd=postterminate, args[node.type, node.cwd(),
"crash"]) for node in nodes]
{code}
though probably wrapped better.
also I see some other changes:
{code}
- for (n, status) in res:
- if not status:
- orig.add(n.name)
+ for r in res:
+ # if status is Fail, then add the node name
+ if not r[1]:
+ orig.add(r[0].name)
{code}
if 'res' was a list of namedtuples for ("node", "status", "output") that could
be
{code}
+ for r in res:
+ # if status is Fail, then add the node name
+ if not r.status:
+ orig.add(r.node.name)
{code}
> topic/dnthayer/ticket1396
> -------------------------
>
> Key: BIT-1489
> URL: https://bro-tracker.atlassian.net/browse/BIT-1489
> Project: Bro Issue Tracker
> Issue Type: Problem
> Components: BroControl
> Reporter: Daniel Thayer
> Assignee: Justin Azoff
> Fix For: 2.5
>
>
> Branch topic/dnthayer/ticket1396 in the broctl repo was originally intended
> to address BIT-1396 (logs disappearing on broctl restart). Most of the
> commits
> in this branch are aimed at making it easier to diagnose such problems
> in the future. The most user-visible changes are:
> 1) post-terminate will now send an email if it fails to archive any logs,
> 2) post-terminate will now re-try to archive logs that previously failed to
> be archived,
> 3) improvements to some error messages,
> 4) better sanity checking of config values,
> 5) significant improvements to the broctl README
--
This message was sent by Atlassian JIRA
(v7.1.0-OD-02-030#71001)
_______________________________________________
bro-dev mailing list
[email protected]
http://mailman.icsi.berkeley.edu/mailman/listinfo/bro-dev