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

Jay Pipes jaypipes at gmail.com
Tue Jan 27 15:51:52 UTC 2015


On 01/27/2015 07:14 AM, Matt Riedemann wrote:
> On 1/27/2015 2: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...
>>
>> Best regards
>> SIlvan Kaiser
>>
>>
>> --
>> *Quobyte* GmbH
>> Boyenstr. 41 - 10115 Berlin-Mitte - Germany
>> +49-30-814 591 800 - www.quobyte.com <http://www.quobyte.com/>
>> Amtsgericht Berlin-Charlottenburg, HRB 149012B
>> management board: Dr. Felix Hupfeld, Dr. Björn Kolbeck, Dr. Jan Stender
>>
>>
>> __________________________________________________________________________
>>
>> 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
>>
>
> In my opinion the volume driver is optional and therefore the dependency
> is optional, it's all based on what the configuration is, the same as
> which DB or RPC backend you use, which is why those dependencies are in
> test-requirements.txt.
>
> While it's more obvious to a deployer that if you're going to configure
> Nova to use MySQL you need some MySQL packages to make it work, any
> deployer that's adding support for this volume driver should also
> probably be testing their deployment scripts, e.g. chef
> cookbooks/recipes, and if they haven't written their script correctly
> they'll find out that it blows up with an ImportError because of a
> missing xattr.  Otherwise, [1].

Couple things...

a) I agree with Sean and Matt here that this is an optional dependency 
and belongs in the deployment documentation and configuration management 
manifests.

b) The Glance API image cache can use xattr if SQLite is not desired 
[1], and Glance does *not* list xattr as a dependency in 
requirements.txt. Swift also has a dependency on python-xattr [2]. So, 
this particular Python library is not an unknown by any means.

c) Remember that even if you install python-xattr, that still doesn't 
mean it will automatically work. You still need to enable a filesystem 
that supports atime (i.e. noatime must not be set in fstab for the 
filesystem) [3]. Just an FYI.

Best,
-jay

[1] 
https://github.com/openstack/glance/blob/master/glance/image_cache/drivers/xattr.py
[2] https://github.com/openstack/swift/blob/master/requirements.txt#L11
[3] 
https://github.com/openstack/glance/blob/master/glance/image_cache/drivers/xattr.py#L23-L24



More information about the OpenStack-dev mailing list