haproxy/haproxy.go's GetTemplateData method ignores errors retrieving data from marathon and zookeeper, and itself does not return errors. This means that consumers of the method (i.e. event_handler.go's handleHAPUpdate) still attempt to use the (bad) data returned by GetTemplateData. This ultimately results in the haproxy config template to be rendered with no services available.
GetTemplateData should propogate errors upwards, and handleHAPUpdate should not process the haproxy config template in the event that GetTemplateData returns an error.
This is easily reproducable by stopping all marathon instances in an environment and looking at the generated haproxy config file.
haproxy/haproxy.go's GetTemplateData method ignores errors retrieving data from marathon and zookeeper, and itself does not return errors. This means that consumers of the method (i.e. event_handler.go's handleHAPUpdate) still attempt to use the (bad) data returned by GetTemplateData. This ultimately results in the haproxy config template to be rendered with no services available.
GetTemplateData should propogate errors upwards, and handleHAPUpdate should not process the haproxy config template in the event that GetTemplateData returns an error.
This is easily reproducable by stopping all marathon instances in an environment and looking at the generated haproxy config file.