Ceph : Issueshttps://tracker.ceph.com/https://tracker.ceph.com/favicon.ico2020-10-06T09:57:38ZCeph
Redmine Dashboard - Bug #47763 (New): mgr/dashboard: simplify Dashboard HAProxyhttps://tracker.ceph.com/issues/477632020-10-06T09:57:38ZErnesto Puerta
Contribution from RH OpenStack team (kudos to Francesco Pantano, <code>fpantano</code>) when configuring HAProxy with Ceph-Dashboard:
<ul>
<li>The <code>error</code> <code>standby behaviour</code> is not needed: the regular <code>redirect</code> works enough if properly configured: <code>http-check expect rstatus 2[0-9][0-9]</code></li>
<li><code>HEAD</code> method works better that <code>GET</code> (it does not involve payload transmited back to HAProxy).</li>
</ul>
<p>So we could replace the provided <code>haproxy.cfg</code> sample:<br /><pre>
listen ceph_dashboard
bind <ip>:<post> transparent ssl crt <cert_pem>
mode http
balance source
http-check expect rstatus 2[0-9][0-9]
http-request set-header X-Forwarded-Proto https if { ssl_fc }
http-request set-header X-Forwarded-Proto http if !{ ssl_fc }
http-request set-header X-Forwarded-Port %[dst_port]
option httpchk HEAD /
server <name_1> <ip_1>:<port> check fall 5 inter 2000 rise 2 ssl check verify none verifyhost <name_1>
server <name_2> <ip_2>:<port> check fall 5 inter 2000 rise 2 ssl check verify none verifyhost <name_2>
...
server <name_N> <ip_N>:<port> check fall 5 inter 2000 rise 2 ssl check verify none verifyhost <name_N>
</pre></p>
<p>A suggestion would be to update <a href="https://docs.ceph.com/en/latest/mgr/dashboard/#haproxy-example-configuration" class="external">docs on HAProxy integration</a>.</p>