Skip to content
This repository has been archived by the owner on May 6, 2021. It is now read-only.

Commit

Permalink
Merge pull request #126 from Jahia/PAAS-1164
Browse files Browse the repository at this point in the history
Paas 1164 fix onAfterClone's haproxy behaviour
  • Loading branch information
laurentfufu authored Sep 1, 2020
2 parents 17750e9 + bc3a9e0 commit bf02002
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
12 changes: 6 additions & 6 deletions configs/haproxy-11-proc.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
backend proc
mode http
cookie JSESSIONID prefix nocache
option httpchk HEAD /cms/login HTTP/1.0
compression algo gzip
compression type text/plain text/css text/js text/xml text/javascript application/javascript application/json application/xml application/rss image/svg text/html
errorfile 503 /etc/haproxy/502.http
mode http
cookie JSESSIONID prefix nocache
option httpchk HEAD /cms/login HTTP/1.0
compression algo gzip
compression type text/plain text/css text/js text/xml text/javascript application/javascript application/json application/xml application/rss image/svg text/html
errorfile 503 /etc/haproxy/502.http
7 changes: 6 additions & 1 deletion onAfterClone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,12 @@ onInstall:
actions:
resetHaproxyBackends:
- cmd[bl]: |-
sed -ie "/$server.*:80 check cookie/d" /etc/haproxy/haproxy.cfg.d/10-jahia.cfg
sed -e "/$server.*:80 check cookie/d" \
-i /etc/haproxy/haproxy.cfg.d/{10-jahia,11-proc}.cfg
echo " server ${env.appid}-${nodes.proc.first.id} ${nodes.proc.first.intIP}:80 check cookie s${nodes.proc.first.id}" \
>> /etc/haproxy/haproxy.cfg.d/11-proc.cfg
sed -e 's/cook(JSESSIONID),lower -m beg s.*/cook(JSESSIONID),lower -m beg s${nodes.proc.first.id} }/' \
-i /etc/haproxy/haproxy.cfg.d/00-global.cfg
- forEach(nodes.cp):
cmd[${this}]: |-
echo " server ${env.appid}-${@i.id} ${@i.intIP}:80 check cookie s${@i.id}" >> /etc/haproxy/haproxy.cfg.d/10-jahia.cfg
Expand Down

0 comments on commit bf02002

Please sign in to comment.