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 
<ddu...@gmail.com<mailto:ddu...@gmail.com>> wrote:


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!


On Thu, Feb 12, 2015 at 11:27 AM, Yathiraj Udupi (yudupi) 
<yud...@cisco.com<mailto:yud...@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.


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, 

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 

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 

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.  



On 2/12/15, 10:02 AM, "Tim Hinrichs" 
<thinri...@vmware.com<mailto:thinri...@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.


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

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

From: Debo~ Dutta <dedu...@cisco.com<mailto:dedu...@cisco.com>>
Date: Wednesday, February 11, 2015 at 4:48 PM
To: Tim Hinrichs <thinri...@vmware.com<mailto:thinri...@vmware.com>>
Cc: "Yathiraj Udupi (yudupi)" <yud...@cisco.com<mailto:yud...@cisco.com>>, 
Gokul B Kandiraju <go...@us.ibm.com<mailto:go...@us.ibm.com>>, Prabhakar Kudva 
<dilik...@in.ibm.com<mailto:dilik...@in.ibm.com>>, Norival Figueira 
<nfigu...@brocade.com<mailto:nfigu...@brocade.com>>, Ramki Krishnan 
<r...@brocade.com<mailto:r...@brocade.com>>, "Xinyuan Huang (xinyuahu)" 
<xinyu...@cisco.com<mailto:xinyu...@cisco.com>>, "Rishabh Jain -X (rishabja - 
AAP3 INC at Cisco)" <risha...@cisco.com<mailto:risha...@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)


From: Tim Hinrichs <thinri...@vmware.com<mailto:thinri...@vmware.com>>
Date: Wednesday, February 11, 2015 at 4:43 PM
To: Debo~ Dutta <dedu...@cisco.com<mailto:dedu...@cisco.com>>
Cc: "Yathiraj Udupi (yudupi)" <yud...@cisco.com<mailto:yud...@cisco.com>>, 
Gokul B Kandiraju <go...@us.ibm.com<mailto:go...@us.ibm.com>>, Prabhakar Kudva 
<dilik...@in.ibm.com<mailto:dilik...@in.ibm.com>>, Norival Figueira 
<nfigu...@brocade.com<mailto:nfigu...@brocade.com>>, Ramki Krishnan 
<r...@brocade.com<mailto:r...@brocade.com>>, "Xinyuan Huang (xinyuahu)" 
<xinyu...@cisco.com<mailto:xinyu...@cisco.com>>, "Rishabh Jain -X (rishabja - 
AAP3 INC at Cisco)" <risha...@cisco.com<mailto:risha...@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 


On Feb 11, 2015, at 4:35 PM, Debo Dutta (dedutta) 
<dedu...@cisco.com<mailto:dedu...@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.


From: Tim Hinrichs <thinri...@vmware.com<mailto:thinri...@vmware.com>>
Date: Wednesday, February 11, 2015 at 4:11 PM
To: "Yathiraj Udupi (yudupi)" <yud...@cisco.com<mailto:yud...@cisco.com>>
Cc: Gokul B Kandiraju <go...@us.ibm.com<mailto:go...@us.ibm.com>>, Prabhakar 
Kudva <ku...@us.ibm.com<mailto:ku...@us.ibm.com>>, 
<dilik...@in.ibm.com<mailto:dilik...@in.ibm.com>>, Norival Figueira 
<nfigu...@brocade.com<mailto:nfigu...@brocade.com>>, Ramki Krishnan 
<r...@brocade.com<mailto:r...@brocade.com>>, "Xinyuan Huang (xinyuahu)" 
<xinyu...@cisco.com<mailto:xinyu...@cisco.com>>, "Rishabh Jain -X (rishabja - 
AAP3 INC at Cisco)" <risha...@cisco.com<mailto:risha...@cisco.com>>, Debo~ 
Dutta <dedu...@cisco.com<mailto:dedu...@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.



On Feb 10, 2015, at 11:10 AM, Yathiraj Udupi (yudupi) 
<yud...@cisco.com<mailto:yud...@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.


On 2/10/15, 11:03 AM, "Tim Hinrichs" 
<thinri...@vmware.com<mailto:thinri...@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.


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

Hi Tim,

Thanks for reaching out.   Currently available documentation is all in the 
project README - 
  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 - 
 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.


On 2/5/15, 4:22 PM, "Tim Hinrichs" 
<thinri...@vmware.com<mailto:thinri...@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!


On Wed, Feb 11, 2015 at 9:01 AM, Tim Hinrichs 
<thinri...@vmware.com<mailto:thinri...@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.



OpenStack Development Mailing List (not for usage questions)

OpenStack Development Mailing List (not for usage questions)

OpenStack Development Mailing List (not for usage questions)


OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe

Reply via email to