Revision 502 – Obsessive Parser Retry

I’m not proud of this one. Please bear with be:

In revision 493, I wrote about how the parser for “–nickname=” actually pushes content to three separate parsers, and simply chooses the one with the best results. That was all about not trying to guess the content, but leave the guessing to the parsers. Whichever one gets the most, it wins. Too easy, and extremely scalable.

Problem is, the underlying Apache lib used to fork-off the incoming stream — to avoid downloading a file multiple times to parse it — that doesn’t always seem to work.

I put a lot of time and concern into trying to figure out why, but in the end, I just added a retry-counter.

When all parsers return a “shoot, I dunno” response, we simply run it again. And again. And again. …not so obsessive because we give up after 3 times, but you’re free to make it as psychotic/obsessive as you want.

To describe this, I verbosely wrote “add retries to the parsing so that we can thrash on a file if we need to just-get-it-done”

I promise to do better design in the future, but for now, this will only re-download a file for each full retry cycle. This doesn’t matter at all for file:// URLs, but for ftp://, bnapsql://, and http://, it will show up as multiple tries.

Revision 493 – Nickname Parses ZoneShow

For this revision, I wrote: “enable the –nickname= function to fork inbound content to a number of parsers; the one with the most results wins. Net result: the FAE or user needs not worry what they send to the tool, it will try to figure out what the file is. Supports user-selected columns in CSV, Brocade ZoneShow, and BNA”

What does that mean, in detail?

In past, the –nickname= fed directly into a single consumer that understand the user giving a “;WWN=x” or “;Nickname=y”, and uses those columns as input to nickname data.

Now, there are three parsers all feeding from the same resource, so even remote content (ie ftp:// and http:// URLs) is only downloaded once, but forked to many parsers. Without the user worrying about format, the three parsers try to interpret the stream to see what they can dig up. The “winning” parser is the one with the most results, effectively adapting to whatever the user sends it …of the three formats currently understood directly:

  • WWN,Nickname (WWN=x and Nickname=y are still effective)
  • Brocade zoneshow output (accuracy is challenged if the user sends a logdump of a screen-scraped output; for best results, treat the output as binary, and convert it directly using plink.exe or ssh, not a screen-capture of a log dump)
  • Brocade binary zone information from BNA versions 11 or 12

To re-iterate, the following URI types are understood:

  • http://www.example.com/file.ext
  • ftp://ftp.example.com/file.ext (anonymous FTP; have not tested user/pass)
  • file://current/directory/subdir/file.ext (same as .\current\directory\subdir\file.ext in windows)
  • file:///current/directory/subdir/file.ext (three slashes, same as \current\directory\subdir\file.ext in windows)
  • bnapsql://bna.example.com/
  • no URL: –nickname=sampleZone.zone (confirmed in testcases)

Revision 368 – Kerberos Config Helper

Due to frustration on people updating Kerberos config data without actually, well, being correct, I’ve added a helper to vict.jar: “Created a quick tool to dump out Kerberos config information in text and XML format to help reduce ambiguity in documented AD authentication via Kerberos”.

I hope this avoids further misguided dependence on Jambons who just cannot check a detail.

Try it out on your server:

java -jar vict.jar --kerberos

There’s an article (How to Enable Active Directory Authentication via Kerberos) describing the process of adding a Kerberos user, but this output accelerates the process.

Revision 365 – Inflight BNAPSQL Changes

Revision 365 improves the BNAPSQL Client to avoid null nicknames, and avoid quoting those nicknames that are already quoted.

This was performed live with a customer on the conference call; really great debugging experience.

As a reminder:

 java -jar vict.jar --nickname=bnapsql://user:pass@server:port/resource

where the default is:

 java -jar vict.jar
   --nickname=bnapsql://dcmadmin:passw0rd@localhost:5432/dcmdb

…and if you just want to spit the nicknames right back out from two servers:

java -jar vict.jar
--nickname=bnapsql://server1/
--nickname=bnapsql://server2/
--nicknameout=output.csv