ClusterHQ/flocker — pull request #922 by dwgebler (2014-10-17 15:16:01+00:00)
Title: Apply image changes 354

Fixes #353, #354 and #730 via the same code block. Currently has the code of PR #913 merged in, this PR would look a bit simpler if that branch was merged in to master, but review of #913 is still ongoing and this branch would've been blocked without those changes.

See my comment on #730: https://github.com/ClusterHQ/flocker/issues/730#issuecomment-58671211
in regards to deriving `Link` objects on `Application`s; all we have from `DockerClient` `Unit`s are environment variables, such as `POSTGRES_PORT_5432_TCP_PORT=50432` or something in that format. Therefore to apply changes to the `links` portion of an application configuration, the only way I can see to do it at the moment (assuming we're being selective about what gets restarted, which we currently are) is to do some pretty awful regex matching on those environment variables to extrapolate the original `Link`s. I'm not happy with this approach, but someone's going to have to give me a better idea if they want this to change.