3541 Commits

Author SHA1 Message Date
Josh Kearney
3563a693c5 Adds a bandwidth filter DB call.
Change-Id: I7721bae1af900c215552f547e125c2b1e60b271e
2012-01-24 11:09:51 -06:00
Johannes Erdfelt
dd65c7d7b8 KVM and XEN Disk Management Parity
Implements blueprint disk-configuration-parity

This change splits local_gb into root_gb and ephemeral_gb. libvirt
interpreted local_gb as what ephemeral_gb is now, whereas XenAPI
interpreted local_gb as what root_gb is now.

Change-Id: I496600991bac1e990326d4ded1607fee08209d68
2012-01-24 16:54:23 +00:00
Jenkins
bc8d005609 Merge "ComputeNode Capacity support" 2012-01-23 21:39:36 +00:00
Sandy Walsh
72d710217e ComputeNode Capacity support
The table represents the current state of compute nodes and will be
used by the scheduler when selecting a host.

Re: https://blueprints.launchpad.net/nova/+spec/scaling-zones

This is just the db & notification portion of the branch. The scheduler
portion is being deferring until comstuds branch gets merged since it
conflicts heavily.

NOTE: Compute notifications are now two-part.
There is a compute.instance.XXX.start event and a compute.instance.XXX.end
message instead of the previous compute.instance.XXX event (which is
the same as the .end message)

Change-Id: Ia8e68680cb0924c59df84f2eec858febf4926d65
2012-01-23 07:45:33 -08:00
Jenkins
b21b83a961 Merge "Fix nova-manage floating list (fixes bug 918804)" 2012-01-21 19:47:29 +00:00
Andrew Bogott
e763ffe6ea Change the logic for deleting a record dns_domains.
Since keys are just the domain name, we need to be able
to reuse them.  That means we have to do a real record
deletion to free up namespace rather than just mark the
records as deleted.

For blueprint public-and-private-dns.

Change-Id: If47e961cf2cb977d297b506bd397f1a438499f18
2012-01-21 01:07:35 +00:00
Dean Troyer
0b6a75a7e4 Fix nova-manage floating list (fixes bug 918804)
https://review.openstack.org/2922 broke nova-manage floating list
* Restore db.floating_ip_get_all
* Update instance display in nova-manage

Change-Id: I526237401371a21eafbd9b571f9b4a17a534c1c6
2012-01-20 13:42:12 -06:00
Chris Behrens
12068866f7 scheduler host_manager needs service for filters
distributed scheduler isn't checking service_is_up or
services['disabled'] due to filters not having access to service.

Fixed both.  Since ec2 API also uses service_down_time, I moved
service_is_up() into utils and made ec2 use it.

Change-Id: I0321844a47031b2de4d8738e032a4634edd1e945
2012-01-19 22:02:25 -08:00
Andrew Bogott
92e66df6e7 Add dns domain manipulation to nova.
Adding this functionality required the existing DNS api
to be rearranged considerably.

Nova needs to track some information about domains that is
outside the scope of the DNS driver, specifically the availability
zone of a private domain and the project of a public domain.
In order to track those attributes, this patch adds a new table
to the Nova database, dns_domains.

This patch perpetuates some naming ambiguities (e.g. zone vs. domain).
A future renaming patch will sort all this out.

For blueprint public-and-private-dns.

Change-Id: I80865207d34ab7c6e2afc5638863a299b3913f8e
2012-01-18 12:39:50 -06:00
Anthony Young
db66823fdf Implements blueprint vnc-console-cleanup
* Creates a unified way to access vnc consoles for xenserver and libvirt
 * Now supports both java and websocket clients
 * Removes nova-vncproxy - a replacement version of this (nova-novncproxy) can be found as described in vncconsole.rst
 * Adds nova-xvpvncproxy, which supports a java vnc client
 * Adds api extension to access java and novnc access_urls
 * Fixes proxy server to close/shutdown sockets more cleanly
 * Address style feedback
 * Use new-style extension format
 * Fix setup.py
 * utils.gen_uuid must be wrapped like str(utils.gen_uuid()) or it can't be serialized

Change-Id: I5e42e2f160e8e3476269bd64b0e8aa77e66c918c
2012-01-17 14:18:31 -08:00
Jenkins
a363b9418c Merge "blueprint host-aggregates" 2012-01-17 21:33:52 +00:00
Armando Migliaccio
17135ed2c6 blueprint host-aggregates
This is the first of a series of commits that add the host-aggregates capability,
as described on the blueprint page.

This commit, more precisely, introduces changes to the Nova model: model classes
related to aggregates have been added, as well as DB API methods to interact with
the model; a sqlalchemy migration script plus a bunch of tests are also part of
this changeset.

Commits that will follow are going to add:

- Extensions to OSAPI Admin, and related python_novaclient mappings
- Implementation of the XenAPI virt layer
- Integration of OSAPI and virt layer, via the compute_api
- smoketests
- openstack-manuals documentation

These commits will be pushed for review not necessarily in this exact order.

Change-Id: Iceb27609dc53bf4305c02d7cbc436fba4c4a7256
2012-01-17 18:47:56 +00:00
Jenkins
355c631785 Merge "Add missing scripts to setup.py (lp#917676)" 2012-01-17 18:45:14 +00:00
Jenkins
0f35351009 Merge "Fixes bug 917128" 2012-01-17 16:51:26 +00:00
Mark McLoughlin
2c974118c9 Add missing scripts to setup.py (lp#917676)
If distutils-extra is installed, all scripts are automatically included
in the tarball. We should explicitly include them in setup.py to avoid
confusion.

As an example, the 2011.3 tarballs appear to have been generated with
distutils-extra but the 2011.3.1/2012.1 tarballs are now being
generated in a venv. So, these newer tarballs are missing scripts which
were included in 2011.3.

Change-Id: I2a85418b84b93e041f6c7d31833b09acdcb29daa
2012-01-17 15:07:58 +00:00
Alvaro Lopez Garcia
682b61c4ec Fixes bug 917128
Change-Id: I01c384666ae2366638fe77ffbe2f85e9e2692303
2012-01-17 10:15:32 +01:00
Jenkins
a75ceec953 Merge "Implement BP untie-nova-network-models" 2012-01-16 17:17:36 +00:00
Jason Kölker
0c90acfb15 Implement BP untie-nova-network-models
Fixes LP853979
Remove the FK references for network data.
Remove unused db functions that used the FK's
Update db functions to not joinload
Update notification to optionally take network_info if compute has it
Update EC2 Api to use the network cache, falling back to rpc.call
Remove test_instance_get_project_vpn_joins which tests calls not used

Change-Id: I1a01ccc5ebcf7efeafe014af62be893325bb0825
2012-01-16 10:52:56 -06:00
Vishvananda Ishaya
1a8f27ef2a Remove a whole bunch of unused imports
Change-Id: I6759e5b6250c48cc0deb4b198b44c948c64c47d1
2012-01-13 13:55:38 -08:00
Jenkins
bc581d7233 Merge "Implements blueprint separate-nova-volumeapi" 2012-01-13 19:19:46 +00:00
Anthony Young
caab31ebb3 Implements blueprint separate-nova-volumeapi
* Moves openstack/v2 directory to compute and fixes tests accordingly
 * Moves some code from api/openstack/compute to shared location, for use by volume api
 * Implements basic volume functionality for types, volumes, and snapshots
 * Changes service name from osapi to osapi_compute (and adds osapi_volume)
 * Renames nova-api-os to nova-api-os-compute, adds nove-api-os-volume
 * Separate extension mechanism for compute and volume
 ** Removes flag osapi_extension and replaces with osapi_compute_extension and osapi_volume_extension
 * Updates the paste config
 * Fixes setup.py to include nova-os-api-compute and nova-os-api-volume
 * Fix bug in volume version code that occurred as result of trunk merge
 * Update integrated/test_volumes.py to use new endpoint

Change-Id: I4c2e57c3cafd4e1a9e2ff3ce201c8cf28326afcd
2012-01-13 09:06:55 -08:00
Jenkins
9e0ea80989 Merge "Call to instance_info_cache_delete to use uuid" 2012-01-12 00:02:34 +00:00
Alex Meade
294e751a59 Call to instance_info_cache_delete to use uuid
Fixes bug 903497
Also updated incorrect calls to instance_destroy that were using uuids.

Change-Id: I25eead020ceb7ebf7234c268543ad77d8ecf1185
2012-01-11 19:44:58 +00:00
Jenkins
c5db06867e Merge "Add @utils.deprecated()." 2012-01-11 19:04:59 +00:00
Kevin L. Mitchell
8b98df8dca Add @utils.deprecated().
This will allow us to mark deprecated classes and functions/methods as
such.  A warning is issued each time a deprecated function/method is
called, or when a deprecated class is instantiated, or when any class
or static method on a deprecated class is called.

Change-Id: I4b5858492bc14768ac2e12c542bc343962761e34
2012-01-10 11:22:33 -06:00
Jenkins
c6730f5b7c Merge "Adds support for floating ip pools" 2012-01-10 12:31:48 +00:00
Vishvananda Ishaya
80f6ddf3d4 Adds support for floating ip pools
* Implements blueprint multiple-floating-ip-ranges
 * Adds pool and interface fields to floating ip tables
 * Adds extension to get a list of available pools
 * Optionally allows a pool to be specified when allocating
 * Changes nova-manage command to allow pool and interface
 * Ip binding uses the interface from table instead of flag
 * Adds default pool flag to use when pool is not specified
 * updates test to work with new fields
 * adds tests for extension

Change-Id: Ieb4cbbf07b211697d08178b1cf2252caf75049a2
2012-01-09 13:18:02 -08:00
Vishvananda Ishaya
d383ef607a Refactors utils.load_cached_file
* adds a boolean return representing whether file was reloaded
 * ensures file is actually closed by using a context manager

Change-Id: I4d998c34caa6dde65aaf780c188778477b7f6753
2012-01-09 11:40:04 -08:00
Jenkins
12dade1a29 Merge "preload cache table and keep it up to date" 2012-01-06 22:07:36 +00:00
Vishvananda Ishaya
94101b6cfc Workaround bug 852095 without importing mox
* Fixes bug 912828

Change-Id: Iade4b0aca1d1f28ce46ed25d0b97c08d152554bd
2012-01-06 11:05:12 -08:00
Armando Migliaccio
8f283c3bb7 Bug #912858: test_authors_up_to_date does not deal with capitalized names properly
ensure we are not fooled by capitalized names, by turning emails and names into lower cases before the matching.

Change-Id: Idbb8535174c0f1451ad6fd0628f35508f0f1e466
2012-01-06 17:49:57 +00:00
Vishvananda Ishaya
f9409a8f24 Adds workaround check for mox in to_primitive
* Works around bug 852095
 * Can be removed if a consistent mox 5.4 is released

Change-Id: I3e57b60886a94c5e7a337b73716759c9a6838e04
2012-01-06 02:24:06 +00:00
Trey Morris
2922d044d9 preload cache table and keep it up to date
Change-Id: Ic27c45f209610a5d369cfb9f09bcabd4264cd2b9
2012-01-05 18:16:34 -06:00
Jenkins
b85734330a Merge "Update HACKING.rst." 2012-01-05 16:44:30 +00:00
Kevin L. Mitchell
3127c6d0ca Update HACKING.rst.
Removes the requirement for a trailing blank line in multiline
docstrings, just before the closing '"""'.  This blank line is not
needed anymore, as the editors it was recommended for no longer
have the problem that this blank line was working around.

Change-Id: I4e532231f1d99e9f5048cbfcc791a4328fb1e8f5
2012-01-05 10:21:57 -06:00
Jenkins
f21981eaaa Merge "Remove install_requires processing." 2012-01-04 23:27:13 +00:00
Monty Taylor
b5dad2ded7 Remove install_requires processing.
Loading install_requires with the contents of pip-requires
isn't getting us any real beneift and is causing issues.

a) It can conflict with installing nova into an environment
   where deps have been installed from packages (devstack)
b) It breaks the ability to use -e git urls in pip-requires
   which we want to start using for python-novaclient and
   python-keystoneclient
c) It causes spurious network traffic when we're trying to
   test things.

At the same time, since we are not expecting anyone to
install nova from setup.py for production, the normal benefit
of the feature is not needed.

Change-Id: I402f975c652dc1c2b54b0c362b8abbb6886f8844
2012-01-04 12:41:49 -08:00
lzyeval
49e00413a6 PEP8 type comparison cleanup
Fixes bug #910295

The None, True, and False values are singletons.

All variable *comparisons* to singletons should use 'is' or 'is not'.
All variable *evaluations* to boolean should use 'if' or 'if not'.

"== None", "== True", "== False", and "!= None" comparisons in sqlalchemy's
where(), or_(), filter(), and_(), and select() functions should not be changed.

Incorrect comparisons or evaluations in comments were not changed.

Change-Id: I087f0883bf115b5fe714ccfda86a794b9b2a87f7
2012-01-04 07:32:13 +08:00
Jenkins
c3b17f1635 Merge "Adds running_deleted_instance_reaper task." 2012-01-03 19:00:14 +00:00
Jenkins
6bd7e45694 Merge "PEP8 remove direct type comparisons" 2012-01-03 17:53:05 +00:00
Rick Harris
f4fb500c53 Adds running_deleted_instance_reaper task.
This adds a periodic task to cleanup erroneously running instances. The
impetus of the patch was a XenServer specific issue bug #911366, where deleted
instances would remain running on the host machine.

The patch however is hypervisor agnostic and is generally useful as a
housekeeping task to make sure these 'zombied' instances are detected.

Change-Id: Iddc6a88920a537a3a115f8b9bc0039ec0e24a194
2012-01-03 11:51:22 -06:00
Jenkins
905e67cf4b Merge "Unused db.api cleanup" 2012-01-03 17:34:33 +00:00
lzyeval
4a0e18dc29 Unused db.api cleanup
Fixes bug #884837

not used:
virtual_interface_get_by_fixed_ip
instance_get_by_fixed_ip
instance_get_by_fixed_ipv6
volume_metadata_delete_all
instance_metadata_delete_all

internal functions:
volume_metadata_get_item
    (used by used by volume_metadata_update() -> not removed)
instance_metadata_get_item
    (used by instance_metadata_update() -> not removed)
instance_type_extra_specs_get_item
    (used by instance_type_extra_specs_update_or_create()
     -> not removed)

Change-Id: I1f8ad627d0305112a9d5d7b3b3b7257e98851122
2012-01-03 19:00:45 +08:00
lzyeval
d176806dca 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
Jenkins
1e28f07d03 Merge "Ensure generated passwords meet minimum complexity" 2011-12-30 14:54:42 +00:00
Brian Waldon
0eaacdc437 Clean up pylint errors in top-level files
Change-Id: Ida7cf1ff0cbf94ad82c7a75708c79ad7bb27f7fd
2011-12-29 14:49:00 -05:00
Johannes Erdfelt
ff170eff43 Ensure generated passwords meet minimum complexity
Windows has a complexity requirement of at least three of these
criteria:
- one or more upper case characters
- one or more lower case characters
- one or more numbers
- one or more special characters

In some cases, the passwords generated didn't meet three of these four
critera. This change enforces that three of these criteria will be
met in the generated passwords.

Change-Id: Ibe0055b8830b426aee1c9b722cc2fae2f5db4c5c
2011-12-29 19:38:24 +00:00
Jenkins
2ce7cc8a6f Merge "'except:' to 'except Exception:' as per HACKING" 2011-12-27 21:24:41 +00:00
Joe Gordon
137aa21bee 'except:' to 'except Exception:' as per HACKING
Change-Id: I6e372152946dc7b51a4d84d6f4b893774e7d1a1d
2011-12-27 12:07:06 -08:00
Jenkins
fcfb5cceb5 Merge "Fixes LP bug #907898." 2011-12-23 14:07:32 +00:00