Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
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
5
Merge Requests
5
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
slapos
Commits
a2103257
Commit
a2103257
authored
Jul 17, 2013
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make server_check_path optional in haproxy recipe.
parent
c80a0c9a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
slapos/recipe/haproxy/__init__.py
slapos/recipe/haproxy/__init__.py
+6
-2
slapos/recipe/haproxy/template/haproxy-listen-snippet.cfg.in
slapos/recipe/haproxy/template/haproxy-listen-snippet.cfg.in
+1
-1
No files found.
slapos/recipe/haproxy/__init__.py
View file @
a2103257
...
@@ -87,7 +87,11 @@ class Recipe(GenericBaseRecipe):
...
@@ -87,7 +87,11 @@ class Recipe(GenericBaseRecipe):
'haproxy-listen-snippet.cfg.in'
)
'haproxy-listen-snippet.cfg.in'
)
server_snippet
=
""
server_snippet
=
""
ip
=
self
.
options
[
'ip'
]
ip
=
self
.
options
[
'ip'
]
server_check_path
=
self
.
options
[
'server-check-path'
]
server_check_path
=
self
.
options
.
get
(
'server-check-path'
,
None
)
if
server_check_path
:
httpchk
=
'option httpchk GET %s'
%
server_check_path
else
:
httpchk
=
''
# FIXME: maxconn must be provided per-backend, not globally
# FIXME: maxconn must be provided per-backend, not globally
maxconn
=
self
.
options
[
'maxconn'
]
maxconn
=
self
.
options
[
'maxconn'
]
i
=
0
i
=
0
...
@@ -97,7 +101,7 @@ class Recipe(GenericBaseRecipe):
...
@@ -97,7 +101,7 @@ class Recipe(GenericBaseRecipe):
'name'
:
name
,
'name'
:
name
,
'ip'
:
ip
,
'ip'
:
ip
,
'port'
:
port
,
'port'
:
port
,
'
server_check_path'
:
server_check_path
,
'
httpchk'
:
httpchk
,
})
})
for
address
in
backend_list
:
for
address
in
backend_list
:
i
+=
1
i
+=
1
...
...
slapos/recipe/haproxy/template/haproxy-listen-snippet.cfg.in
View file @
a2103257
listen %(name)s %(ip)s:%(port)s
listen %(name)s %(ip)s:%(port)s
cookie SERVERID insert
cookie SERVERID insert
balance roundrobin
balance roundrobin
option httpchk GET %(server_check_path
)s
%(httpchk
)s
stats uri /haproxy
stats uri /haproxy
stats realm Global\ statistics
stats realm Global\ statistics
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