Metaswitch/sprout — pull request #236 by mike-evans (2013-09-26 18:30:23+00:00)
Title: [Reviewer Andy] Sprout crashes is cluster_settings file is malformed

Andy

Can you review please. As discussed, the issue is that when the cluster_settings file is malformed the memcached store ends up with no connections to the memcached cluster, so it does no iterations round the read or the write loops. Unfortunately I initialised the return code variable to MEMCACHED_SUCCESS so in this case the function assumes it has a valid result from memcached and crashes trying to parse it.

I've tested by reproducing the problem with a hand edited cluster_settings file, watching sprout die horribly when I run the live tests against it, then applying the fixed build and watching sprout fail all the tests but survive and log nice error messages about failing to read registration data.

Mike