[openstack-dev] [Congress][Delegation] Google doc for working notes

Tim Hinrichs thinrichs at vmware.com
Fri Feb 13 17:35:22 UTC 2015


Hi Debo and Yathi,

We’re completely on the same page here.  We’ve known about the solver-scheduler for a while now (I even attended your Atlanta talk), and I always expected Congress would integrate with it.  As you say, now it’s a matter of getting down to the details.

A bit on the context…  The current problem we’re working on in Congress is how we might delegate responsibility for policy enforcement to domain-specific policy engines, and a number of people were interested in integrating with a VM-placement engine.  We started looking at the solver-scheduler (the obvious first choice), hence this dialog.  The notes in the google doc are just me trying to understand the problem of delegation to a VM-placement engine by working through the problem end-to-end.  (I’ve not worked with LP or VM-placement much, so my notes are there to help me grapple a bit with the domain for the first time.)  How we build a PoC is something we haven’t started to discuss.  So you’re joining the discussion at the right time.  The more of that PoC we can build by leveraging solver-scheduler, the better.

More detailed comments inline.


On Feb 13, 2015, at 5:05 AM, Debojyoti Dutta <ddutta at gmail.com<mailto:ddutta at gmail.com>> wrote:

Tim

Wanted to clarify a bit. As I have mentioned before: Solver scheduler is work done before this work (Datalog->constraints).... but we had kept it very generic to be integrated with something like congress. In fact Ramki (who was one of the members of the original thread when you reached out to us) joined us to in talk in Atlanta where we described some of the same use cases using PULP .... congress was still ramping up then. We were not aware of the Datalog->constraints work that you guys were doing, else we would have joined hands before.

The question is this: going forward, how do build this cool stuff together in the community? I am hoping the scheduler folks will be very excited too!

debo

On Thu, Feb 12, 2015 at 11:27 AM, Yathiraj Udupi (yudupi) <yudupi at cisco.com<mailto:yudupi at cisco.com>> wrote:
Hi Tim,

Thanks for your response.  Excited too to extend the collaboration and ensure there is no need to duplicate effort in the open source community.
 My responses inline.

1)  Choice of LP solver.

I see solver-scheduler uses Pulp, which was on the Congress short list as well.  So we’re highly aligned on the choice of underlying solver.

YATHI - This makes me wonder why can’t we easily adapt the solver-scheduler to your needs, rather than duplicating the effort!


My primary goal is to build an architecture that makes it easy to integrate with domain-specific policy engines (like compute or networking).

What I’m also hearing is that people are interested in building *new* domain-specific policy engines within the Congress framework and/or expanding the functionality of the Congress policy engine itself to include optimization technology.  In both cases, we would need a library for solving optimization problems.  Oliver (CC’ed) has proposed adding such a library to Congress.  Solver-scheduler already has such a library, so it would be great if we could all brainstorm about how to make optimization technology easy to use for people writing domain-specific policy engines, without reinventing the wheel.

https://blueprints.launchpad.net/congress/+spec/rule-x


2) User control over VM-placement.


To choose the criteria for VM-placement, the solver-scheduler user picks from a list of predefined options, e.g. ActiveHostConstraint, MaxRamAllocationPerHostConstraint.

We’re investigating a slightly different approach, where the user defines the criteria for VM-placement by writing any policy they like in Datalog.  Under the hood we then convert that Datalog to an LP problem.  From the developer’s perspective, with the Congress approach we don’t attempt to anticipate the different policies the user might want and write code for each policy; instead, we as developers write a translator from Datalog to LP.  From the user’s perspective, the difference is that if the option they want isn’t on the solver-scheduler's list, they’re out of luck or need to write the code themselves.  But with the Congress approach, they can write any VM-placement policy they like.

What I’d like to see is the best of both worlds.  Users write Datalog policies describing whatever VM-placement policy they want.  If the policy they’ve written is on the solver-scheduler’s list of options, we use the hard-coded implementation, but if the policy isn’t on that list we translate directly to LP.  This approach gives us the ability to write custom code to handle common cases while at the same time letting users write whatever policy they like.


YATHI -  The idea of providing some default constraint classes in Solver Scheduler was to enable easy pluggability for various placement policy scenarios.  We can easily add a custom constraint class in solver scheduler, that enables adding additional constraints at runtime (PulP model or any other models we can use and support).  It will just take in any external policy (say Datalog in Congress example), and it can easily add those set of resulting translated constraints via this custom constraint builder class.  This is something we can definitely add value to solver scheduler by implementing and adding here.

This sounds promising.  What would that custom constraint class look like?  What language would it support, e.g. would Congress send over a PulP LP?



3) API and architecture.

Today the solver-scheduler's VM-placement policy is defined at config-time (i.e. not run-time).  Am I correct that this limitation is only because there’s no API call to set the solver-scheduler’s policy?  Or is there some other reason the policy is set at config-time?

Congress policies change at runtime, so we’ll definitely need a VM-placement engine whose policy can be changed at run-time as well.

YATHI -  We have working code to set VM placement policies at run-time to dynamically select the constraint or cost classes to use.   It is yet to upstreamed to solver scheduler stackforge repo, but will be soon.  But yeah I agree with you, this is definitely needed for any policy-driven VM placement engine, as the policies are dynamic. Short answer, yes solver scheduler has abilities to support this.

Good to know.  Let us know when that gets committed so we can take a look.



If we focus on just migration (and not provisioning), we can build a VM-placement engine that sits outside of Nova that has an API call that allows us to set policy at runtime.  We can also set up that engine to get data updates that influence the policy.  We were planning on creating this kind of VM-placement engine within Congress as a node on the DSE (our message bus).  This is convenient because all nodes on the DSE run in their own thread, any node on the DSE can subscribe to any data from any other node (e.g. ceilometer’s data), and the algorithms for translating Datalog to LP look to be quite similar to the algorithms we’re using in our domain-agnostic policy engine.

YATHI – The entire scheduling community in Nova is planning on an external scheduler (Gantt), and we are pitching solver scheduler also as a stand-alone placement engine a scheduler as a service.  Nova integration is just to ensure it fits within the Nova workflow.   I am not quite familiar with the DSE architecture yet,  but the simple idea we have is, Congress policies, as part of the enforcement workflow, should set the VM placement constraints, and feed any additional data to be used for scheduling/placement decisions, which will be consumed dynamically by the Solver Scheduler, and after the delegation, the Solver scheduler module will calculate the placement decisions, and complete the VM initial placement or call the VM migration APIs and enable the required migrations.

So the solver-scheduler would take an LP program as input (using some agreed-upon decision variables) and handle provisioning or migration as needed.  The Congress side would take care of translating Datalog to that LP problem.  Right?

Tim




Thanks,
Yathi.


On 2/12/15, 10:02 AM, "Tim Hinrichs" <thinrichs at vmware.com<mailto:thinrichs at vmware.com>> wrote:

Hi Debo and Yathiraj,

I took a third look at the solver-scheduler docs and code with your comments in mind.  A few things jumped out.





2) User control over VM-placement.

Tim


On Feb 11, 2015, at 4:50 PM, Debojyoti Dutta <ddutta at gmail.com<mailto:ddutta at gmail.com>> wrote:

Hi Tim: moving our thread to the mailer. Excited to collaborate!



From: Debo~ Dutta <dedutta at cisco.com<mailto:dedutta at cisco.com>>
Date: Wednesday, February 11, 2015 at 4:48 PM
To: Tim Hinrichs <thinrichs at vmware.com<mailto:thinrichs at vmware.com>>
Cc: "Yathiraj Udupi (yudupi)" <yudupi at cisco.com<mailto:yudupi at cisco.com>>, Gokul B Kandiraju <gokul at us.ibm.com<mailto:gokul at us.ibm.com>>, Prabhakar Kudva <kudva at us.ibm.com<mailto:kudva at us.ibm.com>>, "ruby.krishnaswamy at orange.com<mailto:ruby.krishnaswamy at orange.com>" <ruby.krishnaswamy at orange.com<mailto:ruby.krishnaswamy at orange.com>>, "dilikris at in.ibm.com<mailto:dilikris at in.ibm.com>" <dilikris at in.ibm.com<mailto:dilikris at in.ibm.com>>, Norival Figueira <nfigueir at Brocade.com<mailto:nfigueir at Brocade.com>>, Ramki Krishnan <ramk at Brocade.com<mailto:ramk at Brocade.com>>, "Xinyuan Huang (xinyuahu)" <xinyuahu at cisco.com<mailto:xinyuahu at cisco.com>>, "Rishabh Jain -X (rishabja - AAP3 INC at Cisco)" <rishabja at cisco.com<mailto:rishabja at cisco.com>>
Subject: Re: Nova solver scheduler and Congress

Hi Tim

To address your particular questions:

  1.  translate some policy language into constraints for the LP/CVP and we had left that to congress hoping to integrate when the policy efforts in openstack were ready (our initial effort was pre congress)
  2.  For migrations: we are currently doing that – its about incremental constraints into the same solver. Hence its a small deal ….

Joining forces is a terrific idea. Would love to join the IRC call and see how we can build cool stuff in the community together. I hope we don’t have to replicate the vm placement engine while the work that was done in the community does something very similar (and be adapted)

debo

From: Tim Hinrichs <thinrichs at vmware.com<mailto:thinrichs at vmware.com>>
Date: Wednesday, February 11, 2015 at 4:43 PM
To: Debo~ Dutta <dedutta at cisco.com<mailto:dedutta at cisco.com>>
Cc: "Yathiraj Udupi (yudupi)" <yudupi at cisco.com<mailto:yudupi at cisco.com>>, Gokul B Kandiraju <gokul at us.ibm.com<mailto:gokul at us.ibm.com>>, Prabhakar Kudva <kudva at us.ibm.com<mailto:kudva at us.ibm.com>>, "ruby.krishnaswamy at orange.com<mailto:ruby.krishnaswamy at orange.com>" <ruby.krishnaswamy at orange.com<mailto:ruby.krishnaswamy at orange.com>>, "dilikris at in.ibm.com<mailto:dilikris at in.ibm.com>" <dilikris at in.ibm.com<mailto:dilikris at in.ibm.com>>, Norival Figueira <nfigueir at Brocade.com<mailto:nfigueir at Brocade.com>>, Ramki Krishnan <ramk at Brocade.com<mailto:ramk at Brocade.com>>, "Xinyuan Huang (xinyuahu)" <xinyuahu at cisco.com<mailto:xinyuahu at cisco.com>>, "Rishabh Jain -X (rishabja - AAP3 INC at Cisco)" <rishabja at cisco.com<mailto:rishabja at cisco.com>>
Subject: Re: Nova solver scheduler and Congress

Hi Debo,

The 2 efforts share great similarities, which was why we investigated the state of solver-scheduler.  From what I understand, (i) solver-scheduler doesn’t currently have a policy language and (ii) it doesn’t do migrations.  (I realize these are both in the works.)  We needed both and wanted to make progress before those were complete.

In the long run, it may make perfect sense to replace our vm-placement engine with yours.  So joining forces sounds like a good idea.  At the very *least* we ought to keep up to date with each other’s progress.

I’m starting to wonder if we ought to schedule a (bi-) weekly IRC for this topic.

Tim

On Feb 11, 2015, at 4:35 PM, Debo Dutta (dedutta) <dedutta at cisco.com<mailto:dedutta at cisco.com>> wrote:

Hi Tim

This looks awesome. Trying to figure out how this approach is different from the solver scheduler effort we did? We would be happy to fold our solver scheduler effort into this (that way you also get code up and running)

Will also respond on the thread.

thx
debo

From: Tim Hinrichs <thinrichs at vmware.com<mailto:thinrichs at vmware.com>>
Date: Wednesday, February 11, 2015 at 4:11 PM
To: "Yathiraj Udupi (yudupi)" <yudupi at cisco.com<mailto:yudupi at cisco.com>>
Cc: Gokul B Kandiraju <gokul at us.ibm.com<mailto:gokul at us.ibm.com>>, Prabhakar Kudva <kudva at us.ibm.com<mailto:kudva at us.ibm.com>>, "ruby.krishnaswamy at orange.com<mailto:ruby.krishnaswamy at orange.com>" <ruby.krishnaswamy at orange.com<mailto:ruby.krishnaswamy at orange.com>>, "dilikris at in.ibm.com<mailto:dilikris at in.ibm.com>" <dilikris at in.ibm.com<mailto:dilikris at in.ibm.com>>, Norival Figueira <nfigueir at Brocade.com<mailto:nfigueir at Brocade.com>>, Ramki Krishnan <ramk at Brocade.com<mailto:ramk at Brocade.com>>, "Xinyuan Huang (xinyuahu)" <xinyuahu at cisco.com<mailto:xinyuahu at cisco.com>>, "Rishabh Jain -X (rishabja - AAP3 INC at Cisco)" <rishabja at cisco.com<mailto:rishabja at cisco.com>>, Debo~ Dutta <dedutta at cisco.com<mailto:dedutta at cisco.com>>
Subject: Re: Nova solver scheduler and Congress

Hi Yathiraj,

The group is getting big enough that we’ve decided to move the entire discussion to the openstack-dev mailing list.  I sent a note today with the google doc we’re working on.  We’re trying to include [Congress][Delegation] in the subject line of relevant posts.  Here’s the gdoc.

https://docs.google.com/document/d/1ksDilJYXV-5AXWON8PLMedDKr9NpS8VbT0jIy_MIEtI/edit?usp=sharing<https://urldefense.proofpoint.com/v2/url?u=https-3A__docs.google.com_document_d_1ksDilJYXV-2D5AXWON8PLMedDKr9NpS8VbT0jIy-5FMIEtI_edit-3Fusp-3Dsharing&d=AwMF-g&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=B6BWd4kFfgOzAREgThxkmTZKy7dDXE2-eBAmL0PBK7s&m=no-emyiErtYa3_zneDNhY78LG0mCHc0bgMpXi1StZ7A&s=rLY2ACQqD5EQn3MgOnoX8M_zr9254v-FqhF56wfGpic&e=>

Tim

On Feb 10, 2015, at 11:10 AM, Yathiraj Udupi (yudupi) <yudupi at cisco.com<mailto:yudupi at cisco.com>> wrote:

Hi Tim,

Thanks for your response.  I think Congress will have to appreciate different APIs interacting with multiple components in the OpenStack ecosystem.  So I will be happy to help figure out the integration plan in general from the Congress side.

I will  be very interested and glad to participate in the discussions of designing these interfaces in Congress.   Please share any preliminary designs you may have.   I had participated in one of the Congress mid-cycle meet ups, and I am interested in the upcoming work on these kind of enforcement aspects (reactive, proactive) of Congress.  In terms of Nova scheduling via Solver scheduler, it will also help us be ready with the integration points.

Let’s be in sync.

Thanks,
Yathi.


On 2/10/15, 11:03 AM, "Tim Hinrichs" <thinrichs at vmware.com<mailto:thinrichs at vmware.com>> wrote:

Hi Yathiraj,

Thanks for the help!

The reason I asked is that we’re trying to figure out the basic interface for how two policy engines (in general) ought to interact.  We were hoping Congress and solver-scheduler had very similar APIs, which would make that interface relatively simple.  But it sounds like the two systems have pretty different APIs.  So for now we’ll keep working on that interface, and once we have something worked out we’ll touch base with you to think through how an integration might work.

Tim

On Feb 6, 2015, at 11:45 AM, Yathiraj Udupi (yudupi) <yudupi at cisco.com<mailto:yudupi at cisco.com>> wrote:

Hi Tim,

Thanks for reaching out.   Currently available documentation is all in the project README - https://github.com/stackforge/nova-solver-scheduler/blob/master/README.md<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_stackforge_nova-2Dsolver-2Dscheduler_blob_master_README.md&d=AwMF-g&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=B6BWd4kFfgOzAREgThxkmTZKy7dDXE2-eBAmL0PBK7s&m=4W62lNEl8JKjwUKKASTM0fjHUVJATmMpEsCoYaeA_OQ&s=1rPI8hfdD9f8_B9_14xALPUjAuJJnWVJRhugMJ16IIk&e=>  Towards the end there are some examples.

To answer your specific questions:

1) How do we change the Nova server-placement policy?  An API call?  A file on the Nova server?
- Currently the server placement policies are all defined in solver scheduler in the form of pluggable constraint or cost modules.  So imagine there will be a policy to place a compute VM close to on a storage volume host, there is a volume affinity cost module - https://github.com/stackforge/nova-solver-scheduler/blob/master/nova/scheduler/solvers/costs/volume_affinity_cost.py<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_stackforge_nova-2Dsolver-2Dscheduler_blob_master_nova_scheduler_solvers_costs_volume-5Faffinity-5Fcost.py&d=AwMF-g&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=B6BWd4kFfgOzAREgThxkmTZKy7dDXE2-eBAmL0PBK7s&m=4W62lNEl8JKjwUKKASTM0fjHUVJATmMpEsCoYaeA_OQ&s=T34XhGj816dbMWcnLKU0Oda99ku1twIhUWN_SLTHPkQ&e=> and you will feed the necessary inputs for the policy via scheduler hints that are induced during the nova API calls, in this case of the volume cost,  the scheduler hint will be to provide the specific volume id.
- So all these constraint and cost classes are defined the nova conf file, so all applicable policies are included statically at the moment, and inputs to the policies are via scheduler hints.
- We are yet to commit the code to dynamically set these policies at run-time, so we can choose what policies to include.

2) What policy language does solver-scheduler use?
- We haven’t yet added support for a formal policy language, but everything is implemented as pluggable modules now, and a policy will be simply defining what constraints or costs to use, for what scenarios.  We plan to use simple policy rules to define this, and will be added soon in the roadmap.

3) I presume solver-scheduler *provisions* servers according to policy.  Does it also *migrate* servers when they begin to violate policy?
Yes for provisioning according to policy,  Support for migration is coming soon, and will utilize the nova migration workflow based on a policy violation detected by a constraint validator.

Congress could feed some of these policies in terms of selecting our solver scheduler constraints and costs for specific scenarios, and also feed the necessary scheduler hints.  So based on the Congress policy, we can select our constraints and costs, and enable nova server placement accordingly.

Including our small solver scheduler team here from Cisco, we will be glad to work with the community.

Thanks,
Yathi.



On 2/5/15, 4:22 PM, "Tim Hinrichs" <thinrichs at vmware.com<mailto:thinrichs at vmware.com>> wrote:

Hi Yathiraj,

I had a couple of questions about the nova solver scheduler.  We’re looking into driving server-placement via policy through Congress and wanted to understand more about how solver-scheduler works.  If it’s easier to just point me to docs or examples, that’d be great!





Thanks!
Tim





On Wed, Feb 11, 2015 at 9:01 AM, Tim Hinrichs <thinrichs at vmware.com<mailto:thinrichs at vmware.com>> wrote:
Hi all,

A (growing) group of folks are interested in working on the problem of delegating policy from Congress to domain-specific policy engines.  We started looking at an NFV use case: migrating VMs to reduce energy consumption.  In particular we’re looking into building a VM-placement policy engine built on top of a linear programming solver.  Here’s a doc with some working notes where we’re trying to figure out how to do the translation from Congress policy to the linear program.

https://docs.google.com/document/d/1ksDilJYXV-5AXWON8PLMedDKr9NpS8VbT0jIy_MIEtI/edit?usp=sharing<https://urldefense.proofpoint.com/v2/url?u=https-3A__docs.google.com_document_d_1ksDilJYXV-2D5AXWON8PLMedDKr9NpS8VbT0jIy-5FMIEtI_edit-3Fusp-3Dsharing&d=AwMFaQ&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=B6BWd4kFfgOzAREgThxkmTZKy7dDXE2-eBAmL0PBK7s&m=ZN1RTPgf15rmqr46xMdX8HUY-fmlaOfIY3TWbQlfgBk&s=zdYLSRitftQH2q_b1lhY80vIsECD9-xW6LZhcwJrRZA&e=>

Tim

__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe<http://OpenStack-dev-request@lists.openstack.org/?subject:unsubscribe>
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev




--
-Debo~
__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request at lists.openstack.org<mailto:OpenStack-dev-request at lists.openstack.org>?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe<http://OpenStack-dev-request@lists.openstack.org/?subject:unsubscribe>
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev




--
-Debo~

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20150213/8067fe07/attachment-0001.html>


More information about the OpenStack-dev mailing list