<div dir="ltr"><div dir="ltr">On Sat, May 23, 2020 at 8:37 PM John Fulton <<a href="mailto:johfulto@redhat.com">johfulto@redhat.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Update:<br>
<br>
The underlying Ansible to support derived parameters within a TripleO<br>
deployment has merged [1]. We now only need to call and write some new<br>
Ansible modules to do the derivation. Then we can merge the THT change<br>
[2] and this feature's migration from Mistral will be complete. Until<br>
then anyone who wants this feature needs to enable and use Mistral on<br>
the undercloud.<br>
<br></blockquote><div><br></div><div>I would have liked the feature to have been migrated completely (rather than placeholders)</div><div>before disabling mistral on the undercloud by default. If the NFV/HCI teams don't have any <br></div><div>issues with the current plan, then it's probably ok:)<br></div> </div><div class="gmail_quote">At Least we should document it somewhere so that it's not missed in upgrade.<br></div><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
For anyone who wants to write new Ansible modules for derived params,<br>
now that the merge is done, if you build an undercloud from TripleO<br>
master and deploy with -p with the new plan-environment [2], the<br>
derived_parameters will be in the deployment plan and whatever that<br>
parameter contains will be applied as usual. The merged [1] patch has<br>
a clear indication of where [3] to call the new modules.<br>
<br>
Molecule tests the feature and has mock data so Saravanan, Jaganathan,<br>
and I should be able to develop and test [4] the new modules. I've<br>
documented how I extracted the mock data from my real deployment<br>
(based on Kevin's example) and shrank them in a personal repos [5]<br>
just in case the NFV team finds that information useful for the NFV<br>
modules and need to bring in more mock data. I'm personally planning<br>
to start the HCI derive params Ansible module after the PTG.<br>
<br>
Let's keep this thread updated during the Victoria cycle so that we<br>
can get the feature completely migrated from Mistral.<br>
<br>
Thanks,<br>
John<br>
<br>
[1] <a href="https://review.opendev.org/#/c/719466" rel="noreferrer" target="_blank">https://review.opendev.org/#/c/719466</a><br>
[2] <a href="https://review.opendev.org/#/c/714217" rel="noreferrer" target="_blank">https://review.opendev.org/#/c/714217</a><br>
[3] <a href="https://opendev.org/openstack/tripleo-ansible/src/commit/f99dea3b508f345e96a0e27e0250523e826eadbb/tripleo_ansible/roles/tripleo_derived_parameters/tasks/main.yml#L237" rel="noreferrer" target="_blank">https://opendev.org/openstack/tripleo-ansible/src/commit/f99dea3b508f345e96a0e27e0250523e826eadbb/tripleo_ansible/roles/tripleo_derived_parameters/tasks/main.yml#L237</a><br>
[4] cd tripleo-ansible; ./scripts/run-local-test tripleo_derived_param<br>
[5] <a href="https://github.com/fultonj/ussuri/tree/master/derive/data" rel="noreferrer" target="_blank">https://github.com/fultonj/ussuri/tree/master/derive/data</a> (I think<br>
a personal repos is sufficient but let me know if you want me to put<br>
it in the actual project; seems too ad hoc for TripleO itself to me)<br>
<br>
On Tue, Apr 28, 2020 at 8:10 PM John Fulton <<a href="mailto:johfulto@redhat.com" target="_blank">johfulto@redhat.com</a>> wrote:<br>
><br>
> On Fri, Mar 20, 2020 at 6:07 PM John Fulton <<a href="mailto:johfulto@redhat.com" target="_blank">johfulto@redhat.com</a>> wrote:<br>
> ><br>
> > On Thu, Mar 19, 2020 at 5:37 AM Saravanan KR <<a href="mailto:skramaja@redhat.com" target="_blank">skramaja@redhat.com</a>> wrote:<br>
> > ><br>
> > > On Thu, Mar 19, 2020 at 1:02 AM John Fulton <<a href="mailto:johfulto@redhat.com" target="_blank">johfulto@redhat.com</a>> wrote:<br>
> > > ><br>
> > > > On Sat, Mar 14, 2020 at 8:06 AM Rabi Mishra <<a href="mailto:ramishra@redhat.com" target="_blank">ramishra@redhat.com</a>> wrote:<br>
> > > > ><br>
> > > > > On Sat, Mar 14, 2020 at 2:10 AM John Fulton <<a href="mailto:johfulto@redhat.com" target="_blank">johfulto@redhat.com</a>> wrote:<br>
> > > > >><br>
> > > > >> On Fri, Mar 13, 2020 at 3:27 PM Kevin Carter <<a href="mailto:kecarter@redhat.com" target="_blank">kecarter@redhat.com</a>> wrote:<br>
> > > > >> ><br>
> > > > >> > Hello stackers,<br>
> > > > >> ><br>
> > > > >> > In the pursuit to remove Mistral from the TripleO undercloud, we've discovered an old capability that we need to figure out how best to handle. Currently, we provide the ability for an end-user (operator / deployer) to pass in "N" Mistral workflows as part of a given deployment plan which is processed by python-tripleoclient at runtime [0][1]. From what we have documented, and what we can find within the code-base, we're not using this feature by default. That said, we do not remove something if it is valuable in the field without an adequate replacement. The ability to run arbitrary Mistral workflows at deployment time was first created in 2017 [2] and while present all this time, its documented [3] and intra-code-base uses are still limited to samples [4].<br>
> > > > >><br>
> > > > >> As it stands now, we're on track to making Mistral inert this cycle and if our progress holds over the next couple of weeks the capability to run arbitrary Mistral workflows will be the only thing left within our codebase that relies on Mistral running on the Undercloud.<br>
> > > > >><br>
> > > > >> ><br>
> > > > >> > So the question is what do we do with functionality. Do we remove this ability out right, do we convert the example workflow [5] into a stand-alone Ansible playbook and change the workflow runner to an arbitrary playbook runner, or do we simply leave everything as-is and deprecate it to be removed within the next two releases?<br>
> > > > ><br>
> > > > ><br>
> > > > > Yeah, as John mentioned, tripleo.derive_params.v1.derive_parameters workflow is surely being used for NFV (DPDK/SR-IOV) and HCI use cases and can't be deprecated or dropped. Though we've a generic interface in tripleoclient to run any workflow in plan-environment, I have not seen it being used for anything other than the mentioned workflow.<br>
> > > > ><br>
> > > > > In the scope of 'mistral-ansible' work, we seem to have two options.<br>
> > > > ><br>
> > > > > 1. Convert the workflow to ansible playbook 'as-is' i.e calculate and merge the derived parameters in plan-environment and as you've mentioned, change tripleoclient code to call any playbook in plan-environment.yaml and the parameters/vars.<br>
> > > ><br>
> > > > Nice idea. I hadn't thought of that.<br>
> > > ><br>
> > > > If there's a "hello world" example of this (which results in a THT<br>
> > > > param in the deployment plan being set to "hello world"), then I could<br>
> > > > try writing an ansible module to derive the HCI parameters and set<br>
> > > > them in place of the "hello world".<br>
> > > ><br>
> > > I am fine with the approach, but the only concern is, we have plans to<br>
> > > remove Heat in the coming cycles. One of inputs for the Mistral derive<br>
> > > parameters is fetched from the heat stack. If we are going to retain<br>
> > > it, then it has to be re-worked during the Heat removal. Mistral to<br>
> > > ansible could be the first step towards it.<br>
> ><br>
> > Hey Saravanan,<br>
> ><br>
> > That works for me. I'm glad we were able to come up with a way to do this.<br>
> ><br>
> > Kevin put some patches together today that will help a lot on this.<br>
> ><br>
> > 1. tht: <a href="https://review.opendev.org/#/c/714217/" rel="noreferrer" target="_blank">https://review.opendev.org/#/c/714217/</a><br>
> > 2. tripleo-ansible: <a href="https://review.opendev.org/#/c/714232/" rel="noreferrer" target="_blank">https://review.opendev.org/#/c/714232/</a><br>
> > 3. trilpeoclient: <a href="https://review.opendev.org/#/c/714198/" rel="noreferrer" target="_blank">https://review.opendev.org/#/c/714198/</a><br>
> ><br>
> > If I put these on my undercloud, then I think I can run:<br>
> ><br>
> > 'openstack overcloud deploy ... -p plan-environment-derived-params.yaml'<br>
> ><br>
> > as usual and then the updated tripleoclient and tht patch should<br>
> > trigger the new tripleo-ansible playbook in place of the Mistral<br>
> > workbook.<br>
> ><br>
> > I think I can then just update that tripleo-ansible patch to have it<br>
> > include a new derive_params_hci role and add a new derive_params_hci<br>
> > module where I'll stick code from the original Python prototype I did<br>
> > for it. I'll probably just shell to `openstack baremetal introspection<br>
> > data save ID` from ansible to get the Ironic data. I'll give it a try<br>
> > next week and update this thread. Even if Heat is not in the flow, at<br>
> > least the Ansible role and module can be reused.<br>
> ><br>
> > Note that it uses the new tripleo_plan_parameters_update module that<br>
> > Rabi wrote so that should make it easier to deal with the deployment<br>
> > plan itself (<a href="https://review.opendev.org/712604" rel="noreferrer" target="_blank">https://review.opendev.org/712604</a>).<br>
><br>
> Kevin and Rabi have made a lot of progress and with their unmerged<br>
> patches [1] 'openstack overcloud deploy -p<br>
> plan-environment-derived-params.yaml' has Ansible is running a<br>
> playbook [2] with place holders for us to use derive params which<br>
> looks like it will push the changes back to the deployment plan as<br>
> discussed above.<br>
><br>
> As far as I can tell 'openstack overcloud deploy -p<br>
> plan-environment-derived-params.yaml' from master won't work the old<br>
> way as Mistral isn't in the picture anymore when 'openstack overcloud<br>
> deploy -p' is run (someone please correct me if I'm wrong). Thus,<br>
> derive params are not going to work with the U release unless we<br>
> finish the above. I don't think we should undo the progress. We're now<br>
> in the RC so time is short. As long as we still ship the Mistral<br>
> container on the undercloud in U, a deployer could have it derive the<br>
> params in theory if the workbook is run manually and the resultant<br>
> params are applied as overrides. Do we GA with that as a known issue<br>
> with workaround and then circle back to fix the above and backport it?<br>
> I don't think we should delay the release for it. I think we should<br>
> instead push harder on getting the playbook and roles that Kevin<br>
> started [2] (they could still land in U).<br>
><br>
> John<br>
><br>
> [1] <a href="https://review.opendev.org/#/q/topic:mistral_to_ansible+(status:open+OR+status:merged)" rel="noreferrer" target="_blank">https://review.opendev.org/#/q/topic:mistral_to_ansible+(status:open+OR+status:merged)</a><br>
> [2] <a href="https://review.opendev.org/#/c/719466/13/tripleo_ansible/roles/tripleo_derived_parameters/tasks/main.yml@170" rel="noreferrer" target="_blank">https://review.opendev.org/#/c/719466/13/tripleo_ansible/roles/tripleo_derived_parameters/tasks/main.yml@170</a><br>
><br>
> ><br>
> > John<br>
> ><br>
> > > Regards,<br>
> > > Saravanan KR<br>
> > ><br>
> > > > John<br>
> > > ><br>
> > > > > 2. Move the functionality further down the component chain in TripleO to have the required ansible host/group_vars set for them to be used by config-download playbooks/ansible/puppet.<br>
> > > > ><br>
> > > > > I guess option 1 would be easier within the timelines. I've done some preliminary work to move some of the functionality in relevant mistral actions to utils modules[1], so that they can be called from ansible modules without depending on mistral/mistral-lib and use those in a playbook that kinda replicate the tasks in the mistral workflow.<br>
> > > > ><br>
> > > > > Having said that, it would be good to know what the DFG:NFV folks think, as they are the original authors/maintainers of that workflow.<br>
> > > > ><br>
> > > > > <snip><br>
> > > > ><br>
> > > > >> The Mistral based workflow took advantage of the deployment plan which<br>
> > > > >> was stored in Swift on the undercloud. My understanding is that too is<br>
> > > > >> going away.<br>
> > > > ><br>
> > > > ><br>
> > > > > I'm not sure that would be in the scope of 'mstral-to-ansible' work. Dropping swift would probably be a bit more complex, as we use it to store templates, plan-environment, plan backups (possibly missing few more) etc and would require significant design rework (may be possible when we get rid of heat in undercloud). In spite of heat using the templates from swift and merging environments on the client side, we've had already bumped heat's REST API json body size limit (max_json_body_size) on the undercloud to 4MB[2] from the default 1MB and sending all required templates as part of API request would not be a good idea from undercloud scalability pov.<br>
> > > > ><br>
> > > > > [1] <a href="https://review.opendev.org/#/c/709546/" rel="noreferrer" target="_blank">https://review.opendev.org/#/c/709546/</a><br>
> > > > > [2] <a href="https://github.com/openstack/tripleo-heat-templates/blob/master/environments/undercloud.yaml#L109" rel="noreferrer" target="_blank">https://github.com/openstack/tripleo-heat-templates/blob/master/environments/undercloud.yaml#L109</a><br>
> > > > ><br>
> > > > > --<br>
> > > > > Regards,<br>
> > > > > Rabi Mishra<br>
> > > > ><br>
> > > ><br>
> > ><br>
<br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Regards,</div>Rabi Mishra<div><br></div></div></div></div></div></div>