← Back to team overview

openstack team mailing list archive

Re: [devstack] Easing maintenance of list of distro packages to install

 

Everyone should really check out...

https://github.com/yahoo/Openstack-Anvil/tree/master/conf/distros

It is nice to have a standard yaml format that isn't a new micro-custom-format that we have to figure out how to parse.

In fact I think there is an open work-item to centralize this and make it better for all...

https://bugs.launchpad.net/openstack-common/+bug/995607

I think that bug is a good start, but not far enough, a lot of openstack dependences on system level libraries as well, so we need to track those if we can, and not just the pypi/python ones, or at least have a list of known working system level libraries to reference.

On 6/20/12 4:05 AM, "Ghe Rivero" <ghe.rivero@xxxxxxxxxxxx> wrote:



On Wed, Jun 20, 2012 at 12:24 PM, Daniel P. Berrange <berrange@xxxxxxxxxx> wrote:
On Wed, Jun 20, 2012 at 12:06:46PM +0200, Vincent Untz wrote:
> Hi,
>
> In devstack, we currently have two separate lists of packages to
> install: one for Ubuntu (in files/apts/) and one for Fedora (in
> files/rpms/).
>
> This has two issues:
>
>  - this leads to incomplete updates for dependencies. It happens that
>    someone updates the apts files but not the rpms ones. (shameless
>    plug: https://review.openstack.org/#/c/8475/ needs some review love)
>
>  - this just doesn't scale when adding support for another distro,
>    especially as rpm-based distros don't all share the same package
>    names (hence files/rpms/ cannot really be shared).
>
> I'd like us to move to a new scheme where we have one list of packages
> (say the Ubuntu one, for instance) and instead of adding another one
> Fedora, openSUSE, etc., we have translation tables to map package names
> from Ubuntu to other distros.
>
> Supporting a new distro is then a matter of adding a translation table
> (+ hacking the code to change the right config files, obviously), and we
> can easily add tests to make sure the translation tables contain a
> mapping for each package (and therefore fix the first issue).
>
> I already have some working code for that, but I want to check if people
> are fine with the idea before submitting it for review.

I've nothing against your proposal & certainly the motivation is
good, but thought I'd throw out an alternative idea just in case

Instead of having one sub-dir per package/distro, just have a
single (CSV/JSON/XML/whatever) file listing all distros in the
same place

eg a CSV file where the first column is the generic name, and
other columns are the distro-specific names (if required). The
distro specific column would be empty if the generic name applied
without change, or '-' if the package was not applicable to the
distro at all.

  # cat nova.csv
  Package,Ubuntu,Fedora,RHEL,SUSE
  python-devel,,,,,,
  libvirt,libvirt-bin,,,,,
  dnsmasq-base,,-,-,,
  dnsmasq-utils,,,,,,,

Hmm, using JSON would actually be a bit more readable.

The core idea is to have all the data, both the master list and
distro mappings in one clear place.

We should keep in mind also that not all the packages have an equivalent in all the distros: sometimes one single package is splitted in several in other distros, or it doesn't exist at all. CSV would be not truly manageable, but having everything in one single place would be easier if any update is necessary.  JSON can be a good candidate but, in the case of nova (46 packages right now), would have to see if we don't get "spaghetti" code difficult to deal with.

Follow ups

References