<div dir="ltr">Hi,<br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 16, 2016 at 2:46 PM, Ian Cordasco <span dir="ltr"><<a href="mailto:sigmavirus24@gmail.com" target="_blank">sigmavirus24@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">-----Original Message-----<br>
From: Juvonen, Tomi (Nokia - FI/Espoo) <<a href="mailto:tomi.juvonen@nokia.com">tomi.juvonen@nokia.com</a>><br>
Reply: OpenStack Development Mailing List (not for usage questions)<br>
<<a href="mailto:openstack-dev@lists.openstack.org">openstack-dev@lists.<wbr>openstack.org</a>><br>
Date: November 11, 2016 at 02:27:19<br>
To: OpenStack Development Mailing List (not for usage questions)<br>
<<a href="mailto:openstack-dev@lists.openstack.org">openstack-dev@lists.<wbr>openstack.org</a>><br>
Subject: [openstack-dev] [Craton] NFV planned host maintenance<br>
<br>
> I have been looking in past two OpenStack summits to have changes needed to<br>
> fulfill OPNFV Doctor use case for planned host maintenance and at the same<br>
> time trying to find other Ops requirements to satisfy different needs. I was<br>
> just about to start a new project (Fenix), but looking Craton, it seems<br>
> a good alternative and was proposed to me in Barcelona meetup. Here is some<br>
> ideas and would like a comment wither Craton could be used here.<br>
<br>
</span>Hi Tomi,<br>
<br>
Thanks for your interest in craton! I'm replying in-line, but please<br>
come and join us in #craton on Freenode as well!<br>
<span class=""><br>
> OPNFV Doctor / NFV requirements are described here:<br>
> <a href="http://artifacts.opnfv.org/doctor/docs/requirements/02-use_cases.html#nvfi-maintenance" rel="noreferrer" target="_blank">http://artifacts.opnfv.org/<wbr>doctor/docs/requirements/02-<wbr>use_cases.html#nvfi-<wbr>maintenance</a><br>
> <a href="http://artifacts.opnfv.org/doctor/docs/requirements/03-architecture.html#nfvi-maintenance" rel="noreferrer" target="_blank">http://artifacts.opnfv.org/<wbr>doctor/docs/requirements/03-<wbr>architecture.html#nfvi-<wbr>maintenance</a><br>
> <a href="http://artifacts.opnfv.org/doctor/docs/requirements/05-implementation.html#nfvi-maintenance" rel="noreferrer" target="_blank">http://artifacts.opnfv.org/<wbr>doctor/docs/requirements/05-<wbr>implementation.html#nfvi-<wbr>maintenance</a><br>
><br>
> My rough thoughts about what would be initially needed (as short as I can):<br>
><br>
> - There should be a database of all hosts matching to what is known by Nova.<br>
<br>
</span>So I think this might be the first problem that you'll run into with Craton.<br>
<br>
Craton is designed to specifically manage the physical devices in a<br>
data centre. At the moment, it only considers the hosts that you'd run<br>
Nova on, not the Virtual Machines that Nova is managing on the Compute<br>
hosts.<br>
<br>
It's plausible that we could add the ability to track virtual<br>
machines, but Craton is meant to primarily work underneath the cloud.<br>
I think this might be changing since Craton is looking forward to<br>
helping manage a multi-cloud environment, so it's possible this won't<br>
be an issue for long.<br></blockquote><div><br></div><div>So I think there is 2 parts to this. 1. What Ian mentioned is that Craton currently does not keep inventory of VM running inside an openstack deployment. Nova (and Horizon for UI) is already doing this for the users. However, we do run jobs or workload on the VM .. like live migrating VM's from a host that might undergo maintenance, or a host monitoring flagged as bad etc. This is done using `plugins` that talk to nova etc. So I think some of what you are looking for falls into that perhaps ? This can be based on some notification the Craton engine receives from another application (like monitoring for example).</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class=""><br>
> - There should by an API for Cloud Admin to set planned maintenance window<br>
> for a host (maybe aggregate, group of hosts), when in maintenance and unset<br>
> when finished. There might be some optional parameters like target host<br>
> where to move things currently running on effected host. could also be<br>
> used for retirement of a host.<br>
<br>
</span>This sounds like it's part of the next phase of Craton development -<br>
the remediation workflows. I think Jim and Sulo are more suited<br>
towards talking to that though.<br>
<span class=""><br></span></blockquote><div><br></div><div>So we will be able to trigger a work/job (maintenance) based on 1. User defined schedule 2. Based on some notification that we receive from another application. Both user defined. Like Ian suggested, this is something we plan to do in the next phase.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
> - There should be project(tenant) and host specific notifications that could:<br>
<br>
</span>We are talking about an events/notifications system.<br>
<span class=""><br></span></blockquote><div> </div><div>+1. We are working on providing notification messages for all actions within the application.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
> - Trigger alarm in Aodh so Application would be aware of maintenance state<br>
> changes effecting to his servers, so zero downtime of application could<br>
> be guaranteed.<br>
<br>
</span>I'm not sure it should be Craton's responsibility to do this, but I<br>
expect the administrator could set alarm criteria based off of<br>
Craton's events stream.<br></blockquote><div><br></div><div>+1 We need to make sure that we dont try to be a monitoring solution. But like Ian said we can always look at using the notification system to do downstream processing.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class=""><br>
> - Notification could be consumed by workflow engine like Mistral, where<br>
> application server specific actions flows and admin action flows could<br>
> be performed (to move servers away, disable host,...).<br>
> - Host monitoring like Vitrage could consume notification to disable<br>
> alarms for host as of planned maintenance ongoing and not down by fault.<br></span></blockquote><div><br></div><div>I think its both ways, </div><div>some alarm triggered -> Craton -> Disable the monitoring. But also,</div><div>craton notification -> Some application consumes it -> does something else.</div><div><br></div><div>So the way I think of this is, Admin sets/schedules some work on a host -> Craton workflow will disable your monitoring (given monitoring solution allows such action) -> Start the maintenance work, once finished -> Start the monitoring again.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
> - There should be admin and project level API to query maintenance session<br>
> status.<br></span></blockquote><div><br></div><div>+1 We have API for all actions... and for all Inventory management as well.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
> - Workflow status should be queried or read as notification to keep internal<br>
> state and send further notification.<br>
> - Some more discussion also in "BCN-ops-informal-meetup" that goes beyond this:<br>
> <a href="https://etherpad.openstack.org/p/BCN-ops-informal-meetup" rel="noreferrer" target="_blank">https://etherpad.openstack.<wbr>org/p/BCN-ops-informal-meetup</a><br>
<br>
</span>These are all interesting ideas. Thank you!<br>
<span class=""><br>
> What else, details, problems:<br>
><br>
> There is a problem in flow engine actions. Depending on how long maintenance<br>
> would take or what type of server is running, application wants flows to behave<br>
> differently. Application specific flows could surely be done, but problem is<br>
> that they should make admin actions. It should be solved how application can<br>
> decide actions flows while only admin can run them. Should admin make<br>
> the flows and let application a power to choose by hint in nova metadata or<br>
> in notification going to flow engine.<br></span></blockquote><div><br></div><div>So the way Craton flow/workflow/job works is .. each job is a "plugin". Who can run this job is decided though RBAC(work in progress). We expect the plugin to have enough logic to decide what it wants to do. We can definitely set TTL for a running job. Given it was triggered by "admin" who has "admin actions" privilege on Nova you would be allowed to do so. </div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
><br>
> Started a discussion in Austin summit about extending the planned host<br>
> maintenance in Nova, but it was agreed there could just be a link to external<br>
> tool. Now if this tool would exist in OpenStack, I would suggest to link it<br>
> like this, but surely this is to be seen after the external tool<br>
> implementation exists:<br></span></blockquote><div><br></div><div>We are far from it right now, but I think Craton would be able to do some of it. Like I said before scheduled jobs will be a part of the workflow engine so this will be possible. We should discuss more on what this exactly looks like etc. Example: Admins would like to upgrade a host. In this case we might trigger a workflow to live-migrate all the vm's from that host, disable monitoring, disable the service, upgrade the host, enable monitoring, and put the host back in production (enabled in nova services) for instance.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
> - Nova Services API could have a way for admin to set and unset a "base URL"<br>
> pointing to external tool about planned maintenance effecting to a host.<br>
> - Admin should see link to external tool when querying services via services<br>
> API. This might be formed like: {base URL}/{host_name}<br>
> - Project should have a project specific link to external tool when querying<br>
> via Nova servers API. This might be: {base URL}/project/{hostId}.<br>
> hostId is exposed to project as it do not tell exact host, but otherwise as<br>
> a unique identifier for host:<br>
> hashlib.sha224(projectid + host_name).hexdigest()<br></span></blockquote><div><br></div><div>I am not sure about this but interaction with Nova through the API is assumed as a part of a workflow. Most of it might be encapsulated in the running job in the sense that the job you are running is actually doing it. Craton might provide the scaffolding to make it easy to do so. I am not sure what the possibilities are from Nova side, but you might be able to do so simply by scheduling a work on a set of host with just craton perhaps? We can discuss more on #craton ?</div><div><br></div><div>thanks,</div><div>Sulo</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
<br>
</span>I'm a little confused by these problems, so I'll have to re-read them<br>
a few times and reply later.<br>
<br>
Thanks again Tomi!<br>
<br>
--<br>
Ian Cordasco<br>
<div class="HOEnZb"><div class="h5"><br>
______________________________<wbr>______________________________<wbr>______________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.<wbr>openstack.org?subject:<wbr>unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/<wbr>cgi-bin/mailman/listinfo/<wbr>openstack-dev</a><br>
</div></div></blockquote></div><br></div></div>