Commit Graph

232 Commits

Author SHA1 Message Date
Jenkins 01dbefb085 Merge "Nova options tool enhancements" 2012-03-06 18:05:16 +00:00
Joe Gordon e8bc00eff2 Add assertRaises check to tools/hacking.py as N202
Change-Id: I25113bcc73ff642cae146f0558f319684b4568d0
2012-03-05 14:09:57 -08:00
Mike Pittaro 2fbccc0c69 Clean stale lockfiles on service startup : fixes bug 785955
Adds cleanup_files_locks() to nova/utils, which cleans up stale locks
left behind after process failures.

Adds a call to clean up locks on service startup for nova-api, nova-cert,
nova-compute, nova-network, nova-objectstore, and nova-scheduler.

Adds tools/clean_file_locks.py, which can be used to manually clean
stale locks.

Change-Id: I752e0b24d3c7fc5f1dc290da355cbd7f430789b8
2012-02-24 15:10:33 -08:00
Zhongyue Luo cce1c217eb Nova options tool enhancements
Fixes bug #936898

1. Just import the modules and only look at nova.flags.FLAGS
   when they're all imported

2. ConfigOpts is iterable, there should be no need to iterate
   the private FLAGS._opts dict

3. Output should be .ini style

4. The output should only contain comments
   i.e. each option default should be commented out

Change-Id: I15835bb437bc6d575e8311d7c55b3a29d67b006d
2012-02-24 07:10:40 +08:00
Monty Taylor 51210081a8 Support tox-based unittests.
Change-Id: I6a0a616a979688595762e6b772d77a14f1968070
2012-02-20 11:54:37 -08:00
Jenkins 757d8aa6f5 Merge "Support non-UTC timestamps in changes-since filter" 2012-02-20 07:19:39 +00:00
Zhongyue Luo 9e16a2edb1 nova.conf sample tool
Fixes bug #918621

A tool to generate a sample nova.conf file

Change-Id: I2646d7e674ef3d1759558e820f051cc5e7f3b4ae
2012-02-18 07:51:46 +08:00
Eoghan Glynn c30193fbf5 Support non-UTC timestamps in changes-since filter
Fixes nova aspect of lp 837464

Prevously only Zulu time was supported in the changes-since filter,
i.e. timestamps formatted as %Y-%m-%dT%H:%M:%SZ

We now support arbitrary timezones, with the offset from UTC expressed
via the ISO 8601 ±hh:mm notation.

Microsecond accurracy is also optionally supported in timestamps.

Notes:

- nova.utils.parse_isotime(), isotime() & normalized_time() are
  prime candidates for promotion to openstack-common, as these
  methods were duplicated from my corresponding glance patch:

    https://review.openstack.org/#change,4198

- this patch introduces a new dependency on python-iso8601, which
  has already been packaged for Fedora, EPEL and Ubuntu/Debian.

Change-Id: I89b45f4f3d910606c578d927420f78cea94f4e3b
2012-02-17 20:40:51 +00:00
Monty Taylor 4a4c274c83 Get rid of distutils.extra.
We moved to DistUtilsExtra because it promised a more automatic workflow
from setup.py. It doesn't actually deliver though, and it also vomits
warnings during setup.py usage, and also breaks pip integration.

So this is going back to babel. Mostly folks shouldn't need to know
anything about this. We'll need to update the translations import
jobs in Jenkins, and we might need to add a corresponding translations
upload job that runs post-merge.

Translations installation doesn't fully work - but it actually wasn't fully
working before. Getting this part of the project done now though is a
pre-requisite for using tox for multi-python testing (tox starts by
creating an sdist tarball and then installing it into the venv, which
is just 100% broken with DistUtilsExtra)

Change-Id: I126e1bcfab0656eab6ca10de67d3d2aaa8b844f3
2012-02-08 19:30:39 -08:00
Jenkins 082750832e Merge "Require newer versions of SA and SA-Migrate" 2012-02-08 21:21:03 +00:00
Rick Harris 71247a627e Require newer versions of SA and SA-Migrate
Fixes bug 928637

Change-Id: I27d06d945449f70a6da00c1f5d306bd5fe43b253
2012-02-08 05:33:40 +00:00
Thierry Carrez 71410724cd Remove ajaxterm from Nova
Removes copy of ajaxterm code, nova-ajax-console-proxy,
and support for get_ajax_console from Nova proper.

Implements blueprint remove-ajaxterm
Fixes bug 917963

Change-Id: I2c0ff427c53c0f63a18b10475d6b4cbe9a085d83
2012-02-07 21:14:31 +01:00
Brian Waldon 3759bcf3fc Excise M2Crypto!
This required rewriting our Diffie-Hellman-Merkle implementation for
set_admin_password in xen. Fixes bug 917851.

Change-Id: Ic4cdcc06221f003aec2dcd5ba05a1a9ad19d39c9
2012-02-02 10:12:58 -08:00
Brian Lamar 7de828108a Boto 2.2.x failes. Capping pip-requires at 2.1.1
Fixes bug 924933

Change-Id: I808daedf9a860a8ef153785693cbc49a0a25f49c
2012-02-01 10:55:43 -05:00
Joe Gordon 9a08e00548 Add HACKING compliance testing to run_test.sh
Tests so far:
N101 TODO format
N201 Except format
N301 One import per line
N302 import only modules
N303 Invalid Import
N304 Relative Import

Change-Id: I33c021b842e7199b1f5f1f699ea17f7fa5f8ca49
2012-01-24 10:54:17 -08:00
Joe Gordon 236190c452 Cleanup Imports to match HACKING guidelines
found using https://github.com/cloudscaling/nova-HACKING

Change-Id: Ic010f0407e7a139f0f6436af2e72e817c140a4c3
2012-01-18 11:30:22 -08:00
Zhongyue Luo 1611c23928 greenlet version inconsistency
Fixes Bug #917003

The latest version of greenlet is installed in install_venv.py while
the version required is set to 0.3.1 in pip-requires.

Change-Id: I145deb46a8edc41e87634dc5ca839baf5acd8065
2012-01-16 01:58:39 -05:00
Daniel P. Berrange d97b64b6e6 Tell users what is about to be installed via sudo
Rather than just giving users the sudo password prompt immediately,
actually tell them what is about to be installed, so they know
whether it is reasonable to be entering their password.

Change-Id: Ic0c1de812be119384753895531a008075b13494e
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-01-05 16:08:04 +00:00
Jenkins dc3d6ee43e Merge "PEP8 remove direct type comparisons" 2012-01-03 17:53:05 +00:00
lzyeval ae1654bc59 PEP8 remove direct type comparisons
Fixes bug #910763

According to PEP8,
- Object type comparisons should always use isinstance() instead
      of comparing types directly.

        Yes: if isinstance(obj, int):

        No: if type(obj) is type(1):

      When checking if an object is a string, keep in mind that it might be a
      unicode string too! In Python 2.3, str and unicode have a common base
      class, basestring, so you can do:

        if isinstance(obj, basestring):

Change-Id: I7c0fdecf99872f5b8f72b2c2ed4f5c539c33def1
2012-01-03 11:12:42 +08:00
Monty Taylor f9ec38578b Install a good version of pip in the venv.
Change-Id: I1059824aae8c5bf1a65de6cfaef96fef0f68d8a3
2012-01-02 13:35:57 -08:00
Jenkins 435d6d8bb5 Merge "Rename .nova-venv to .venv." 2011-12-09 00:53:27 +00:00
James E. Blair 5235106e95 Rename .nova-venv to .venv.
This simplifies a number of Jenkins jobs which currently, other
than directory names, could be the same for all OpenStack
projects. By renaming the virtualenv directory, the redundant
Jenkins virtualenv build and copy jobs can be eliminated.

Change-Id: Ieaf1dac3207ecb34b911c7edcd2086809abdf49e
2011-12-08 15:17:51 -08:00
Vishvananda Ishaya 0c9a9be3c0 revert using git for novaclient
Change-Id: I55184b0f3d6cdccfe1dc64d5e928b4b707ef5f84
2011-12-08 15:12:58 -08:00
Jenkins 10c829ff39 Merge "Add ability to see deleted and active records." 2011-12-08 23:01:27 +00:00
Vishvananda Ishaya 20c8d89dba Relax novaclient and remove redis dependency
Change-Id: I80fad5d2ee09111cc82f5b8c81f0c5e26f07b6ff
2011-12-08 14:04:51 -08:00
Vishvananda Ishaya d06da5d652 Relax dependency on boto 1.9b and nova-adminclient
* change boto=1.9b to boto
 * fix the tests
 * remove nova-adminclient dependency
 * remove the useless smoketests for nova-adminclient

Change-Id: Ie191453941e64774496a912cb64d1417f3f1bea3
2011-12-08 11:19:47 -08:00
Rick Harris c40ee5cfe7 Add ability to see deleted and active records.
Fixes bug #900564

Changes `Context`.`read_deleted` from a bool to an enum string with values
"yes" (can read deleted records), "no" (cannot read deleted records), and
"only" (can only see deleted records, for backwards compatibility).

Change-Id: Ic81db3664c33f23f751b73973782efb06fce90d9
2011-12-07 16:06:31 -06:00
Adrian Smith dbbd6cf107 Use system M2Crypto package on Oneiric, bug 892271
Ubuntu Oneiric has a problem with the pip installed version of m2crypto.
This fix installs python-m2crypto via apt-get on Oneiric.

Change-Id: I8290a74b614eb0d0b8d620dbad19d2cc6843de8b
2011-12-06 19:45:21 +00:00
Jenkins 36dcc2d923 Merge "Separate metadata api into its own service" 2011-11-16 23:35:08 +00:00
Vishvananda Ishaya e6073532e5 Separate metadata api into its own service
part 1 of blueprint separate-nova-metadata

 * adds api/metadata/ and moves code from ec2
 * moves metadata into separate binary
 * changes metadata forward to use metadata host and port
 * moves the metadata accept rule to the metadata api
 * adds nova-api-* to setup.py

Change-Id: I7f5d8e6cafc55b5c383cd88991f29c6059fb8d82
2011-11-15 13:27:58 -08:00
Mark McLoughlin b0ad7284aa install_venv: apply eventlet patch correctly with python 2.7 (#890461)
Looks like the fix for #884915 only works with RHEL6. Make it work
correctly on Fedora 16.

Change-Id: I8c996f20d49db688fd8e692bcd836dee693d362a
2011-11-15 08:43:46 +00:00
Lorin Hochstein 9175822ffe Workaround for eventlet bug with unit tests in RHEL6.1.
This adds a patch to fix the broken eventlet code that's installed in the
virtualenv.

Fixes bug 884915

Change-Id: I6dbf755abbc5a52208de3dd892257ce39686d396
2011-11-09 14:54:16 -05:00
Lorin Hochstein e42fe8565c Apply M2Crypto fix for all Fedora-based distributions.
Broaden Fedora check to include RHEL and others.

Fixes bug 884885

Change-Id: Ifab330a7f866add91d01c8cf2470e5a12fb4cd4d
2011-11-09 14:54:16 -05:00
Jenkins 7a0487d000 Merge "Remove nova dependency on vconfig on Linux." 2011-11-09 14:58:43 +00:00
Lorin Hochstein b08bd96ce5 Optional --no-site-packages in venv
Added a flag to run_tests.sh to allow user to optionally install venv with --no-site-packages.

This fixes bug 880905

Change-Id: Ic645e0ec56c90b72fef526ebc9f55975d446e2ae
2011-10-30 11:06:10 -04:00
Mark McLoughlin c00cfc642a venv: update distribute as well as pip
When you create a virtualenv, pip and setuptools/distribute is
installed.

When we later run install_venv.py to update the venv, we should
be sure to grab the latest versions of pip and distribute otherwise
issues like this one are masked:

  http://code.google.com/p/sqlalchemy-migrate/issues/detail?id=131

Change-Id: Id206be478ea6c5216dcee6f2f58dc91858c843f5
2011-10-25 14:39:12 +01:00
Asbjørn Sannes 2463d9d185 Remove nova dependency on vconfig on Linux.
iproute2 is already a dependency and is used everywhere and is more
capable than vconfig. This commit just replaces all uses of vconfig.

Change-Id: I5860a10f151a176bf9849feda6052d4c2b491e07
2011-10-20 11:47:36 +02:00
Monty Taylor 3c6ce70a51 Upgrade pip in the venv when we build it.
Change-Id: I924975170c9e3a1ef23b5195cb3a6eed675ec043
2011-10-19 18:03:51 -04:00
Josh Kearney 16582ce70c Utility script that makes enforcing PEP8 within git's pre-commit hook as easy as possible.
This should be mandatory for all developers, IMHO.

Change-Id: I83e8a7ab0a82df0fd08a2bef80295344b3a00a86
2011-10-17 14:39:25 -05:00
Jenkins 85fc484109 Merge "Use latest version of SQLAlchemy" 2011-10-14 19:30:09 +00:00
Jenkins f9aeb86961 Merge changes I94c7464b,Ibfeeb9c2
* changes:
  install_venv: pip install M2Crypto doesn't work on Fedora
  install_venv: add support for distro specific code
2011-10-13 04:49:38 +00:00
Jenkins 93378ee627 Merge "install_venv: remove versioned M2Crypto dependency" 2011-10-12 15:52:47 +00:00
Jenkins c3defedb3a Merge "install_venv: don't use --no-site-packages with virtualenv" 2011-10-12 15:40:33 +00:00
Jenkins 7ca47db2c7 Merge "install_venv: pass the --upgrade argument to pip install" 2011-10-12 15:24:43 +00:00
Jenkins f0a2907e58 Merge "install_venv: refactor out pip_install helper" 2011-10-12 15:15:12 +00:00
Jenkins 56be39aedb Merge "Further changes to the cleaner." 2011-10-10 21:38:22 +00:00
Jenkins 68282d915b Merge "Add support for header version parameter to specify API version." 2011-10-10 21:28:43 +00:00
Josh Kearney cf5f055ebb Further changes to the cleaner.
Change-Id: Ib11fe18a46e57df3498596a2909879d67e84fdda
2011-10-10 15:19:25 -05:00
Josh Kearney 3a4eb1da2f Reference orphaned_instance instead of instance.
Change-Id: I3170f7b67466645d4c410b1d58b3e4e15b9e3265
2011-10-10 12:55:24 -05:00