<html 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=utf-8">
<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:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:"Calibri",sans-serif;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1382941266;
        mso-list-type:hybrid;
        mso-list-template-ids:-1631829828 67698705 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-text:"%1\)";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style>
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hi Liang,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I took a look at this yesterday to understand what you are up against here.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Ideally we would want some combination of a system helm override/armada manifest change to automatically provision the Cinder image-volume cache when the stx-openstack application is installed. We do not want to use any platform specific
 interface changes (i.e. system backend-modify or a new API) since we want to decouple openstack k8s application dependencies from the general k8s platform provisioning.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Using the current content on master, here are the following steps required by an end user to enable this feature:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoPlainText"># Initial application install<o:p></o:p></p>
<p class="MsoPlainText">system application-apply stx-openstack<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"># After install, the feature requires a project/user to manage the cache<o:p></o:p></p>
<p class="MsoPlainText">openstack project create --enable --description "Block Storage Internal Tenant" cinder-internal<o:p></o:p></p>
<p class="MsoPlainText">openstack user create --project cinder-internal cinder-internal<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">TENANTID=$(openstack project list | awk /cinder-internal/'{print $2}')<o:p></o:p></p>
<p class="MsoPlainText">USERID=$(openstack user list | awk /cinder-internal/'{print $2}')<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"># The created project/user are needed in cinder.conf along with enabling the cache for the specific backend (we define ceph-store as part of the original application apply). Reapply the application to trigger the armada upgrade to cinder<o:p></o:p></p>
<p class="MsoPlainText">system helm-override-update cinder openstack --reuse-values --set conf.cinder.DEFAULT.cinder_internal_tenant_project_id=$TENANTID<o:p></o:p></p>
<p class="MsoPlainText">system helm-override-update cinder openstack --reuse-values --set conf.cinder.DEFAULT.cinder_internal_tenant_user_id=$USERID<o:p></o:p></p>
<p class="MsoPlainText">system helm-override-update cinder openstack --reuse-values --set conf.backends.ceph-store.image_volume_cache_enabled=true<o:p></o:p></p>
<p class="MsoPlainText">system helm-override-update cinder openstack --reuse-values --set conf.backends.ceph-store.image_volume_cache_max_size_gb=10<o:p></o:p></p>
<p class="MsoPlainText">system helm-override-update cinder openstack --reuse-values --set conf.backends.ceph-store.image_volume_cache_max_count=5<o:p></o:p></p>
<p class="MsoPlainText">system application-apply stx-openstack<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Now, back to the desired approach. The challenge here is we need a way to create a project/user as part of the initial application install and look up the UUIDs to embed in an override in a declarative manner.  I’m not sure this is possible
 in a single application apply.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<ol style="margin-top:0in" start="1" type="1">
<li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1">We could enable creating the project/user as part of the Cinder bootstrap script, but these would not be created/available at the time overrides are declared for cinder’s configuration<o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1">We could use an existing project/user (i.e. admin) and avoid creating a dedicated cinder project/user, but again on the initial application install they are not available at the time
 overrides are declared for cinder’s configuration<o:p></o:p></li></ol>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Looking across the charts and the helm-toolkit in the OSH projects, I have yet to see an easy way to accomplish this.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I think you should check with the OSH project cores to see if they have any suggestions on the best way to tackle this as part of the first install of the Cinder chart OR if a two pass approach is required (install then upgrade)
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Bob<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black">"Fang, Liang A" <liang.a.fang@intel.com><br>
<b>Date: </b>Wednesday, March 13, 2019 at 8:22 AM<br>
<b>To: </b>"Rowsell, Brent" <Brent.Rowsell@windriver.com><br>
<b>Cc: </b>Ovidiu Poncea <Ovidiu.Poncea@windriver.com>, "Zhu, Vivian" <vivian.zhu@intel.com>, "Jones, Bruce E" <bruce.e.jones@intel.com>, "starlingx-discuss@lists.starlingx.io" <starlingx-discuss@lists.starlingx.io><br>
<b>Subject: </b>[Starlingx-discuss] Code review of cinder raw cache in stx-config<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">Hi Brent<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Regarding the raw cache review:<o:p></o:p></p>
<p class="MsoNormal"><a href="https://review.openstack.org/#/c/633400/">https://review.openstack.org/#/c/633400/</a><o:p></o:p></p>
<p class="MsoNormal">Currently the code is implemented according the discussion before between Ovidiu and Lisa:
<a href="http://lists.starlingx.io/pipermail/starlingx-discuss/2019-January/002548.html">
http://lists.starlingx.io/pipermail/starlingx-discuss/2019-January/002548.html</a><o:p></o:p></p>
<p class="MsoNormal">The raw cache is configured via “system storage-backend-modify”. e.g.
<b>system storage-backend-modify ceph-store cinder_raw_cache_gib=10</b><o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Your opinion is to decouple openstack from the storage backend. Thanks for your comment.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">I take a look of system subcommand, there’s no subcommand for openstack currently, at this point “system storage-backend-modify” seems is the best choice. Should we add subcommand “openstack”?  Something like:
<b>system openstack cinder_raw_cache_gib=10</b> <o:p></o:p></p>
<p class="MsoNormal">Or should we config openstack in other way? Could you please give suggestion on this? Thank you very much<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Regards<o:p></o:p></p>
<p class="MsoNormal">Liang<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</body>
</html>