Commit 1b5d91f4 authored by Vincent Pelletier's avatar Vincent Pelletier

Make haproxy instanciation fail when backend-dict is empty.

parent 5d4a9d23
......@@ -76,6 +76,10 @@ class Recipe(GenericBaseRecipe):
backend_dict = {
self.options['name']: (self.options['port'], backend_list),
}
if not backend_dict:
# Fail installation if backend_dict is empty, otherwise partition may be
# advertised as available although it provides no service.
raise Exception('backend-dict is empty')
server_snippet_filename = self.getTemplateFilename(
'haproxy-server-snippet.cfg.in')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment