cartwrightian / cfnassist

cloud formation helper tool
Apache License 2.0
20 stars 3 forks source link

nullpointer when diagramming a blackhole #8

Open kief opened 9 years ago

kief commented 9 years ago

When running the 'diagram' command on a VPC that includes a route table whose state is 'blackhole', a NullPointerException is thrown.

16:54:24.957 [main] DEBUG tw.com.pictures.VPCVisitor - visit routetable rtb-60a97c05 Exception in thread "main" java.lang.NullPointerException at tw.com.pictures.VPCDiagramBuilder.addRoute(VPCDiagramBuilder.java:192) at tw.com.pictures.VPCVisitor.visitRouteTable(VPCVisitor.java:217) at tw.com.pictures.VPCVisitor.visit(VPCVisitor.java:51) at tw.com.pictures.DiagramCreator.createDiagrams(DiagramCreator.java:26) at tw.com.commandline.CreateDiagramAction.invoke(CreateDiagramAction.java:38) at tw.com.commandline.Main.parse(Main.java:97) at tw.com.commandline.Main.parse(Main.java:57) at tw.com.commandline.Main.main(Main.java:51)

cartwrightian commented 9 years ago

Thanks for raising this. Wondering - how should this be represented on the diagram, I've not run across this case before. In effect it is highlighting a mistake in the routing table, or that a resource has gone away?

kief commented 9 years ago

It's not something I have strong knowledge of, although it's a condition we have in our infrastructure at the moment.

I've found AWS documentation that says: "The blackhole state indicates that the route's target isn't available (for example, the specified gateway isn't attached to the VPC, the specified NAT instance has been terminated, and so on".

So I imagine that the route will usually have been working when it was set up, but is no longer working due to a change, as opposed to something you could set up with a blackhole status to start with.

On Tue, Jan 20, 2015 at 8:39 PM, Ian Cartwright notifications@github.com wrote:

Thanks for raising this. Wondering - how should this be represented on the diagram, I've not run across this case before. In effect it is highlighting a mistake in the routing table, or that a resource has gone away?

— Reply to this email directly or view it on GitHub https://github.com/cartwrightian/cfnassist/issues/8#issuecomment-70718165 .

cartwrightian commented 9 years ago

ok, thanks. I'll look at displaying it in a way that makes it clear some attention might be needed.