<div dir="ltr"><div>[resending to include KubeVirt devs ]</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><pre cols="72"><p style="color:rgb(0,0,0);font-family:overpass,sans-serif;white-space:normal;font-weight:bold;margin:0px;padding:0px;font-size:14px;text-transform:uppercase">YANIV LAVI</p><p style="color:rgb(0,0,0);font-family:overpass,sans-serif;white-space:normal;font-size:10px;margin:0px 0px 4px;text-transform:uppercase">SENIOR TECHNICAL PRODUCT MANAGER</p><p style="font-family:overpass,sans-serif;white-space:normal;margin:0px;font-size:10px;color:rgb(153,153,153)"><a href="https://www.redhat.com/" style="color:rgb(0,136,206);margin:0px" target="_blank">Red Hat Israel Ltd.</a></p><span style="font-family:overpass,sans-serif;white-space:normal;font-size:10px;margin:0px;color:rgb(153,153,153)"><p style="margin:0px">34 Jerusalem Road, Building A, 1st floor</p></span><span style="color:rgb(0,0,0);font-family:overpass,sans-serif;font-size:medium;white-space:normal"></span><span style="color:rgb(0,0,0);font-family:overpass,sans-serif;font-size:medium;white-space:normal"><p style="font-size:10px;margin:0px;color:rgb(153,153,153)">Ra'anana, Israel 4350109</p></span><span style="color:rgb(0,0,0);font-family:overpass,sans-serif;font-size:medium;white-space:normal"></span><p style="font-family:overpass,sans-serif;white-space:normal;margin:0px 0px 6px;font-size:10px"><span style="color:rgb(153,153,153);margin:0px;padding:0px"><a href="mailto:ylavi@redhat.com" style="color:rgb(0,136,206);margin:0px" target="_blank">ylavi@redhat.com</a> </span><font color="#999999"> T: </font><a href="tel:+972-9-7692306" style="color:rgb(0,136,206);margin:0px" target="_blank">+972-9-7692306</a><font color="#999999">/</font><a href="tel:8272306" style="color:rgb(0,136,206);margin:0px" target="_blank">8272306</a><font color="#999999"> F: </font><a href="tel:+972-9-7692223" style="color:rgb(0,136,206);margin:0px" target="_blank">+972-9-7692223</a><font color="#999999"> IM: </font><span style="color:rgb(153,153,153)">ylavi</span></p><table border="0" style="color:rgb(0,0,0);font-family:overpass,sans-serif;font-size:medium;white-space:normal"><tbody><tr><td width="100px"><a href="https://red.ht/sig" target="_blank"><img src="https://www.redhat.com/files/brand/email/sig-redhat.png" width="90" height="auto"></a></td><td style="font-size:10px"><a href="https://redhat.com/trusted" style="color:rgb(204,0,0);font-weight:bold" target="_blank">TRIED. TESTED. TRUSTED.</a></td></tr></tbody></table><div style="color:rgb(0,0,0);font-family:overpass,sans-serif;white-space:normal;font-size:10px"><div style="color:rgb(153,153,153)"><a href="https://twitter.com/redhatnews" title="twitter" style="background:url("https://www.redhat.com/files/brand/email/sm-twitter.png") 0px 50%/16px no-repeat transparent;height:20px;color:rgb(119,119,119);display:inline-block;line-height:20px;padding-left:16px" target="_blank">@redhatnews</a> <a href="https://www.linkedin.com/company/red-hat" title="LinkedIn" style="background:url("https://www.redhat.com/files/brand/email/sm-linkedin.png") 0px 50%/16px no-repeat transparent;height:20px;color:rgb(119,119,119);display:inline-block;line-height:20px;padding-left:16px" target="_blank">Red Hat</a> <a href="https://www.facebook.com/RedHatInc" title="Facebook" style="background:url("https://www.redhat.com/files/brand/email/sm-facebook.png") 0px 50%/16px no-repeat transparent;height:20px;color:rgb(119,119,119);display:inline-block;line-height:20px;padding-left:16px" target="_blank">Red Hat</a></div></div></pre></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Wed, Apr 4, 2018 at 7:07 PM, Yaniv Lavi <span dir="ltr"><<a href="mailto:ylavi@redhat.com" target="_blank">ylavi@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><div>I'd like to go one step back and discuss why we should try to do this on the high level.</div><div><br></div><div>For the last 5-10 years of KVM development, we are pragmatically providing the Linux host level APIs via project specific host agents/integration code (Nova agent, oVirt host agent, virt-manager).</div><div>In recent time we see new projects that have similar requirements (Cockpit, different automation tool, KubeVirt), this means that all of the Linux virt stack consumers are reinventing the wheel and using very different paths to consume the partial solutions that are provided today.</div><div><br></div><div>The use of the Linux virt stack is well defined by the existing projects scope and it makes a lot of sense to try to provide the common patterns via the virt stack directly as a host level API that different client or management consume.</div><div>The main goal is to improve the developer experience for virtualization management applications with an API set that is useful to the entire set of tools (OSP, oVirt, KubeVirt, Cockpit and so on).</div><div><br></div><div>The Linux virt developer community currently is not able to provide best practices and optimizations from single node knowledge. This means that all of that smarts is locked to the specific project integration in the good case or not provided at all and the projects as a whole lose from that. When testing the Linux virt stack itself and since each project has different usage pattern, we lose the ability to test abilities on the lower level making the entire stack less stable and complete for new features. </div><div><br></div><div>This also limits the different projects ability to contribute back to the Linux stack based on their user and market experience for others in open source to gain.</div><div><br></div><div>I understand this shift is technically challenging for existing projects, but I do see value in doing this even for new implementation like Cockpit and KubeVirt.</div><div>I also believe that the end result could be appealing enough to cause project like OSP, virt-manager and oVirt to consider to reduce the existing capabilities of their host side integrations/agents to shims on the host level and reuse the common/better-tested pattern as clients that was developed against the experience of the different projects.</div><div><br></div><div>I call us all to collaborate and try to converge on a solution that will help all in the long term in the value you get from the common base.</div></div><div><br></div><div><br></div><div>Thanks,</div></div><div class="gmail_extra"><span class=""><br clear="all"><div><div class="m_-1310683850725944593gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><pre cols="72"><p style="color:rgb(0,0,0);font-family:overpass,sans-serif;white-space:normal;font-weight:bold;margin:0px;padding:0px;font-size:14px;text-transform:uppercase">YANIV LAVI</p><p style="color:rgb(0,0,0);font-family:overpass,sans-serif;white-space:normal;font-size:10px;margin:0px 0px 4px;text-transform:uppercase">SENIOR TECHNICAL PRODUCT MANAGER</p><p style="font-family:overpass,sans-serif;white-space:normal;margin:0px;font-size:10px;color:rgb(153,153,153)"><a href="https://www.redhat.com/" style="color:rgb(0,136,206);margin:0px" target="_blank">Red Hat Israel Ltd.</a></p><span style="font-family:overpass,sans-serif;white-space:normal;font-size:10px;margin:0px;color:rgb(153,153,153)"><p style="margin:0px">34 Jerusalem Road, Building A, 1st floor</p></span><span style="color:rgb(0,0,0);font-family:overpass,sans-serif;font-size:medium;white-space:normal"></span><span style="color:rgb(0,0,0);font-family:overpass,sans-serif;font-size:medium;white-space:normal"><p style="font-size:10px;margin:0px;color:rgb(153,153,153)">Ra'anana, Israel 4350109</p></span><span style="color:rgb(0,0,0);font-family:overpass,sans-serif;font-size:medium;white-space:normal"></span><p style="font-family:overpass,sans-serif;white-space:normal;margin:0px 0px 6px;font-size:10px"><span style="color:rgb(153,153,153);margin:0px;padding:0px"><a href="mailto:ylavi@redhat.com" style="color:rgb(0,136,206);margin:0px" target="_blank">ylavi@redhat.com</a> </span><font color="#999999"> T: </font><a href="tel:+972-9-7692306" style="color:rgb(0,136,206);margin:0px" target="_blank">+972-9-7692306</a><font color="#999999">/</font><a href="tel:8272306" style="color:rgb(0,136,206);margin:0px" target="_blank">8272306</a><font color="#999999"> F: </font><a href="tel:+972-9-7692223" style="color:rgb(0,136,206);margin:0px" target="_blank">+972-9-7692223</a><font color="#999999"> IM: </font><span style="color:rgb(153,153,153)">ylavi</span></p><table border="0" style="color:rgb(0,0,0);font-family:overpass,sans-serif;font-size:medium;white-space:normal"><tbody><tr><td width="100px"><a href="https://red.ht/sig" target="_blank"><img src="https://www.redhat.com/files/brand/email/sig-redhat.png" width="90" height="auto"></a></td><td style="font-size:10px"><a href="https://redhat.com/trusted" style="color:rgb(204,0,0);font-weight:bold" target="_blank">TRIED. TESTED. TRUSTED.</a></td></tr></tbody></table><div style="color:rgb(0,0,0);font-family:overpass,sans-serif;white-space:normal;font-size:10px"><div style="color:rgb(153,153,153)"><a href="https://twitter.com/redhatnews" title="twitter" style="background:url("https://www.redhat.com/files/brand/email/sm-twitter.png") 0px 50%/16px no-repeat transparent;height:20px;color:rgb(119,119,119);display:inline-block;line-height:20px;padding-left:16px" target="_blank">@redhatnews</a> <a href="https://www.linkedin.com/company/red-hat" title="LinkedIn" style="background:url("https://www.redhat.com/files/brand/email/sm-linkedin.png") 0px 50%/16px no-repeat transparent;height:20px;color:rgb(119,119,119);display:inline-block;line-height:20px;padding-left:16px" target="_blank">Red Hat</a> <a href="https://www.facebook.com/RedHatInc" title="Facebook" style="background:url("https://www.redhat.com/files/brand/email/sm-facebook.png") 0px 50%/16px no-repeat transparent;height:20px;color:rgb(119,119,119);display:inline-block;line-height:20px;padding-left:16px" target="_blank">Red Hat</a></div></div></pre></div></div></div></div></div></div></div></div></div>
<br></span><div><div class="h5"><div class="gmail_quote">On Thu, Mar 22, 2018 at 7:18 PM, Daniel P. Berrangé <span dir="ltr"><<a href="mailto:berrange@redhat.com" target="_blank">berrange@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="m_-1310683850725944593HOEnZb"><div class="m_-1310683850725944593h5">On Thu, Mar 22, 2018 at 03:54:01PM +0100, Martin Kletzander wrote:<br>
> ><br>
> > > One more thing could be automatically figuring out best values based on<br>
> > > libosinfo-provided data.<br>
> > ><br>
> > > 2) Policies<br>
> > ><br>
> > > Lot of the time there are parts of the domain definition that need to be<br>
> > > added, but nobody really cares about them. Sometimes it's enough to<br>
> > > have few templates, another time you might want to have a policy<br>
> > > per-scenario and want to combine them in various ways. For example with<br>
> > > the data provided by point 1).<br>
> > ><br>
> > > For example if you want PCI-Express, you need the q35 machine type, but<br>
> > > you don't really want to care about the machine type. Or you want to<br>
> > > use SPICE, but you don't want to care about adding QXL.<br>
> > ><br>
> > > What if some of these policies could be specified once (using some DSL<br>
> > > for example), and used by virtuned to merge them in a unified and<br>
> > > predictable way?<br>
> > ><br>
> > > 3) Abstracting the XML<br>
> > ><br>
> > > This is probably just usable for stateless apps, but it might happen<br>
> > > that some apps don't really want to care about the XML at all. They<br>
> > > just want an abstract view of the domain, possibly add/remove a device<br>
> > > and that's it. We could do that as well. I can't really tell how much<br>
> > > of a demand there is for it, though.<br>
> ><br>
> > It is safe to say that applications do not want to touch XML at all.<br>
> > Any non-trivial application has created an abstraction around XML,<br>
> > so that they have an API to express what they want, rather than<br>
> > manipulating of strings to format/parse XML.<br>
> ><br>
><br>
> Sure, this was just meant to be a question as to whether it's worth<br>
> pursuing or not. You make a good point on why it is not (at least for<br>
> existing apps).<br>
><br>
> However, since this was optional, the way this would look without the<br>
> XML abstraction is that both input and output would be valid domain<br>
> definitions, ultimately resulting in something similar to virt-xml with<br>
> the added benefit of applying a policy from a file/string either<br>
> supplied by the application itself. Whether that policy was taken from<br>
> a common repository of such knowledge is orthogonal to this idea. Since<br>
> you would work with the same data, the upgrade could be incremental as<br>
> you'd only let virtuned fill in values for new options and could slowly<br>
> move on to using it for some pre-existing ones. None of the previous<br>
> approaches did this, if I'm not mistaken. Of course it gets more<br>
> difficult when you need to expose all the bits libvirt does and keep<br>
> them in sync (as you write below).<br>
<br>
</div></div>That has implications for how mgmt app deals with XML. Nova has object<br>
models for representing XML in memory, but it doesn't aim to have<br>
loss-less roundtrip from parse -> object -> format. So if Nova gets<br>
basic XML from virttuned, parses it into its object to let it set<br>
more fields and then formats it again, chances are it will have lost<br>
a bunch of stuff from virttuned. Of course if you know about this<br>
need upfront you can design the application such that it can safely<br>
round-trip, but this is just example of problem with integrating to<br>
existing apps.<br>
<br>
The other thing that concerns is that there are dependancies between<br>
different bits of XML for a given device. ie if feature X is set to<br>
a certain value, that prevents use of feature Y. So if virttuned<br>
sets feature X, but the downstream application uses feature Y, the<br>
final result can be incompatible. The application won't know this<br>
because it doesn't control what stuff virttuned would be setting.<br>
This can in turn cause ordering constraints.<br>
<br>
eg the application needs to say that virtio-net is being used, then<br>
virttuned can set some defaults like enabling vhost-net, and then<br>
the application can fill in more bits that it cares about. Or if<br>
we let virttuned go first, setting virtio-net model + vhost-net,<br>
then application wants to change model to e1000e, it has to be<br>
aware that it must now delete the vhost-net bit that virtuned<br>
added. This ends up being more complicated that just ignoring<br>
virttuned and coding up use of vhost-net in application code.<br>
<span><br>
<br>
> > This is the same kind of problem we faced wrt libvirt-gconfig and<br>
> > libvirt-gobject usage from virt-manager - it has an extensive code<br>
> > base that already works, and rewriting it to use something new<br>
> > is alot of work for no short-term benefit. libvirt-gconfig/gobject<br>
> > were supposed to be the "easy" bits for virt-manager to adopt, as<br>
> > they don't really include much logic that would step on virt-manager's<br>
> > toes. libvirt-designer was going to be a very opinionated library<br>
> > and in retrospective that makes it even harder to consider adopting<br>
> > it for usage in virt-manager, as it'll have signficant liklihood<br>
> > of making functionally significant changes in behaviour.<br>
> ><br>
><br>
> The initial idea (which I forgot to mention) was that all the decisions<br>
> libvirt currently does (so that it keeps the guest ABI stable) would be<br>
> moved into data (let's say some DSL) and it could then be switched or<br>
> adjusted if that's not what the mgmt app wants (on a per-definition<br>
> basis, of course). I didn't feel very optimistic about the upstream<br>
> acceptance for that idea, so I figured that there could be something<br>
> that lives beside libvirt, helps with some policies if requested and<br>
> then the resulting XML could be fed into libvirt for determining the<br>
> rest.<br>
<br>
</span>I can't even imagine how we would go about encoding the stable guest<br>
ABI logic libvirt does today in data !<br>
<span><br>
><br>
> > There's also the problem with use of native libraries that would<br>
> > impact many apps. We only got OpenStack to grudgingly allow the<br>
><br>
> By native you mean actual binary libraries or native to the OpenStack<br>
> code as in python module? Because what I had in mind for this project<br>
> was a python module with optional wrapper for REST API.<br>
<br>
</span>I meant native binary libraries. ie openstack is not happy in general<br>
with adding dependancies on new OS services, because there's a big<br>
time lag for getting them into all distros. By comparison a pure<br>
python library, they can just handle automatically in their deployment<br>
tools, just pip installing on any OS distro straight from pypi. This<br>
is what made use of libosinfo a hard sell in Nova.<br>
<br>
The same thing is seen with Go / Rust where some applications have<br>
decided they're better of actually re-implementing the libvirt RPC<br>
protocol in Go / Rust rather than use the libvirt.so client. I think<br>
this is a bad tradeoff in general, but I can see why they like it<br>
<span><br>
Regards,<br>
Daniel<br>
--<br>
|: <a href="https://berrange.com" rel="noreferrer" target="_blank">https://berrange.com</a> -o- <a href="https://www.flickr.com/photos/dberrange" rel="noreferrer" target="_blank">https://www.flickr.com/photos/<wbr>dberrange</a> :|<br>
|: <a href="https://libvirt.org" rel="noreferrer" target="_blank">https://libvirt.org</a> -o- <a href="https://fstop138.berrange.com" rel="noreferrer" target="_blank">https://fstop138.berrange.com</a> :|<br>
|: <a href="https://entangle-photo.org" rel="noreferrer" target="_blank">https://entangle-photo.org</a> -o- <a href="https://www.instagram.com/dberrange" rel="noreferrer" target="_blank">https://www.instagram.com/dber<wbr>range</a> :|<br>
</span>______________________________<wbr>_________________<br>
Devel mailing list<br>
<a href="mailto:Devel@ovirt.org" target="_blank">Devel@ovirt.org</a><br>
<a href="http://lists.ovirt.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.ovirt.org/mailman<wbr>/listinfo/devel</a><br>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div>