Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kwabena Antwi-Boasiako
slapos
Commits
1b5d91f4
Commit
1b5d91f4
authored
Apr 12, 2013
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make haproxy instanciation fail when backend-dict is empty.
parent
5d4a9d23
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
slapos/recipe/haproxy/__init__.py
slapos/recipe/haproxy/__init__.py
+4
-0
No files found.
slapos/recipe/haproxy/__init__.py
View file @
1b5d91f4
...
...
@@ -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'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment