[openstack-dev] [Nova] Requirements.txt and optional requirements

Sean Dague sean at dague.net
Tue Jan 27 15:12:29 UTC 2015


On 01/27/2015 12:18 AM, Silvan Kaiser wrote:
> Hello!
> Do dependencies required only in some contexts belong into requirements.txt?
> 
> Yesterday we had a short discussion on #openstack-nova regarding how to
> handle optional requirements. This was triggered by our quobyte nova
> driver (https://review.openstack.org/#/c/110722/18), who requires xattr,
> which we therefore added to requirements.txt (as it is provided by the
> requirements project).
> 
> Points from the discussion:
> - If we add this we will be adding every requirement for every component
> ---> this becomes to big.
> - Remove this requirement, no optional entries in requirements.txt, a
> 'deployer' has to know what dependencies the components he wants to use have
> ---> Usually he does not know and installation becomes more issue prone
> - Other (in between) ideas???
> 
> Please note that this has some urgency, the change set referenced above
> has been in review for months and i'm trying to react asap on comments
> but the deadline is approaching (next week) and if i have to do bigger
> changes I'd like to know as fast as possible...

Typically the answer is no. The libvirt volume driver architecture is
kind of weird in the fact that it doesn't actually split it's drivers
out into separate files, so there can be a file level boundry (including
loading) for these things.

That being said, in general, optional things are not in
requirements.txt. You will notice libvirt isn't even in
requirements.txt, because it's not a nova requirement.

Optional things should be handled in documentation at this point, and
the code should be structured to not fail when that's not installed if
it's not needed.

But, also, in staring at the code, I'm confused that xattr is used in
only 1 place, which is a fall back failure path. Seems like the code
could easily be redone to not need it, and get info from mount instead, no?

	-Sean

-- 
Sean Dague
http://dague.net

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 465 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20150127/02e0d63a/attachment.pgp>


More information about the OpenStack-dev mailing list