Bug 1376116 - Vdsm install "api" package in the python global namespace
Summary: Vdsm install "api" package in the python global namespace
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: vdsm
Classification: oVirt
Component: Core
Version: 4.18.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ovirt-4.1.1
: 4.19.7
Assignee: Piotr Kliczewski
QA Contact: Petr Kubica
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-14 18:10 UTC by Nir Soffer
Modified: 2017-04-21 09:48 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-04-21 09:48:51 UTC
oVirt Team: Infra
Embargoed:
rule-engine: ovirt-4.1+
rule-engine: planning_ack+
oourfali: devel_ack+
pstehlik: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 67835 0 master MERGED api: move vdsmapi to lib 2017-02-16 17:03:26 UTC
oVirt gerrit 72496 0 ovirt-4.1 MERGED api: move vdsmapi to lib 2017-02-21 08:35:59 UTC

Description Nir Soffer 2016-09-14 18:10:56 UTC
Description of problem:

vdsm-api package is installed in:

    /usr/lib/python2.7/site-packages/api

This is not acceptable, vdsm cannot claim the api package for itself, and it
does not make sense for user of this library, having to import it like this:

    import api

The proper place for the vdsm-api package is under the vdsm package, so users 
will import it like this:

    from vdsm import api 

Version-Release number of selected component (if applicable):
Since the package was released (3.6?)

Since the package does not include useful code for users at this point,
it should be very easy to move it.

Comment 1 Dan Kenigsberg 2016-09-15 08:27:44 UTC
OUCH! it was unintentionally introduced by https://gerrit.ovirt.org/45750 and should be cleaned out quickly.

Comment 2 Oved Ourfali 2016-09-15 08:29:34 UTC
This should be handled in 4.0.z?

Comment 3 Dan Kenigsberg 2016-09-15 09:53:56 UTC
There's no immediate customer-related effect; it's just horribly ugly. It does not HAVE to be backported, but I surely won't object a backport.

Comment 4 Piotr Kliczewski 2016-11-09 14:27:02 UTC
I do not understand what is the issue here. We only install vdsmapi module there which is vdsm specific. Schemas are in different place.

Comment 5 Yaniv Bronhaim 2016-11-20 10:02:39 UTC
Nir, any updates?

Comment 6 Nir Soffer 2016-11-20 10:07:55 UTC
The description of the bug is very clear, it does not matter what is shipped in
the api package, but it cannot be installed as "api". It must be part of the vdsm
package (vdsm.api). Another uglier way is to rename it to vdsm_api.

Comment 7 Yaniv Bronhaim 2016-11-21 08:13:00 UTC
Moving to Piotr - please decide between you guys how you want the package to be installed and change the spec accordingly

Comment 8 Piotr Kliczewski 2016-11-21 08:41:32 UTC
We can move vdsmapi module which is the only vdsm specific thing. Other ideas need to stay there because they need to be used without vdsm.

Comment 9 Nir Soffer 2016-11-21 08:47:07 UTC
(In reply to Piotr Kliczewski from comment #8)
> We can move vdsmapi module which is the only vdsm specific thing. Other
> ideas need to stay there because they need to be used without vdsm.

moving api to vdsm.api does not mean it is part of the vdsm package. We can have:

vdsm.rpm - install vdsm/*
vdsm-api.rpm - install vdsm/api/*

If you install vdsm-api, you will get this directory layout:

    vdsm/
        api/
            ...

This is the nicest way to handle this. It will work best if all modules under vdsm are moved to vdsm.common.

Comment 10 Piotr Kliczewski 2016-11-21 08:52:19 UTC
(In reply to Nir Soffer from comment #9)
> (In reply to Piotr Kliczewski from comment #8)
> > We can move vdsmapi module which is the only vdsm specific thing. Other
> > ideas need to stay there because they need to be used without vdsm.
> 
> moving api to vdsm.api does not mean it is part of the vdsm package. We can
> have:
> 
> vdsm.rpm - install vdsm/*
> vdsm-api.rpm - install vdsm/api/*
> 
> If you install vdsm-api, you will get this directory layout:
> 
>     vdsm/
>         api/
>             ...
> 

This was exactly something which we did not want

Comment 11 Nir Soffer 2016-11-21 23:43:24 UTC
(In reply to Piotr Kliczewski from comment #10)
> > If you install vdsm-api, you will get this directory layout:
> > 
> >     vdsm/
> >         api/
> >             ...
> 
> This was exactly something which we did not want

Why?

Comment 12 Piotr Kliczewski 2016-11-22 08:11:12 UTC
Le's talk about it and stop this ping pong here.

The reason is to separate schemas from vdsm which should be used by the engine.

Comment 13 Martin Perina 2017-01-18 08:58:13 UTC
Missed RC build, moving to 4.1.1

Comment 14 Lukas Svaty 2017-04-04 14:27:03 UTC
proposing CodeChange

checked that its now under 
/usr/lib/python2.7/site-packages/vdsm/api/vdsmapi.py

thus moving to VERIFIED


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