<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html><body style='font-family: Verdana,Geneva,sans-serif'>
<p>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. :-)</p>
<p>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 <code>libxslt-dev libmysqlclient-dev and the Fedora equivalents would be <code>libxslt-devel mariadb-devel</code>. That should take care of your first problem.<br /></code></p>
<p>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. :-)</p>
<p>-Ben</p>
<p>On 2013-10-09 11:59, Michael Bright wrote:</p>
<blockquote type="cite" style="padding-left:5px; border-left:#1010ff 2px solid; margin-left:5px"><!-- html ignored --><!-- head ignored --><!-- meta ignored -->
<div dir="ltr"><br />
<div>Thanks Ben,</div>
<div> </div>
<div>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.</div>
<div>I got the same thing just now with tox:</div>
<div> sh: 1: mysql_config: not found</div>
<div>I tried putting a symlink as suggested somewhere on StackOverfow but this wasn't have been OpenStack/DevStack specific.</div>
<div>I'll shoot off a question about this on the "Ask question" page.</div>
<div> </div>
<div>However, I'd really like your advice on git-review.</div>
<div> </div>
<div>I'm down to a functional error with my last "review": <a href="https://review.openstack.org/#/c/50647/">https://review.openstack.org/#/c/50647/</a></div>
<div>but it looks to me like the problem which is occurring in compute/api,py (see traceback below)</div>
<div>is due to my db/sqlalchemy/api.py changes not having been taken into account.</div>
<div> </div>
<div>Yet, on the above page I see that the changes are in the Patch Set 2.</div>
<div>Any idea what I'm missing here?</div>
<div> </div>
<div>Thanks in advance,</div>
<div>Mike.</div>
<div> </div>
<div>P.S. I promise I'll read the Gerrit Workflow (!!)</div>
<div> </div>
<div>
<table style="color: #000000; font-size: 15px;" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="font-size: small; vertical-align: top;" align="left" width="20px">
<table>
<tbody>
<tr>
<td style="font-weight: bold; white-space: nowrap; width: 16px;" align="center"><img style="width: 16px; height: 16px;" src="cid:305fbc9b0807ee86a53ec18b7aab7620@nemebean.com" alt="" border="0" /></td>
<td style="font-weight: bold; white-space: nowrap;">Patch Set 2</td>
</tr>
</tbody>
</table>
</td>
<td style="font-size: small; white-space: nowrap;"> <span style="padding-left: 20px; font-size: 8pt;">02e2f033beaef5fd18dc60d7c793f8a28fb8161a </span><a style="text-decoration: none; color: #0000aa; padding-left: 0.5em; font-size: 8pt;" href="https://review.openstack.org/gitweb?p=openstack%2Fnova.git;a=commitdiff;h=02e2f033beaef5fd18dc60d7c793f8a28fb8161a">(gitweb)</a></td>
</tr>
<tr>
<td style="font-size: small; vertical-align: top;" colspan="2" align="left">
<div style="padding: 0px; overflow: hidden;">
<div style="border-left-width: 3px; border-left-style: solid; border-left-color: #e3e3e3; padding: 4px 0px 4px 8px; margin-left: 10px; margin-bottom: 10px;">
<table style="margin-bottom: 10px; border-collapse: collapse; border-spacing: 0px;"><colgroup><col /><col /></colgroup>
<tbody>
<tr>
<td style="padding: 2px 4px 2px 6px; border-right-width: 1px; border-right-style: solid; border-right-color: #eef3f5; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #eef3f5; text-align: right; white-space: nowrap; border-top-width: 1px; border-top-style: solid; border-top-color: #eef3f5; background-color: #eef3f5; font-style: italic;">Author</td>
<td style="padding: 2px 4px 2px 6px; border-right-width: 1px; border-right-style: solid; border-right-color: #eef3f5; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #eef3f5; white-space: nowrap; border-top-width: 1px; border-top-style: solid; border-top-color: #eef3f5;">
<div><a style="text-decoration: none; color: #0000aa; background-image: none;" href="https://review.openstack.org/#/dashboard/8979">mjbright</a><span style="margin-left: 0.2em;"><<a href="mailto:openstack@mjbright.net">openstack@mjbright.net</a>></span><span style="margin-left: 0.2em;">Oct 9, 2013 3:49 PM</span></div>
</td>
</tr>
<tr>
<td style="padding: 2px 4px 2px 6px; border-right-width: 1px; border-right-style: solid; border-right-color: #eef3f5; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #eef3f5; text-align: right; white-space: nowrap; background-color: #eef3f5; font-style: italic;">Committer</td>
<td style="padding: 2px 4px 2px 6px; border-right-width: 1px; border-right-style: solid; border-right-color: #eef3f5; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #eef3f5; white-space: nowrap;">
<div><a style="text-decoration: none; color: #0000aa; background-image: none;" href="https://review.openstack.org/#/dashboard/8979">mjbright</a><span style="margin-left: 0.2em;"><<a href="mailto:openstack@mjbright.net">openstack@mjbright.net</a>></span><span style="margin-left: 0.2em;">Oct 9, 2013 5:05 PM</span></div>
</td>
</tr>
<tr>
<td style="padding: 2px 4px 2px 6px; border-right-width: 1px; border-right-style: solid; border-right-color: #eef3f5; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #eef3f5; text-align: right; white-space: nowrap; background-color: #eef3f5; font-style: italic;">Parent(s)</td>
<td style="padding: 2px 4px 2px 6px; border-right-width: 1px; border-right-style: solid; border-right-color: #eef3f5; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #eef3f5; white-space: nowrap;">
<table style="border-style: none; outline: 0px; padding: 0px; border-spacing: 0px; font-size: 10px;"><colgroup><col /><col /></colgroup>
<tbody>
<tr>
<td style="padding: 2px 4px 2px 0px; border: none;"><span>e6fe472e96667327ae21c4afc7a804fbcd573634</span></td>
<td style="font-size: small; padding: 2px 4px 2px 6px; border: none;"><span>Moved headroom calculations into quota_reserve and modified headroom calculations to take into account -ve quota limits (unlimited) on cores and ram.</span></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td style="padding: 2px 4px 2px 6px; border-right-width: 1px; border-right-style: solid; border-right-color: #eef3f5; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #eef3f5; text-align: right; white-space: nowrap; background-color: #eef3f5; font-style: italic;">Download</td>
<td style="padding: 0px; border-right-width: 1px; border-right-style: solid; border-right-color: #eef3f5; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #eef3f5; white-space: nowrap;">
<div style="background-color: #eef3f5; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #000000;">
<div style="display: inline;"><a style="color: #0000aa; background-color: #d1e6ea; border-right-width: 1px; border-right-style: solid; border-right-color: #000000; padding-left: 0.5em; padding-right: 0.5em;">checkout</a><a style="color: #0000aa; border-right-width: 1px; border-right-style: solid; border-right-color: #000000; padding-left: 0.5em; padding-right: 0.5em;">pull</a><a style="color: #0000aa; border-right-width: 1px; border-right-style: solid; border-right-color: #000000; padding-left: 0.5em; padding-right: 0.5em;">cherry-pick</a><a style="color: #0000aa; border-right-width: 1px; border-right-style: solid; border-right-color: #000000; padding-left: 0.5em; padding-right: 0.5em;">patch</a></div>
<span style="margin-left: 5em;"></span>
<div style="display: inline;"><a style="color: #0000aa; background-color: #d1e6ea; border-right-width: 1px; border-right-style: solid; border-right-color: #000000; padding-left: 0.5em; padding-right: 0.5em;">Anonymous HTTP</a><a style="color: #0000aa; border-right-width: 1px; border-right-style: solid; border-right-color: #000000; padding-left: 0.5em; padding-right: 0.5em;">SSH</a><a style="color: #0000aa; border-right-width: 1px; border-right-style: solid; border-right-color: #000000; padding-left: 0.5em; padding-right: 0.5em;">HTTP</a></div>
</div>
<div style="white-space: pre; font-size: 12px; margin-left: 0.5em; margin-right: 0.5em;"><span style="vertical-align: top;">git fetch <a href="https://review.openstack.org/openstack/nova">https://review.openstack.org/openstack/nova</a> refs/changes/47/50647/2 && git checkout FETCH_HEAD</span><span style="margin-left: 5px;"></span></div>
</td>
</tr>
</tbody>
</table>
<div style="margin-bottom: 10px;"><button style="margin: 0px 30px 0px 0px; padding: 3px 5px; font-size: 8pt; border-width: 1px; border-color: #cccccc; white-space: nowrap; color: #000000; background-repeat: repeat no-repeat;" type="button">Review</button><button style="margin: 0px 30px 0px 0px; padding: 3px 5px; font-size: 8pt; border-width: 1px; border-color: #cccccc; white-space: nowrap; color: #000000; background-repeat: repeat no-repeat;" type="button">Abandon Change</button><button style="margin: 0px 30px 0px 0px; padding: 3px 5px; font-size: 8pt; border-width: 1px; border-color: #cccccc; white-space: nowrap; color: #000000; background-repeat: repeat no-repeat;" type="button">Work In Progress</button><button style="margin: 0px 30px 0px 0px; padding: 3px 5px; font-size: 8pt; border-width: 1px; border-color: #cccccc; white-space: nowrap; color: #000000; background-repeat: repeat no-repeat;" type="button">Rebase Change</button><button style="margin: 0px 30px 0px 0px; padding: 3px 5px; font-size: 8pt; border-width: 1px; border-color: #cccccc; white-space: nowrap; color: #000000; background-repeat: repeat no-repeat;" type="button">Diff All Side-by-Side</button><button style="margin: 0px 30px 0px 0px; padding: 3px 5px; font-size: 8pt; border-width: 1px; border-color: #cccccc; white-space: nowrap; color: #000000; background-repeat: repeat no-repeat;" type="button">Diff All Unified</button></div>
<div>
<table style="border-spacing: 0px; width: 1217px;"><colgroup><col /></colgroup>
<tbody>
<tr>
<td style="border-left-width: 1px; border-left-style: solid; border-left-color: #eef3f5; border-top-width: 1px; border-top-style: solid; border-top-color: #ffffff; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #ffffff; background-color: #eef3f5;"> </td>
<td style="border-top-width: 1px; border-top-style: solid; border-top-color: #ffffff; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #ffffff; background-color: #eef3f5;"> </td>
<td style="border: 1px solid rgb; padding: 2px 6px 1px; background-color: #eef3f5; font-style: italic; white-space: nowrap; color: #264d69;">File Path</td>
<td style="border: 1px solid rgb; padding: 2px 6px 1px; background-color: #eef3f5; font-style: italic; white-space: nowrap; color: #264d69;">Comments</td>
<td style="border: 1px solid rgb; padding: 2px 6px 1px; background-color: #eef3f5; font-style: italic; white-space: nowrap; color: #264d69;">Size</td>
<td style="border: 1px solid rgb; padding: 2px 6px 1px; background-color: #eef3f5; font-style: italic; white-space: nowrap; color: #264d69;" colspan="3">Diff</td>
<td style="border: 1px solid rgb; background-color: #eef3f5; padding: 2px 6px 1px; font-style: italic; white-space: nowrap; color: #264d69;">Reviewed</td>
</tr>
<tr style="background-color: #f5f5ff;">
<td style="width: 1px; padding: 0px; vertical-align: middle; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #eef3f5; border-left-width: 1px; border-left-style: solid; border-left-color: #eef3f5;"><img style="width: 12px; height: 9px;" src="cid:305fbc9b0807ee86a53ec18b7aab7620@nemebean.com" alt="" border="0" /></td>
<td style="width: 1px; padding-left: 5px; padding-right: 5px; border-right-width: 1px; border-right-style: solid; border-right-color: #eef3f5; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #eef3f5; vertical-align: top;"> </td>
<td style="white-space: nowrap; padding-left: 5px; padding-right: 5px; border-right-width: 1px; border-right-style: solid; border-right-color: #eef3f5; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #eef3f5;"><a style="text-decoration: none; color: #0000aa; background-image: none;" href="https://review.openstack.org/#/c/50647/2//COMMIT_MSG">Commit Message</a></td>
<td style="text-align: right; font-weight: bold; white-space: nowrap; padding-left: 5px; padding-right: 5px; border-right-width: 1px; border-right-style: solid; border-right-color: #eef3f5; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #eef3f5;"> </td>
<td style="text-align: right; white-space: nowrap; padding-left: 5px; padding-right: 5px; border-right-width: 1px; border-right-style: solid; border-right-color: #eef3f5; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #eef3f5;"> </td>
<td style="white-space: nowrap; padding-left: 5px; padding-right: 5px; border-right-width: 1px; border-right-style: solid; border-right-color: #eef3f5; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #eef3f5;" colspan="2"><a style="text-decoration: none; color: #0000aa; background-image: none;" href="https://review.openstack.org/#/c/50647/2//COMMIT_MSG">Side-by-Side</a></td>
<td style="white-space: nowrap; padding-left: 5px; padding-right: 5px; border-right-width: 1px; border-right-style: solid; border-right-color: #eef3f5; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #eef3f5;" colspan="1"><a style="text-decoration: none; color: #0000aa; background-image: none;" href="https://review.openstack.org/#/c/50647/2//COMMIT_MSG,unified">Unified</a></td>
<td style="padding-left: 5px; padding-right: 5px; border-right-width: 1px; border-right-style: solid; border-right-color: #eef3f5; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #eef3f5;"> </td>
</tr>
<tr>
<td style="width: 1px; padding: 0px; vertical-align: middle; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #eef3f5; border-left-width: 1px; border-left-style: solid; border-left-color: #eef3f5;"> </td>
<td style="width: 1px; padding-left: 5px; padding-right: 5px; border-right-width: 1px; border-right-style: solid; border-right-color: #eef3f5; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #eef3f5; vertical-align: top;">M</td>
<td style="white-space: nowrap; padding-left: 5px; padding-right: 5px; border-right-width: 1px; border-right-style: solid; border-right-color: #eef3f5; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #eef3f5;"><a style="text-decoration: none; color: #0000aa; background-image: none;" href="https://review.openstack.org/#/c/50647/2/nova/db/sqlalchemy/api.py">nova/db/sqlalchemy/api.py</a></td>
<td style="text-align: right; font-weight: bold; white-space: nowrap; padding-left: 5px; padding-right: 5px; border-right-width: 1px; border-right-style: solid; border-right-color: #eef3f5; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #eef3f5;"> </td>
<td style="text-align: right; white-space: nowrap; padding-left: 5px; padding-right: 5px; border-right-width: 1px; border-right-style: solid; border-right-color: #eef3f5; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #eef3f5;">+12, -9</td>
<td style="white-space: nowrap; padding-left: 5px; padding-right: 5px; border-right-width: 1px; border-right-style: solid; border-right-color: #eef3f5; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #eef3f5;" colspan="2"><a style="text-decoration: none; color: #0000aa; background-image: none;" href="https://review.openstack.org/#/c/50647/2/nova/db/sqlalchemy/api.py">Side-by-Side</a></td>
<td style="white-space: nowrap; padding-left: 5px; padding-right: 5px; border-right-width: 1px; border-right-style: solid; border-right-color: #eef3f5; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #eef3f5;" colspan="1"><a style="text-decoration: none; color: #0000aa; background-image: none;" href="https://review.openstack.org/#/c/50647/2/nova/db/sqlalchemy/api.py,unified">Unified</a></td>
<td style="padding-left: 5px; padding-right: 5px; border-right-width: 1px; border-right-style: solid; border-right-color: #eef3f5; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #eef3f5;"> </td>
</tr>
<tr style="background-color: #f5f5ff;">
<td style="width: 1px; padding: 0px; vertical-align: middle; border: none;"> </td>
<td colspan="3"> </td>
<td style="text-align: right; white-space: nowrap; border-left-width: 1px; border-left-style: solid; border-left-color: #eef3f5; padding-left: 5px; padding-right: 5px; border-right-width: 1px; border-right-style: solid; border-right-color: #eef3f5; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #eef3f5;">+12, -9<br /><br /><br /></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<pre style="color: #000000;">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'
</pre>
</div>
<div> </div>
</div>
<div class="gmail_extra"><br /><br />
<div class="gmail_quote">On 9 October 2013 17:57, Ben Nemec (Code Review) <span><<a href="mailto:review@openstack.org">review@openstack.org</a>></span> wrote:<br />
<blockquote class="gmail_quote" style="margin: 0 0 0 .8ex; border-left: 1px #ccc solid; padding-left: 1ex;">
<div class="im">Ben Nemec has posted comments on this change.<br /><br /> Change subject: Moved headroom calculations into quota_reserve and modified headroom calculations to take into account -ve quota limits (unlimited) on cores and ram.<br /> ......................................................................<br /><br /><br /> Patch Set 2:<br /><br /></div>
No problem, we all have to start somewhere. :-)<br /><br /> 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.<br />
<div class="HOEnZb">
<div class="h5"><br /> --<br /> To view, visit <a href="https://review.openstack.org/50610">https://review.openstack.org/50610</a><br /> To unsubscribe, visit <a href="https://review.openstack.org/settings">https://review.openstack.org/settings</a><br /><br /> Gerrit-MessageType: comment<br /> Gerrit-Change-Id: I5278475ea35d492d88cd64a99a46ecd990043837<br /> Gerrit-PatchSet: 2<br /> Gerrit-Project: openstack/nova<br /> Gerrit-Branch: master<br /> Gerrit-Owner: Mike BRIGHT <<a href="mailto:openstack@mjbright.net">openstack@mjbright.net</a>><br /> Gerrit-Reviewer: Ben Nemec <<a href="mailto:openstack@nemebean.com">openstack@nemebean.com</a>><br /> Gerrit-Reviewer: Jenkins<br /> Gerrit-Reviewer: Mike BRIGHT <<a href="mailto:openstack@mjbright.net">openstack@mjbright.net</a>><br /> Gerrit-Reviewer: SmokeStack</div>
</div>
</blockquote>
</div>
</div>
</blockquote>
<p> </p>
<div> </div>
</body></html>