Commit Graph

650 Commits

Author SHA1 Message Date
Andrey Volkov 90cabd0c8c [placement] Fix placement-api-ref check tool
Some time ago the placement-api-ref source structure was changed
(Ia2fd62ae7f401cad34ee7c2b355c9a5ab1c93f6b) to use inc-files istead of
putting all in index.rst, but that change broke placement_api_docs.py.

This change modifies placement_api_docs.py to go through all *.inc files
in placement-api-ref directory and scan for the "rest method" header.

Change-Id: I60150ab51173934f848662499dcf6af18625697e
2017-05-24 12:15:28 +03:00
Jenkins 4613b33674 Merge "Structure for simply managing placement-api-ref" 2017-03-24 20:17:52 +00:00
Chris Dent 8c59991363 Structure for simply managing placement-api-ref
This consists of a duplicate of the [nova-]api-ref setup and
conf.py along with tooling to fail the tox -edocs target when
a route that is defined in
nova.api.openstack.placement.handler.ROUTE_DECLARATIONS is not
present in placement-api-ref/source/index.rst.
tools/placement_api_docs.py will report which routes are missing.

Though completely gameable (as demonstrated in the current lame
index.rst) it's better than nothing and provides some useful
structuring on what to do next. It's also the case that the 'docs'
target in tox is not part of gating.

The response for GET / is in place with the necessary
parameters.yaml for it to be correctly described. The 'get-root.json'
file provides the JSON of the expected response. The expectation is
that later commits will add information for other urls and their
JSON files will be named method-path-separated-by-dash.json with a
request/response qualifier as necessary.

Followup patches will add other routes.

A new parameters.yaml is used instead of reusing the one from
api-ref as there isn't a lot of expected overlap and having a
separate file will ease eventual extraction.

Running tox -eplacement-api-ref will generate the docs for review,
with output in placement-api-ref/build/html/index.html.

This will be hooked up with CI to deploy the generated docs,
eventually.

Change-Id: Ifb4d91d39db0e49b55952e37cdfc9f63dcd37aa3
2017-03-24 15:15:53 +03:00
Jenkins e3eac21382 Merge "More usage of ostestr and cleanup an unused dependency" 2017-03-20 16:04:47 +00:00
ChangBo Guo(gcb) 6b73c281bc Remove usage of config option verbose
oslo.log deprecate config option verbose since aug 1, 2015 in review:
in https://review.openstack.org/#/c/206437/

That was a long time ago so it should be possible to remove it now. This
was already merged once but had to be reverted because some projects
were still relying on it. Oslo team plan to remove it, so we need clean
up its usage before removing it.

Closes-Bug: #1663570

Change-Id: I072e1078486f50cebea92695ff46c1af879eb23d
2017-02-27 10:02:45 +08:00
Luigi Toscano 8e34aece1a More usage of ostestr and cleanup an unused dependency
Use ostestr as runner instead of the custome pretty_tox.sh script
(pretty much removed everywhere). pretty_tox3.sh is just a wrapper
for ostestr but it could be probably removed as well going forward.
Also remove the tempest-lib dependency, which originally provided
subunit-trace (now from os-testr).

Change-Id: I4390964ce83167d634b80f696e82a0e199582ce6
2017-02-23 18:25:08 +01:00
Jenkins a026af51dc Merge "tools: Remove 'colorizer'" 2017-02-23 12:42:44 +00:00
Jenkins 71f92d4f3a Merge "tools: Remove 'with_venv'" 2017-02-23 12:42:17 +00:00
Jenkins b6c32ade17 Merge "tools: Remove 'install_venv', 'install_venv_common'" 2017-02-23 12:41:45 +00:00
Jenkins 3cd849a162 Merge "tools: Remove 'clean-vlans'" 2017-02-23 12:41:19 +00:00
Jenkins 1b5cbe3c95 Merge "tools: Remove 'enable-pre-commit-hook'" 2017-02-23 12:37:32 +00:00
Andreas Jaeger d60dffc6be Prepare for using standard python tests
Add simple script to setup mysql and postgresql databases, this script
can be run by users during testing and will be run by CI systems for
specific setup before running unit tests. This is exactly what is
currently done by OpenStack CI in project-config.

This allows to change in project-config the python-db jobs to
python-jobs since python-jobs will call this script initially.

See also
http://lists.openstack.org/pipermail/openstack-dev/2016-November/107784.html

Update devref for this.

Needed-By: Iea42a0525b2c5a5cdbf8604eb23a6e7b029f6b48
Change-Id: Ie9bae659077dbe299eea131572117036065bdccf
2017-02-09 17:52:55 +00:00
Huan Xie 062065ca9e XenAPI Use os-xenapi lib for nova
XenServer has released os-xenapi lib on pypi, this patch is to
use os-xenapi in nova project. In this patch, we only change
the usage of XenAPI to os-xenapi and fix unit tests. In the next
patch, we will delete those unused files.

Partially-Implements: blueprint add-os-xenapi-library

Depends-On: Ic327135b893a77672fd42af919f47f181e932773

Change-Id: I424dfcd507c4b7fbeea5245cc1c234dec01d5781
2017-01-10 17:26:23 -08:00
Sean Dague 95441ef896 move gate hooks to gate/
We prevent a lot of tests from getting run on tools/ changes given
that most of that is unrelated to running any tests. By having the
gate hooks in that directory it made for somewhat odd separation of
what is test sensitive and what is not.

This moves things to the gate/ top level directory, and puts a symlink
in place to handle project-config compatibility until that can be
updated.

Change-Id: Iec9e89f0380256c1ae8df2d19c547d67bbdebd65
2017-01-04 11:05:16 +00:00
Stephen Finucane 08009b3485 tools: Remove 'colorizer'
This was used by the 'run_tests.sh' script, which has long since been
removed. There appears to be something similar built into ostestr [1]
should people care about this (I suspect they don't).

[1] https://github.com/openstack/os-testr/blob/0.8.0/os_testr/utils/colorizer.py

Change-Id: I5634b3f75fa2b392a2f49a61b7b46a299bbcd2fd
2017-01-04 11:04:39 +00:00
Stephen Finucane 98b9001a7b tools: Remove 'with_venv'
Nothing appears to use this any more. No point in keeping it around.

Change-Id: I7150c78f55fd2eb639ed85c868d38461219fda12
2017-01-04 10:45:41 +00:00
Stephen Finucane 4559faffd9 tools: Remove 'install_venv', 'install_venv_common'
tox has long since usurped this as the preferred approach to development
and testing.

Change-Id: I4baa1688b88135b71e1e04b4aede6d6d0197504b
2017-01-04 10:45:41 +00:00
Stephen Finucane 4404ffa109 tools: Remove 'clean-vlans'
Whatever function this script served in the past, it has long outlived
its usefulness in the age of neutron.

Change-Id: I0e5b0e0a49ee26bddbfce456aa91ffe78f62f34d
2017-01-04 10:45:41 +00:00
Stephen Finucane 0fc1fc5655 tools: Remove 'enable-pre-commit-hook'
This relies on the 'run_tests.sh' script, which has long since been
removed. git-review will do this for us so there's not much point in
keeping this around now.

Change-Id: Ie3edfa1cefeea94c36cf5646fcfae6ad4b3d8d84
2017-01-04 10:45:36 +00:00
ChangBo Guo(gcb) 2738e25f7e Add Python 3.5 functional tests in tox.ini
Add Python 3.5 functional tests tox envlist, this is
needed by python 3.5 functional tests Jenkins job.

Change-Id: I1bba877fcc2c1f2140cbbba2bc6e6c20d7972615
2016-12-14 13:33:07 +08:00
Jenkins fa4dc18e41 Merge "Add Apache 2.0 license to source file" 2016-10-10 12:38:13 +00:00
Jenkins 290c31beaa Merge "Make releasenotes reminder detect added and untracked notes" 2016-10-06 19:55:00 +00:00
Dan Smith 85bf71b2ae Make db archival return a meaningful result code
This helps with automating to know when it's done. Update our own
post-test-hook to use it.

Change-Id: I61c3b187edab3e0e612470735eecd2db59028413
2016-09-29 15:38:18 -07:00
Cao Xuan Hoang 9a5748de21 Add Apache 2.0 license to source file
As per OpenStack licensing guide lines [1]:
[H102 H103] Newly contributed Source Code should be licensed under
the Apache 2.0 license.
[H104] Files with no code shouldn't contain any license header nor
comments, and must be left completely empty.

[1] http://docs.openstack.org/developer/hacking/#openstack-licensing

Change-Id: I74d25d88ac285c456cbb8874deb000ed782c2192
2016-09-29 11:15:32 +07:00
melanie witt 7c3fd3c59d Make releasenotes reminder detect added and untracked notes
When 'tox -ereleasenotes' is run, the releasenotes are built from
the committed notes. We have a script that displays a reminder when
it detects uncommitted notes. It doesn't, however, detect newly
added notes or untracked notes.

This adds detection of added and untracked notes for displaying
the reminder message.

Change-Id: I5164f0089eae4a95bc3e68cd3b515ef23556b227
2016-09-28 21:52:28 +00:00
Dan Smith 6f988105ac Add a post-test-hook to run the archive command
The archive_deleted_rows command in nova-manage is often-broken and
not well tested by us. We can test it to some degree in functional tests,
but running it against a real database with real deleted stuff in it
is a good idea. This adds a post-test hook and runs the archive so that
after a full test run in the gate, we'll see the output. Later, we should
make a failed run of this fatal, but for now, just run it so we can see
how close we are to being able to gate on it.

Change-Id: I16b2e00eede6af455cb74ca4e6ca951d56fdbcbc
2016-09-28 13:28:55 +00:00
Luong Anh Tuan b9610fb0a3 Remove locals() for formatting strings.
Following OpenStack Style Guidelines:
http://docs.openstack.org/developer/hacking/#dictionaries-lists

Using locals() for formmatting strings is not clear as using explicit dictionaries
and can hire errors during refactoring.

Change-Id: If3930d62fea166760161eaa3bdf85efca95be121
2016-08-22 17:32:38 +07:00
Matt Riedemann 1e0b2b5822 Fix busted release notes
A bad release note slipped through because the bash script
wasn't returing the actual results. This fixes the script
and the busted release note.

Change-Id: Id32557f34121fe82fac21d089e4117a72ff585e5
Closes-Bug: #1610312
2016-08-05 12:14:19 -04:00
Jenkins 9defc52f68 Merge "xenserver: fix an output format error in cleanup_smp_locks" 2016-08-04 14:57:25 +00:00
Jenkins b5822aa446 Merge "Reminder that release notes are built from commits" 2016-08-03 10:44:04 +00:00
yuyafei c97f3eec01 Remove white space between print and ()
TrivialFix

Change-Id: Ice05cc9848bc0b647ee20cfad20c23b47f8fedbd
2016-08-02 07:31:35 +00:00
Chen Fan 17ed8bf929 xenserver: fix an output format error in cleanup_smp_locks
Change-Id: I9b58a1a1128921dd4de07a65b5615d1a0fe3fea9
2016-08-01 10:51:57 +08:00
Artom Lifshitz 5ee95b3240 Reminder that release notes are built from commits
This patch introduces a new tools/releasenotes_tox.sh script for the
tox -e releasenotes test environment. It will detect when there are
uncommitted release notes and print a reminder to commit them.

Change-Id: I54af12d7eb20b37263e23443900745884cffacea
2016-07-29 13:32:33 -04:00
bhagyashris 046f34290d Fix invalid import order
Made corrections in import order as per OpenStack import standards [1].

[1] http://docs.openstack.org/developer/hacking/#import-order-template

TrivialFix

Change-Id: Ieb63c7fc5becc68db8d68b3e6847321e77ceeed3
2016-07-04 16:24:10 +05:30
Jenkins d68acca919 Merge "Add ability to select specific tests for py34" 2016-06-29 16:31:23 +00:00
Jens Rosenboom 0196f4676e Add ability to select specific tests for py34
For py27 you can simply run specific tests by calling

    tox -e py27 nova.tests.unit.test_something

Add a similiar option for the py34 environment. This will skip the
blacklist of tests that would otherwise be ignored for python3.

Change-Id: I9bf5901afed4abf592e1aaff2f4820b9e3abc671
2016-06-28 05:24:48 +02:00
liangjingtao a0f5a56a15 Make print py3 compatible
In PY3,remove the print "", join the print () function to achieve
the same function,this patch is to fix it.

Change-Id: Ie860e912b0c7101fd9d1d5c8373db8688f99122c
Closes-Bug: #1595773
2016-06-25 08:19:27 +00:00
Sean Dague cdf74c57a6 remove db2 support from tree
This removes db2 support from tree completely. This is an oddball non
open database that made doing live data migrations difficult. It is
used by 0% of users in the OpenStack User Survey.

Supporting commercial software that doesn't have users at the cost of
delivering features and fixes to our community is the wrong
tradeoff. This corrects that.

It rewrites migrations, which we typically don't ever do, but it is
better if newton fresh environments fail early in db creation instead
of very deep in the data migration process.

Change-Id: Ifeb9929e4515e3483eb65d371126afd7672b92a4
2016-05-23 07:33:20 -04:00
Sujitha 8fc7d30600 Config options: Centralize compute options
This change moves the config options in nova/compute/
manager.py to a central location "nova/conf/compute.py".

Change-Id: Iac75f966571d1224fcd9487b110cb5a4eaa29219
Implements: blueprint centralize-config-options-newton
2016-04-20 19:00:25 +00:00
Anusha Unnam 424ab495e7 Config options: Centralize xenapi driver options
The config options of
"nova/virt/xenapi/driver.py" got moved
to the new central location
"nova/conf/xenserver.py”

Change-Id: I87f6163c7a3b69ef8ede947132b771f32742781e
Implements: blueprint centralize-config-options-newton
2016-04-05 16:34:02 +00:00
Jenkins 91010e1b50 Merge "Add a tool for reserving migration placeholders during release time" 2016-02-10 19:48:44 +00:00
Dan Smith 526ec7ca65 Add a tool for reserving migration placeholders during release time
This adds a tool to make it easy to reserve placeholder migrations
after we do a release. This is something we have to do each time we
do a release, and it can be somewhat silly in terms of mechanical
work. This adds a script to make it trivially easy.

Change-Id: I34c11f1aee64ad36887779f1c9ca4491a25580ec
2016-02-09 10:54:08 -08:00
Jenkins 9ee136a98c Merge "ebtables/libvirt workaround" 2016-02-08 13:10:20 +00:00
Chet Burgess 17264ee6a6 ebtables/libvirt workaround
Idealy nova is run with libvirt 1.2.11 or later to guarantee that
libvirt is calling ebtables with --concurrent. Since we can't
always guarantee this we have created this workaround.

The workaround is extremely hacky and not recommend but for those
who simply have no other way to address this bug the following
should be done.

 * Copy /sbin/ebtables to /sbin/ebtables.real
 * Copy the ebtables.workaround script to /sbin/ebtables

Caution: Future OS level updates and packages way overwrite the
above changes. Its recommend users upgrade to libvirt 1.2.11.

The work around script was copied from devstack and originally
written by sdague.

Change-Id: Icdffc59d68b73a6df22ce138558d6e23e1c96336
Closes-Bug: #1501366
2016-02-04 09:38:34 -05:00
Bob Ball a40ee2ce1b XenAPI: Fix race on rotate_xen_guest_logs
There is a race between where Xen creates the domain and starts logging
and when XAPI returns to say that the domain has started.

If the cronjob to rotate the guest logs runs in this period, it can
delete the console logs before we set the last_dom_id which is used to
preserve logs.

This change adds a fixed delay before deleting any log files, allowing
the VM start operation to return after the domain has been successfully
created.

Change-Id: I82ae3e008974f33b60256366f171abf1f0369e60
Closes-Bug: 1535616
2016-01-19 10:15:08 +00:00
Jenkins 3fdb41323a Merge "XenAPI: Fix race in rotate_xen_guest_logs" 2016-01-05 17:33:36 +00:00
hgangwx 27ed157b8b Misspelling in message
Misspelling in the message:
"You have uncommited changes"
Should be: "You have uncommitted changes"

Totally 2 occasions in Nova base code.

Change-Id: If0ad3163f3b9db3f31f7e9fa40245282c1a0acb4
2015-12-27 19:22:07 +08:00
Bob Ball 61813e69f7 XenAPI: Fix race in rotate_xen_guest_logs
It's possible that a log file is created while this script is
running, and if being created after we get the valid last_dom_ids
then the log file may be deleted incorrectly.

Also add some logging which can be used to trace any future race
conditions

Change-Id: I1df1a0775a7dae41105d6c41b046c86002eb5eec
Closes-Bug: 1516721
2015-12-17 13:15:16 +00:00
Ravi Shekhar Jethani b93d214442 Simplified boolean variable check
Currently 'test_list' variable is being checked
for empty list like 'if test_list == []:'.
The more standard approach is like 'if not test_list:'.

TrivialFix

Change-Id: I0b389c11b992c93529b305b1ebce6b181f9a9a30
2015-11-18 23:45:28 -08:00
Sulochan Acharya d731a04b60 xapi-tools: fixes cache cleaner script
Fixes cache cleaner script by removing import of
driver and using session directly to call vm_utils.

There is no test included for this. Since this is out of nova
tree, adding tests is tracked in 1481705

Closes-Bug: #1481693

Change-Id: I25ee22777baecaf64de63a39d19e8f8f514f70b3
2015-10-02 10:20:51 +00:00