<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:DengXian;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"\@DengXian";
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hi Ovidiu<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I confirm the issue you raise for duplex. So I change rook deployment for duplex as this.<o:p></o:p></p>
<p class="MsoNormal"><o:p></o:p></p>
<p class="MsoNormal">1, duplex will use host network, ceph mon ip is controller floating ip<o:p></o:p></p>
<p class="MsoNormal">2, there is only one monitor pod on active controller<o:p></o:p></p>
<p class="MsoNormal">3, same as native ceph cluster, there is a drbd filesystem, named drbd-cephmon, to sync mon data on both controllers, mount to folder /var/lib/ceph/mon-a/data
<o:p></o:p></p>
<p class="MsoNormal">4, there is a cronjob, periodic check these is host offline or lock. If host offline and mon pod deployed on that host, delete mon deployment and rook-ceph operator will make mon deployment again on the other controller<o:p></o:p></p>
<p class="MsoNormal" style="text-indent:10.2pt"># because when rook-operator launch mon deployment, it nodeselector for this deployment will bind to this host. So must delete this mon deployment to make operator reschedule the mon deployment to the other controller<o:p></o:p></p>
<p class="MsoNormal" style="text-indent:10.2pt"># this is similar what sm do for native ceph<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">We could discuss tomorrow.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Task items for above design:<o:p></o:p></p>
<p class="MsoNormal">1, update sysinv to enable drbd ceph-mon for rook<o:p></o:p></p>
<p class="MsoNormal"> 1), add system storage-backend-add rook --confirmed<o:p></o:p></p>
<p class="MsoNormal"> 2), in cgtsclient add storage_rook.py<o:p></o:p></p>
<p class="MsoNormal"> 3), in sysinv-api, add storage_rook.py, will call sysinv-conductor update_rook_config<o:p></o:p></p>
<p class="MsoNormal"> 4), in sysinv-conductor update_rook_config, <o:p></o:p></p>
<p class="MsoNormal"> if cutils.is_aio_duplex_system(self.dbapi):<o:p></o:p></p>
<p class="MsoNormal"> # On 2 node systems we have a floating Ceph monitor.<o:p></o:p></p>
<p class="MsoNormal"> classes.append('platform::drbd::cephmon::runtime')<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">2, update rook-app override<o:p></o:p></p>
<p class="MsoNormal"> for duplex, use hostnetwork, mon: 1.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">3, add a pre install job in rook-ceph helm chart<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> # controller-1 is active controller<o:p></o:p></p>
<p class="MsoNormal"> # 192.188.204.2 is floating ip<o:p></o:p></p>
<p class="MsoNormal"> # rook-operator will read this configmap and the only monitor pod, mon-a will deployed on active controller,<o:p></o:p></p>
<p class="MsoNormal"> export ROOK_EXTERNAL_CEPH_MON_DATA=a=192.188.204.2:6789<o:p></o:p></p>
<p class="MsoNormal"> export ROOK_EXTERNAL_MAX_MON_ID=0<o:p></o:p></p>
<p class="MsoNormal"> export ROOK_EXTERNAL_MAPPING='{"node":{"a":{"Name":"controller-1","Hostname":"controller-1","Address":"192.188.204.2"}}}'<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> kubectl -n kube-system create configmap rook-ceph-mon-endpoints \<o:p></o:p></p>
<p class="MsoNormal"> --from-literal=data="$ROOK_EXTERNAL_CEPH_MON_DATA" \<o:p></o:p></p>
<p class="MsoNormal"> --from-literal=mapping=”$ROOK_EXTERNAL_MAPPING” \<o:p></o:p></p>
<p class="MsoNormal"> --from-literal=maxMonId="$ROOK_EXTERNAL_MAX_MON_ID"<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">4, add a cron job in rook-ceph-provision helm chart<o:p></o:p></p>
<p class="MsoNormal"> If any host down, and mon-a pod deployed on that host(at this time, mon-a pod is terminating and pending)
<o:p></o:p></p>
<p class="MsoNormal"> a), delete mon-a pod and mon-a deployment.<o:p></o:p></p>
<p class="MsoNormal"> b), update confimap rook-ceph-mon-endpoints, field mapping.<o:p></o:p></p>
<p class="MsoNormal"> '{"node":{"a":{"Name":"controller-0","Hostname":"controller-0","Address":"192.188.204.2"}}}' # hostname change to active controller-0<o:p></o:p></p>
<p class="MsoNormal"> c), delete operator pod, wait operator pods will launch and recreate mon-a deployment<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">BR!<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Martin, Chen<o:p></o:p></p>
<p class="MsoNormal">IOTG, Software Engineer<o:p></o:p></p>
<p class="MsoNormal">021-61164330<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>