infochimps-labs/ironfan — pull request #175 by nickmarden (2012-09-29 18:32:30+00:00)
Title: Correct merging of cluster and facet objects, with specs (fixes #158)

This patch fixes the incorrect merging of the clouds collection, which was at the root of #158.

The basic idea is that, Gorillib::Resolution extensions to allow for deep merging didn't actually dig far enough into the Gorillib internals to ensure that cluster.clouds and facet.clouds would merge correctly. Furthermore, a failure to deep_copy the underlay attributes at resolve-time was causing a corruption in the underlay (read: cluster) security group definitions which would, under certain circumstances, result in "correct behavior" insofar as the merge algorithm expectations were concerned.

This patch also moves much of the resolution and expansion of server information into the Ironfan.cluster call itself, to ensure that no downstream callers are responsible for calling things like cluster.resolve or cluster.expand_servers! in order to get a consistent view of a cluster.

Lastly, specs are added which assert some sane things about how multi-facet clusters should work, and proving that they now do.