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/
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)
Author
mjbright<openst...@mjbright.net>Oct 9, 2013 3:49 PM
Committer
mjbright<openst...@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
git fetch https://review.openstack.org/openstack/nova refs/changes/47/50647/2 && git checkout FETCH_HEAD
    File Path Comments Size Diff Reviewed
  Commit Message     Side-by-Side Unified  
  M nova/db/sqlalchemy/api.py   +12, -9 Side-by-Side Unified  
    +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) <rev...@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
To unsubscribe, visit https://review.openstack.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I5278475ea35d492d88cd64a99a46ecd990043837
Gerrit-PatchSet: 2
Gerrit-Project: openstack/nova
Gerrit-Branch: master
Gerrit-Owner: Mike BRIGHT <openst...@mjbright.net>
Gerrit-Reviewer: Ben Nemec <openst...@nemebean.com>
Gerrit-Reviewer: Jenkins
Gerrit-Reviewer: Mike BRIGHT <openst...@mjbright.net>
Gerrit-Reviewer: SmokeStack

 

 

_______________________________________________
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to