Bug 768919 - debian support
Summary: debian support
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: oVirt
Classification: Retired
Component: vdsm
Version: unspecified
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
: ---
Assignee: Dan Kenigsberg
QA Contact: yeylon@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-19 12:30 UTC by Matthias H
Modified: 2016-04-18 06:43 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-27 15:37:50 UTC
oVirt Team: ---


Attachments (Terms of Use)
First patch for debian systems (3.14 KB, patch)
2011-12-19 12:30 UTC, Matthias H
no flags Details | Diff
Second version of the patch for debian support (3.91 KB, patch)
2012-01-17 13:59 UTC, Matthias H
no flags Details | Diff

Description Matthias H 2011-12-19 12:30:52 UTC
Created attachment 548559 [details]
First patch for debian systems

Hi,

vdsm throws a lot of expections if it is not run on a Redhat or Redhat-equal system. I wrote a first patch to change this.

The patch is not fully done yet, because the "TBD" part needs some discussion.

There's a list of KEY_PACKAGES for vdsm that get checked for their version. I guess the whole array is forwareded to ovirt (correct me, if I'm wrong here). But not all KEY_PACKAGES have the same name in Debian as they do in RedHat.

KEY_PACKAGES are: (annotated do the packages in Debian)
* qemu-kvm (same name as in Debian)
* qemu-img (no such package in Debian. What does qemu-img do? Maybe it has a different name)
* vdsm (not yet packaged. But since this is a daemon it would be name vdsmd)
* spice-server (libspice-server1)
* libvirt (libvirt0)

I could write a translation list, but I consider this as a pretty dirty fix.

Comment 1 Ayal Baron 2011-12-19 16:05:00 UTC
(In reply to comment #0)
> Created attachment 548559 [details]
> First patch for debian systems
> 
> Hi,
> 
> vdsm throws a lot of expections if it is not run on a Redhat or Redhat-equal
> system. I wrote a first patch to change this.
> 
> The patch is not fully done yet, because the "TBD" part needs some discussion.
> 
> There's a list of KEY_PACKAGES for vdsm that get checked for their version. I
> guess the whole array is forwareded to ovirt (correct me, if I'm wrong here).

You are correct.

> But not all KEY_PACKAGES have the same name in Debian as they do in RedHat.
> 
> KEY_PACKAGES are: (annotated do the packages in Debian)
> * qemu-kvm (same name as in Debian)
> * qemu-img (no such package in Debian. What does qemu-img do? Maybe it has a
> different name)

Could be that it's bundled with qemu-kvm on debian.  qemu-img is a command line tool that manipulates disk images.
it is used for creation of a disk image, conversion of disk images (raw -> qcow2 and vice versa) creation of qcow2 files on top of backing files etc.

> * vdsm (not yet packaged. But since this is a daemon it would be name vdsmd)
> * spice-server (libspice-server1)
> * libvirt (libvirt0)
> 
> I could write a translation list, but I consider this as a pretty dirty fix.

How do other packages in debian solve these issues?

Comment 2 Matthias H 2011-12-20 14:05:32 UTC
(In reply to comment #1)
> Could be that it's bundled with qemu-kvm on debian.  qemu-img is a command line
> tool that manipulates disk images.
> it is used for creation of a disk image, conversion of disk images (raw ->
> qcow2 and vice versa) creation of qcow2 files on top of backing files etc.

Found it. qemu-img is in the package qemu-utils


> > * vdsm (not yet packaged. But since this is a daemon it would be name vdsmd)
> > * spice-server (libspice-server1)
> > * libvirt (libvirt0)
> > 
> > I could write a translation list, but I consider this as a pretty dirty fix.
> 
> How do other packages in debian solve these issues?

I don't know. And I have no knowledge of any program that checks for package versions like vdsm does it. But I'll ask some people from the Debian directly, maybe they've got an idea.

Comment 3 Ayal Baron 2011-12-22 21:55:34 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > Could be that it's bundled with qemu-kvm on debian.  qemu-img is a command line
> > tool that manipulates disk images.
> > it is used for creation of a disk image, conversion of disk images (raw ->
> > qcow2 and vice versa) creation of qcow2 files on top of backing files etc.
> 
> Found it. qemu-img is in the package qemu-utils
> 
> 
> > > * vdsm (not yet packaged. But since this is a daemon it would be name vdsmd)
> > > * spice-server (libspice-server1)
> > > * libvirt (libvirt0)
> > > 
> > > I could write a translation list, but I consider this as a pretty dirty fix.
> > 
> > How do other packages in debian solve these issues?
> 
> I don't know. And I have no knowledge of any program that checks for package
> versions like vdsm does it. But I'll ask some people from the Debian directly,
> maybe they've got an idea.

Great.  Once you get an answer, please post it here and put me on needinfo.
Thanks.

Comment 4 Matthias H 2011-12-23 12:58:33 UTC
(In reply to comment #3)
> Great.  Once you get an answer, please post it here and put me on needinfo.

Ok, I've asked around and nobody seems to have this problem before. At least I got a way to do solve this better than parsing the dpkg output. It was suggest to use python-apt with "except ImportError".

What I can do is to write a translation list that uses "static names".

Something like:

static name  | rpm          | deb              |
=============|==============|==================|
qemu-kvm     | qemu-kvm     | qemu-kvm         |
qemu-img     | qemu-img     | qemu-utils       |
vdsm         | vdsm         | vdsmd (sugg.)    |
spice-server | spice-server | libspice-server1 |
libvirt      | libvirt      | libvirt0         |

Luckily every static name equals the rpm package name, so the changes just have to be in the debian part.

Comment 5 Ayal Baron 2011-12-25 16:49:00 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > Great.  Once you get an answer, please post it here and put me on needinfo.
> 
> Ok, I've asked around and nobody seems to have this problem before. At least I

That sounds odd as it looks like debian changes package names on a regular basis (5/5 above, but also see: http://enricozini.org/2011/debian/distromatch/)

> got a way to do solve this better than parsing the dpkg output. It was suggest
> to use python-apt with "except ImportError".
> 
> What I can do is to write a translation list that uses "static names".
> 
> Something like:
> 
> static name  | rpm          | deb              |
> =============|==============|==================|
> qemu-kvm     | qemu-kvm     | qemu-kvm         |
> qemu-img     | qemu-img     | qemu-utils       |
> vdsm         | vdsm         | vdsmd (sugg.)    |
> spice-server | spice-server | libspice-server1 |
> libvirt      | libvirt      | libvirt0         |
> 
> Luckily every static name equals the rpm package name, so the changes just have
> to be in the debian part.

This is a packaging issue so I think this should be dealt with in debian's build for vdsm.  Saggi, any input on this?

Comment 6 Matthias H 2012-01-05 10:46:23 UTC
(In reply to comment #5)
> That sounds odd as it looks like debian changes package names on a regular
> basis (5/5 above, but also see: http://enricozini.org/2011/debian/distromatch/)

It's not as bad, as it sounds. It's something that happens every few years, not on a daily or monthly basis.

And if the name of a package changes they can still apply a patch while packaging vdsm (and notify upstream).


> This is a packaging issue so I think this should be dealt with in debian's
> build for vdsm.  Saggi, any input on this?

Well, it would be possible to write a patch that does that within the package (as mentioned above). But I'd like to see a solution in vdsm.

Distromatch looks not like it should be used in a daemon. Another solution would be to search the dpkg database for a binary or library (e.g. qemu-img), but sometimes library names change, too and searching takes a lot of time.

So I'd suggest I write a patch and "translate" the package names, like I presented in my last comment. Because none of the package names have changed in the last years.

Comment 7 Matthias H 2012-01-17 13:59:07 UTC
Created attachment 555784 [details]
Second version of the patch for debian support

I developed the patch further. Comments appreciated!

Comment 8 Matthias H 2012-01-17 15:27:01 UTC
Here's the commit to gerrit: http://gerrit.ovirt.org/1110

Comment 9 Matthias H 2012-02-27 15:37:50 UTC
I'm sorry, but I've got no time to develop the debian support any further. The patch should do the trick for now.

Therefore I'm closing this bugreport.


Note You need to log in before you can comment on or make changes to this bug.