Commit Graph

343 Commits

Author SHA1 Message Date
Vishvananda Ishaya 8ca9ba946e Remove dependency on python-ldap for tests
We have a fake ldap implementation for testing, but the tests still
fail if ldap isn't installed. This modifies the usage of ldap in
the LdapDNS tests to stub the module before attempting to import
it. This allows us to test without having python-ldap installed.

It removes the unneccessary FakeLdapDNS in favor of using the real
LdapDNS with the module stubbed out. It also removes the dependency
on python-ldap from test-requires.

Change-Id: Ifbe09e16436afa6999dcb7385763492b0026556c
2012-10-02 16:01:49 -07:00
James E. Blair 6e9f3bb10a Revert "Add full test environment."
This reverts commit 30e513309f.

The python mysql module was removed from test-requires in favor
of test-options, but the work to actually use that was never
completed.  Revert the change so that mysql testing is actually
performed again.

Change-Id: Iaf35811cc748272229260f2dab95520995a69b44
2012-09-28 13:04:53 -07:00
Eoghan Glynn a93ad200c2 Loosen anyjson dependency to avoid clash with ceilometer
Ceilometer depends on anyjson 0.3.1, whereas nova requires
exacly 0.2.4.

The net effect is a devstack with ceilometer installed will
appear to work initially, as ceilometer is sparked up after
nova. However, if any of the nova services are subsequently
restarted, they fail with:

  pkg_resources.DistributionNotFound: anyjson==0.2.4

By simply allowing the nova anyjson dependency version to
be greater than as opposed to an exact match, we can avoid
the clash.

Change-Id: I21737a2504705f15dd16e6762b44624678177442
2012-09-27 09:24:39 +01:00
Jenkins be3c54ee0d Merge "Replaced default hostname function from gethostname to getfqdn" 2012-09-26 23:13:50 +00:00
Vishvananda Ishaya 02facfb9d4 Bump the version of SQLAlchemy in pip-requires
Fixes bug 1057145

Change-Id: I5960b28f4c4feb3f68b21ae09c6d7de0f098b8e5
2012-09-26 20:45:00 +00:00
Luis Fernandez Alvarez 5dd1553cca Replaced default hostname function from gethostname to getfqdn
Fixes bug 1055503

The standard behaviour of the 'gethostname' function in Python differs from
Linux to Windows. A common Linux configuration returns the FQDN, while a
Windows one returns only the host name.

To resolve inconsistent node naming in deployments that mix windows and
Linux, it is proposed to use 'getfqdn' as default function instead of
'gethostname'. This is function is more predictable in all cases.

Change-Id: I3164d9a36df2b8484bbf9a57879c31fa0e342503
2012-09-26 13:43:16 +02:00
Yaguang Tang 821271113d Move fakeldap.py from auth dir to tests.
Also removes the auth  dir from nova.
fix bug lp:1054848

Change-Id: I9c2710c9789ff8413bc80044eba94f3a851d8544
2012-09-23 16:47:26 +08:00
Jenkins 2934799fda Merge "Added script to find unused config options." 2012-09-19 19:47:54 +00:00
Yosef Berman c5d724ff57 Added script to find unused config options.
The script analyze_opts.py is added to identify unused options
and options which are set to default values in the nova.conf file.

Change-Id: Iec42781a56f73b7d0960bdd569f5dd06edbb88df
2012-09-18 13:36:03 -07:00
Jenkins 677f6f6873 Merge "Add flag cinder_endpoint_template to volume.cinder" 2012-09-13 02:12:11 +00:00
Clay Gerrard 0fa231f718 Add flag cinder_endpoint_template to volume.cinder
Add optional flag to allow cinder endpoint to be defined by flag rather
than extracted from the request context's service catalog.  No change to
default behavior.

This flag allows deployers to use a seperate management endpoint for
cinder which compute can use exclusively to send messages to cinder, or
just use an auth system that doesn't add/forward the catalog along with
the request (e.g. noauth).

Add python-cinderclient to tools/test-requires

fix lp bug #1048798

Change-Id: Icb416bf4df2a6e37024f1fbc866006d46d30bcf2
2012-09-10 19:52:09 -05:00
Andrew Laski 4599261d63 More specific lxml versions in tools/pip-requires
Changed lxml version in tools/pip-requires from >=2.3,<3 to
>=2.3,<2.3.5.  pip was apparently accepting 3.0alpha as a <3 requirement
but the ordering of elements changes in that version.  Some of the
libvirt tests would pass with lxml 3.0alpha but fail with any 2.3.x
version.  The tests now pass with any version of lxml within the range
specified.

Change-Id: I2d84d32f1bf6fba2c6dbe05799a284a44d4c39d8
2012-09-10 18:58:26 -04:00
Jenkins 2e4c232793 Merge "Nail the pip requirement at 1.1." 2012-09-10 17:03:51 +00:00
Andrew Laski ccc0bfb3e6 Set install_requires in setup.py.
Updates setup.py to set install_requires using parse_requirements from
openstack-common.  This allows DevStack to install nova requirements, as
currently they are not handled.

Also relaxes the version requirement for lxml to >=2.3,<3.  This allows
DevStack to install nova requirements without needing to install lxml
over the installed python-xml system package, currently 2.3.2.

Change-Id: Iccebf9604ba5c6fcacb4c5fa5004f9fcb08944f3
2012-09-07 17:47:24 -04:00
Dan Prince 4fc05bff1f Nail the pip requirement at 1.1.
The most recent version of pip (1.2.1 as of a couple days ago) fails
to install the required Nova .venv packages. Nailing the installed
pip version when using run_tests.sh seems like a reasonable solution
to this issue.

Fixes LP Bug #1047120.

Change-Id: Ic947c04603cf9423c0cf2835351785d4fe795c4b
2012-09-07 12:48:40 -04:00
Vishvananda Ishaya d20b95ab06 Update requires to glanceclient >=0.5.0
Change-Id: If788b94a142f469b5ce47c49a4dcdb05f1455cce
2012-08-29 13:50:31 -07:00
Jenkins 2f2516f4c2 Merge "Add lintstack error checker based on pylint" 2012-08-27 18:38:59 +00:00
Jenkins 68e9a9e351 Merge "Add nosehtmloutput as a test dependency." 2012-08-27 04:20:58 +00:00
Yun Mao 09eb54c48f Add lintstack error checker based on pylint
Add a new silent test target lintstack based on pylint in Jenkins.
lintstack will compare the pylint errors between HEAD and HEAD~1,
filter out known false positives and report violations in pylint
original parseable format for Jenkins to consume.

Change-Id: Ic2962cb42a174bfe9535aea88475ff4ede3bf9ff
2012-08-24 15:36:47 -04:00
Jenkins 5c5ee02a7d Merge "Ensure log formats are quoted in sample conf" 2012-08-24 16:33:50 +00:00
Jenkins 30fd506e23 Merge "Don't include hostname and IP in generated sample conf" 2012-08-24 16:33:30 +00:00
Jenkins 13937c028d Merge "Allow generate_sample.sh to be run from toplevel dir" 2012-08-23 20:23:09 +00:00
Mark McLoughlin 63cc191c2d Include CommonConfigOpts options in sample config
Options defined by CommonConfigOpts are declared within the class rather
than at module level, so they weren't being included in the sample conf.

Also, in essex (and up until commit 991614add8), the sample conf file
didn't contain these options but they included the hyphen in the name.
The hyphen is only used on the command line, it is converted to an
underscore automatically in the config file. Use opt.dest rather than
opt.name as the config file key. Fixes bug #1034970.

DocImpact: update nova.conf docs
Change-Id: Ia7f3dded9148deedeb198c19a8d343db6dd93f99
2012-08-23 12:09:06 +01:00
Mark McLoughlin 680c80d9ea Ensure log formats are quoted in sample conf
Fixes bug #1040583

This ensures the sample conf has:

  # instance_format="[instance: %(uuid)s] "

rather than:

  # instance_format=[instance: %(uuid)s]

Fix suggested by Vish.

Change-Id: If20aa7276d6868a6885abc85f046733adc40331f
DocImpact: update nova.conf docs
2012-08-23 12:03:06 +01:00
Mark McLoughlin 705ee5e660 Don't include hostname and IP in generated sample conf
Avoid including the hostname and IP address of the machine generating
the sample config file.

Change-Id: Idf791efef8b0bf760c4c95f6f5f53d20bdf5ee7a
2012-08-23 11:49:15 +01:00
Mark McLoughlin 46de1cc267 Allow generate_sample.sh to be run from toplevel dir
I hit an issue where extract_opts.py couldn't import importutils
since it's not in my sys.path, so it's clear we need to set
PYTHONPATH before running.

The whole business of running the tool from the tools/conf dir
is fairly awkward, so change it to run from the top-level dir
instead.

Change-Id: I89b4d874a6ee3732234a9704a8ee6001a293ed71
2012-08-23 10:37:38 +01:00
Joe Gordon 6109970e2a Fix hacking.py git checks to propagate errors
Now when N801 or N802 is hit tools/hacking.py will return -1.

Fix bug 1039697

Change-Id: I9f6950a4396ae82861e5de0e4f3ba8b482c4fdf8
2012-08-22 10:52:05 -07:00
Clark Boylan b570a6182a Add nosehtmloutput as a test dependency.
Adding nosehtmloutput as a test dependency allows nose to output its
results to an html file. This will be used by Jenkins to save logs on
a different server.

Change-Id: I45191e872a41eed8e6a9e14757675ee7a28b3836
2012-08-21 14:25:14 -07:00
Joe Gordon 64c741ca94 Cleanup pip dependencies
Fix bug 1039745

* move feedparser to tools/test-requires
* remove python-daemon

Change-Id: I8da6ee6854e2064b44f3161b84f28d0bfc7f438d
2012-08-21 14:05:43 -07:00
Monty Taylor c1c068bb6b Make missing imports flag in hacking settable.
Change-Id: Ib1ada320588eb42370c9fa2c0eff4eb888258ea5
2012-08-17 13:38:29 -04:00
Dan Wendlandt 97dd343b16 update python-quantumclient dependency to >=2.0
Nova should depend on a version of quantum client that includes
API v2.0 support.  That means the client version should be 2.0+ .

This was just pushed to PyPi today:

http://pypi.python.org/pypi/python-quantumclient/2.0

Change-Id: Ib9d997ceff92f2da6986d184b7b0da9e564800aa
2012-08-13 07:31:58 -07:00
Brian Waldon 95015ad42a Rewrite image code to use python-glanceclient
This patch rewrites the Glance-specific code within Nova to use
the new python-glanceclient library. The old client is deprecated
in Folsom and should not be used in conjunction with
python-glanceclient.

This removes the dependency on installing 'glance' through pip.

Implements bp integrate-python-glanceclient
Fixes bug 880964

Change-Id: Ifb9e75593abd36a2d1c08773d02f192e5e5627fc
2012-08-13 13:28:48 -07:00
Joe Gordon 47a1bbe311 Add a 50 char git title limit test to hacking.
* add N802 to hacking.py

Change-Id: I8262531b4b3f8f3a1a2a37679904cf4864cae7b6
2012-08-08 14:53:38 -07:00
Jenkins d752c49ce0 Merge "Improve external lock implementation" 2012-08-06 16:15:30 +00:00
Stanislaw Pitucha 56d3d29ad2 Drop AES functions and pycrypto dependency
At some point IV parameter has been removed making these functions
dangerous to use unless keys are unique on every message. Since the
functions were added the original consumer has disappeared too. With
no more users it's better to get rid of the incomplete encryption system
entirely.

These were the only functions using pycrypto module directly, so it was
also removed from the dependency list.

Change-Id: I57b0a0a42dac455d5baae3d726aea1507121aa4d
2012-08-05 04:10:36 +01:00
Stanislaw Pitucha 2c1524866a Improve external lock implementation
Remove a number of limitations from the external locks.
- They can be nested now
- They do not need external cleanup in case of failures
- They do not rely on lockfile or greenlet internal implementation

New implementation is based on fcntl locks and any crashing process
will drop the lock. It does not have to rely on any cleanup code or
handling exceptions. Because no cleanup is needed, a number of tests
have been removed.
This implementation is not portable outside of POSIX/BSD/SVR4 systems.

Fcntl locks should work correctly with NFS mounts.

Locks are cleaned up after the tests finish running via run_tests.sh,
even though it's not strictly needed.

This change requires eventlet >= 0.9.17.

bp improve-external-locking

Change-Id: Idf5424c04645f25097733848a007b150145b0b27
2012-08-04 12:52:50 +01:00
Pádraig Brady 245e940040 Require eventlet >= 0.9.17
0.9.17 was released 2012-08-03 and
includes two particular fixes related to OpenStack

1. https://bitbucket.org/which_linden/eventlet/issue/123/
Fix an exception thrown by epoll in certain cases.
This can cause jenkins to deadlock, triggered for example by:
https://review.openstack.org/#/c/10767/

2. https://bitbucket.org/which_linden/eventlet/issue/115/
   https://bugs.launchpad.net/nova/+bug/903199
Fix a significant memory leak of _DummyThread objects.

Change-Id: I449f30afde7d162ed2c0df149174f1250ef378ca
2012-08-04 05:05:18 +01:00
Monty Taylor b71e86d4d7 Fix broken pep8 exclude processing.
First of all, our pep8 exclude was excluding openstack, to trap
for not doing pep8 checks on openstack/common, which comes from elsewhere.
But, pep8 strips filenames down to basename when doing exclude checks on
them, which makes no sense. To fix this, grab the two functions from pep8,
fix them, and monkeypatch them from within hacking.py.

Patch has been submitted upstream as:

  https://github.com/jcrocholl/pep8/pull/111

Also, changed the exclude to catch just openstack/common.

Change-Id: If0b18ae828e74203f84a8b6f8b4ba0100b3bbc59
2012-08-03 12:15:44 -05:00
Rick Harris 4afaf1792d XenAPI: Add script to destroy cached images.
Operations will want the ability to clear out cached images when
disk-space becomes an issue.

This script allows ops to clear out all cached images or just cached
images that aren't in current use.

Change-Id: If87bd10ef3f893c416d2f0615358ba65aef17a2d
2012-08-01 20:49:47 +00:00
Chris Behrens e6f2e886a4 Replace subprocess.check_output with Popen
The check_output method does not exist in python 2.6

Fixes bug 1029014

Change-Id: I1ee24fa2029f21706924cc19dfcbc41655b022e6
2012-07-26 09:15:09 +00:00
Rick Harris 196a4892fc Xen: Add race-condition troubleshooting script.
This stress-test runs builds and migrations concurrently making it
easier to uncovers certain types of race-conditions in the virt-layer
code.

Change-Id: I89c382b85aa6d0eb3dc957803f3ea34e3a36e9d4
2012-07-25 00:32:24 +00:00
Joe Gordon 7a376fa48b Add git commit message validation to hacking.py
Adds N801: git commit title should provide a description

Change-Id: Ic6334b20f5f06631b7a5579a4d1b2303685463eb
2012-07-20 15:19:15 -07:00
Jenkins 759617d648 Merge "Fix venv wrapper to clean *.pyc." 2012-07-20 18:21:25 +00:00
Chris Behrens 216467b345 Fixes XenAPI driver import in vm_vdi_cleaner
xenapi/connection.py was renamed xenapi/driver.py, it appears, but
vm_vdi_cleaner was not updated.

Also removed unused optparse import.

Fixes bug 1025912

Change-Id: Ia1a93400dc24455fe91fdf4283eb32bcca4037cf
2012-07-17 21:58:00 +00:00
Bhuvan Arumugam e2f031c321 Fix venv wrapper to clean *.pyc.
Bug: 1021392

With this fix the commands executed within virtual environment,
including find command, are executed successfully.

* tools/with_venv.sh
  Enclose command to execute in virtual environment within quotes.

Change-Id: I886d70097090578e83adc20318600d16cc5ebead
2012-07-13 23:04:54 -07:00
Sean Dague 7b43eaa9d8 modify hacking.py to not choke on the def of _()
recent openstack-common brought in it's own def of _() which trips
up our checking that all _ calls contain a message string.

This explicitly excludes the definition of this in function from
that check.

Fixes LP Bug #1020792.

Change-Id: If647d77a5ae5560935bb2e032331c34b896b8614
2012-07-05 16:59:48 -04:00
Brian Waldon 90a93098a6 Correct typo in tools/hacking.py l18n -> i18n
i18n stands for internationalization, while l10n stands for
localization. l18n stands for nothing.

Change-Id: Iebfe2dcbc12919875c0ecee8aa9223dc107239d7
2012-07-05 09:50:55 -07:00
Yong Sheng Gong 66bf71b1fc Implement nova network API for quantum API 2.0
blueprint improved-nova-quantum-integration

This new network API depends on quantum v2.0 client to connect quantum server
via Quantum server API V2.0. This change implements the minimum set of methods
so that we can boot an instance with ip allocated by quantum server.

Change-Id: I34acbbf84dd8601db8143267c8cc41255a0c6d3f
2012-07-03 09:13:40 -04:00
Andrew Bogott d335457f48 Switch to common logging.
I only just moved logging from nova to common, so behavior should remain the same.

Change-Id: I1d7304ca200f9d024bb7244d25be2f9a670318fb
2012-07-02 15:57:09 -05:00
Jenkins f506dc6f9b Merge "Align run_tests.py pep8 with tox." 2012-06-28 21:40:03 +00:00