[openstack-dev] [trove][sahara][infra][Octavia][manila] discussion of image building in Trove

Ethan Gafford egafford at redhat.com
Wed May 4 16:57:53 UTC 2016


On Wed, May 4, 2016 at 11:55 AM, Flavio Percoco <flavio at redhat.com> wrote:

> On 04/05/16 15:05 +0000, Amrith Kumar wrote:
>
>> I'm emailing the ML on the subject of a review ongoing in the Trove
>> project regarding image building[1].
>>
>> TL;DR
>>
>> One of the most frequent questions that new users of Trove ask is how and
>> where to get guest images with which to experiment with Trove, and how to
>> build these images for themselves. While documentation about this exists in
>> multiple places (including [2], [3]) this is still something that can do
>> with some improvement.
>>
>> Trove currently uses diskimage-builder for building images used in
>> testing the product and these can serve as a good basis for anyone wishing
>> to build an image for their own use of Trove. The review [1] makes the
>> argument for the libguestfs based approach to building images and advocates
>> that Trove should use this instead of diskimage-builder.
>>
>
> At the summit we discussed the possibility of providing an implementation
> that
> would allow for both DIB and libguestfs to be used but to give priority to
> DIB.
> Since there's no real intention of just switching tools at this point, I
> believe
> it'd be good to amend the spec so that it doesn't mention libguestfs
> should be
> used instead of DiB.
>
> The goal at this stage is to provide both and help these move forward.
>
> I believe that a broader discussion of this is required and I appreciate
>> Greg Haynes' proposal at the design summit to have this discussion on the
>> ML. I took the action item to bring this discussion to the ML.
>>
>> Details follow ...
>>
>> Before going further, I will state my views on these matters.
>>
>> 1. It is important for the Trove project to do things quickly to make it
>> easier for end users who wish to use Trove and who wish to build their own
>> images. I am not concerned what tool or tools a person will use to build
>> these images.
>>
>> 2. If we provide multiple alternatives to image building as part of the
>> Trove project, we should make sure that images built with all sets of tools
>> are equivalent and usable interchangeably. Failing to do this will make it
>> harder for users to use Trove because we will be providing them with a
>> false choice (i.e. the alternatives aren't really alternatives). This is
>> harder than it sounds given the combination of tools, operating systems,
>> and the source(s) from which you can get database software.
>>
>
> Maintaining both in the long run will be harder especially because, as you
> mentioned, the output must be usable interchangeably. However, I think
> we're at
> a point, based on the comments in [1] made by Pino Toscano, Luigi Toscano
> and
> some other folks that it'd be beneficial for us to have this discussion
> and to
> also experiment/test other options.
>
> The Sahara team seems to be going in a direction that differs with the one
> used
> by the infra team and the one we're headed to (although they overlap in
> some
> areas).
>

Sahara has support for several image generation-related cases:
1) Packing an image pre-cluster spawn in Nova.
2) Building clusters from a "clean" OS image post-Nova spawn, by
downloading and installing Hadoop/Spark/Storm/WhatHaveYou.
3) Validating images after Nova spawn (to ensure that they're up to spec
for the plugin in question.)

Because of this, we are pulling image generation logic into the plugins
themselves, from a monolithic sahara-image-elements repository. This will
aid us in our eventual hope to pull plugins out of the Sahara tree
entirely; more immediately, it will allow us to define logic for all of
these cases in one place, written eventually in Python. In our Sahara
session at summit, which was also attended by several members of the Ironic
team (thanks all), we discussed our current plan to use libguestfs rather
than DIB as our toolchain; our intent to define a linear, idempotent set of
steps to pack images for any plugin lends itself much more neatly to
libguestfs' API than to DIB's.


> 3. Trove already has elements for all supported databases using DIB in the
>> trove-integration project but these elements are not packaged for customer
>> use. Making them usable by customers is a relatively small effort including
>> providing a wrapper script (derived from redstack[4]) and providing an
>> element to install the guest agent software from a fixed location in
>> addition to the development and testing version that is better suited to
>> Trove development [5] and [6].
>>
>> 4. My comments on various patch sets in the review[1].
>>
>> I agree with Monty and Greg Haynes that we should understand the
>> deficiencies if any in DIB, and if it is in fact the case that they are
>> "intractable/unsolvable", we should switch toolchains. This discussion
>> should include issues faced by the Trove team as well as other teams that
>> may have faced problems with DIB (such as the sahara team who described
>> some of them in the past).
>>
>
> ++
>
> Agreed with the above. I'm think collaboration should be the preferred
> way. I
> don't think I've enough technical insight on this topic to provide a
> detailed
> list of things that are good/bad on either of these tools but I wanted to
> mention that I believe providing support for both in the short run is good
> for
> us and it helps to make a better decision on what tool works best for the
> project.
>
> There's someone willing to do the job and spend sometime doing the
> research.
> This same person will provide feedback in addition to the one already
> provided
> in [1].
>
>
Beyond that, the Sahara team has certainly seen profound difficulty in the
field when customers attempt to generate their own images, and even for
Sahara cores, building images is occasionally quite harrowing. These issues
are seldom based on real issues in the scripts themselves, but are
frequently the result of bleed between the host and guest; when these
issues occur for a customer, they become extremely difficult to diagnose
remotely. Still, it's entirely possible that DIB has answers to these
problems, and it'd be a universal good to identify real flaws in DIB, or
just to educate the uninitiated into how DIB can be made to work more
cleanly if the features are already there (which they may well be; far be
it from me to claim exhaustive mastery of DIB.) The technical reasons we
like libguestfs over DIB are:

1) Libguestfs manipulates images in a clean helper VM created by libguestfs
in a predictable way. As such, no mounts are made on the host, no scripts
can affect the host system, and no variables on the host system are likely
to affect the image packing process. See
http://libguestfs.org/guestfs-security.1.html for information on libguestfs
security.
2) In-place image manipulation means that relatively minor changes to
images (package installs, conf declaration, etc.) can occur swiftly, and
subsequent changes can occur without uncompressing and recompressing an
entire image.
3) DIB scripts' configuration settings, passed in freeform environment
variables, can be difficult to understand and document for new users.
Libguestfs' API demands more formal parameter passing, reducing the
likelihood of accidental misconfiguration.

I'm heartened that we're having this discussion: user-facing image packing
tools are a critical part of any application-tier provisioning service, and
cleaning our upstream image gen processes will be even more crucial as
these projects mature and their support matrices grow.

Cheers,
-Egafford

Sorry for not providing much technical details now but I did want to share
> the
> above. Thanks for starting this thread, I believe this discussion in the
> ML will
> be beneficial.
>
> Flavio
>
>
> Thanks,
>>
>> -amrith
>>
>>
>> [1] https://review.openstack.org/#/c/295274/
>> [2]
>> http://docs.openstack.org/developer/trove/dev/building_guest_images.html
>> [3]
>> https://git.openstack.org/cgit/openstack/diskimage-builder/tree/README.rst#writing-an-element
>> [4]
>> http://git.openstack.org/cgit/openstack/trove-integration/tree/scripts/redstack
>> [5]
>> http://git.openstack.org/cgit/openstack/trove-integration/tree/scripts/files/trove-guest.systemd.conf
>> [6]
>> http://git.openstack.org/cgit/openstack/trove-integration/tree/scripts/files/trove-guest.upstart.conf
>>
>> __________________________________________________________________________
>> OpenStack Development Mailing List (not for usage questions)
>> Unsubscribe:
>> OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>
>
> --
> @flaper87
> Flavio Percoco
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20160504/66d7c867/attachment.html>


More information about the OpenStack-dev mailing list