[openstack-dev] Change in openstack/nova[master]: Moved headroom calculations into quota_reserve and modified ...

Ben Nemec openstack at nemebean.com
Wed Oct 9 17:17:04 UTC 2013


 

I'm copying openstack-dev for posterity and because smarter people than
me hang out there and might be able to answer any questions I can't. :-)


There are a couple of other dependencies you will need to install before
the test cases will run successfully (I always forget because my
development environments already have them). On Ubuntu you will need to
install at least libxslt-dev libmysqlclient-dev and the Fedora
equivalents would be libxslt-devel mariadb-devel. That should take care
of your first problem.

For the second problem I would double-check that the test is taking the
code path you expect. A lot of Nova code is called from multiple places,
so it's possible it is not getting to your new code in the way you
expect. It looks like the dependency is set up correctly so it should be
taking into account the first change. Being able to run tests locally
should help with this. :-) 

-Ben 

On 2013-10-09 11:59, Michael Bright wrote: 

> Thanks Ben, 
> 
> I had tried running run_tests.sh this morning before doing my first git review but there was an error in the setup - so I just relied on my own testing. 
> I got the same thing just now with tox: 
> sh: 1: mysql_config: not found 
> I tried putting a symlink as suggested somewhere on StackOverfow but this wasn't have been OpenStack/DevStack specific. 
> I'll shoot off a question about this on the "Ask question" page. 
> 
> However, I'd really like your advice on git-review. 
> 
> I'm down to a functional error with my last "review": https://review.openstack.org/#/c/50647/ [3] 
> but it looks to me like the problem which is occurring in compute/api,py (see traceback below) 
> is due to my db/sqlalchemy/api.py changes not having been taken into account. 
> 
> Yet, on the above page I see that the changes are in the Patch Set 2. 
> Any idea what I'm missing here? 
> 
> Thanks in advance, 
> Mike. 
> 
> P.S. I promise I'll read the Gerrit Workflow (!!) 
> 
> Patch Set 2
> 
> 02e2f033beaef5fd18dc60d7c793f8a28fb8161a (gitweb) [4]
> 
> Author
> 
> mjbright [5]<openstack at mjbright.net>Oct 9, 2013 3:49 PM 
> 
> Committer
> 
> mjbright [5]<openstack at mjbright.net>Oct 9, 2013 5:05 PM 
> 
> Parent(s)
> 
> e6fe472e96667327ae21c4afc7a804fbcd573634
> Moved headroom calculations into quota_reserve and modified headroom calculations to take into account -ve quota limits (unlimited) on cores and ram.
> 
> Download
> 
> checkoutpullcherry-pickpatch 
> Anonymous HTTPSSHHTTP 
> git fetch https://review.openstack.org/openstack/nova [6] refs/changes/47/50647/2 && git checkout FETCH_HEAD 
> 
> ReviewAbandon ChangeWork In ProgressRebase ChangeDiff All Side-by-SideDiff All Unified 
> 
> File Path
> Comments
> Size
> Diff
> Reviewed
> 
> Commit Message [7]
> 
> Side-by-Side [7]
> Unified [8]
> 
> M
> nova/db/sqlalchemy/api.py [9]
> 
> +12, -9
> Side-by-Side [9]
> Unified [10]
> 
> +12, -9
> 
> 2013-10-09 15:14:21.972 | Traceback (most recent call last):
> 2013-10-09 15:14:21.972 | File "nova/tests/api/openstack/compute/plugins/v3/test_servers.py", line 2256, in test_create_instance_above_quota_ram
> 2013-10-09 15:14:21.973 | self._do_test_create_instance_above_quota('ram', 2048, 10 * 1024, msg)
> 2013-10-09 15:14:21.973 | File "nova/tests/api/openstack/compute/plugins/v3/test_servers.py", line 2243, in _do_test_create_instance_above_quota
> 2013-10-09 15:14:21.973 | server = self.controller.create(self.req, self.body).obj['server']
> 2013-10-09 15:14:21.974 | File "nova/api/openstack/compute/plugins/v3/servers.py", line 799, in create
> 2013-10-09 15:14:21.974 | **create_kwargs)
> 2013-10-09 15:14:21.974 | File "nova/hooks.py", line 105, in inner
> 2013-10-09 15:14:21.974 | rv = f(*args, **kwargs)
> 2013-10-09 15:14:21.975 | File "nova/compute/api.py", line 1217, in create
> 2013-10-09 15:14:21.975 | legacy_bdm=legacy_bdm)
> 2013-10-09 15:14:21.975 | File "nova/compute/api.py", line 866, in _create_instance
> 2013-10-09 15:14:21.975 | block_device_mapping)
> 2013-10-09 15:14:21.975 | File "nova/compute/api.py", line 742, in _provision_instances
> 2013-10-09 15:14:21.976 | context, instance_type, min_count, max_count)
> 2013-10-09 15:14:21.976 | File "nova/compute/api.py", line 333, in _check_num_instances_quota
> 2013-10-09 15:14:21.976 | headroom = exc.kwargs['headroom']
> 2013-10-09 15:14:21.976 | KeyError: 'headroom'
> 
> On 9 October 2013 17:57, Ben Nemec (Code Review) <review at openstack.org> wrote:
> 
>> Ben Nemec has posted comments on this change.
>> 
>> Change subject: Moved headroom calculations into quota_reserve and modified headroom calculations to take into account -ve quota limits (unlimited) on cores and ram.
>> ......................................................................
>> 
>> Patch Set 2:
>> 
>> No problem, we all have to start somewhere. :-)
>> 
>> Also, you can run the unit tests locally by just running "tox" in the root of the Nova source code. You might have to install tox (I recommend using pip install to make sure you get the latest version), but after that it should take care of everything.
>> 
>> --
>> To view, visit https://review.openstack.org/50610 [1]
>> To unsubscribe, visit https://review.openstack.org/settings [2]
>> 
>> Gerrit-MessageType: comment
>> Gerrit-Change-Id: I5278475ea35d492d88cd64a99a46ecd990043837
>> Gerrit-PatchSet: 2
>> Gerrit-Project: openstack/nova
>> Gerrit-Branch: master
>> Gerrit-Owner: Mike BRIGHT <openstack at mjbright.net>
>> Gerrit-Reviewer: Ben Nemec <openstack at nemebean.com>
>> Gerrit-Reviewer: Jenkins
>> Gerrit-Reviewer: Mike BRIGHT <openstack at mjbright.net>
>> Gerrit-Reviewer: SmokeStack

 

Links:
------
[1] https://review.openstack.org/50610
[2] https://review.openstack.org/settings
[3] https://review.openstack.org/#/c/50647/
[4]
https://review.openstack.org/gitweb?p=openstack%2Fnova.git;a=commitdiff;h=02e2f033beaef5fd18dc60d7c793f8a28fb8161a
[5] https://review.openstack.org/#/dashboard/8979
[6] https://review.openstack.org/openstack/nova
[7] https://review.openstack.org/#/c/50647/2//COMMIT_MSG
[8] https://review.openstack.org/#/c/50647/2//COMMIT_MSG,unified
[9] https://review.openstack.org/#/c/50647/2/nova/db/sqlalchemy/api.py
[10]
https://review.openstack.org/#/c/50647/2/nova/db/sqlalchemy/api.py,unified
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20131009/17b1b71e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: blocked.gif
Type: image/gif
Size: 118 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20131009/17b1b71e/attachment.gif>


More information about the OpenStack-dev mailing list