Introduced various sanity checks before adding security group rule
into the database. The checks have been implemented both in EC2 and
openstack extension code.
Implemented the suggestions made in first patch by Brian
Fixed the unit tests in security groups
Fixed pep8 issues in security group unit tests
Fixes bug 869979.
Change-Id: I2ac28666e90e7bdeacb7b1c2676c0719cfb9e441
update: pep8, and fixing log output.
update2: more pep8, I'm looking at you vim
update3: more formating
update4: mailmap
update5: more pep8
Change-Id: I38617e14260e65ed5cb81b3554479d3720850aae
This introduces a new flag "quantum_use_dhcp=<boolean>" which indicates whether
or not to enable dhcp for all of the networks. If it is set then we start
dnsmasq (and provide it with the IP/MACs from Melange) similar to how this was
done in linux_net before.
Prior to this if you enabled dhcp then you would also get a gateway device..
some people may not want that so we now require that you specify the gateway
when creating the network in order to end up with a device that will act as a
gateway. If you're using Melange IPAM and you don't specify the gateway you
still end up with one because it doesn't allow you to not have one. This lays
the groundwork for the option of not having one in the future, at least :)
Also, fix quantum/melange ipam interaction
We now query for the subnets by net_id/vif_id instead of searching through all
the blocks to find the right one. Both of the allocate and deallocate for
instance calls are now using the vif_id -> network_id mapping instead of
searching the quantum networks. get_port_by_attachment was also changed to
take a net_id so that we don't have to search through all of the quantum
networks to find the corresponding port.
Change-Id: I6a84da35237b6c5f5cdee91ada92642103439a97
This branch removes AbstractScheduler, BaseScheduler and LeastCostScheduler
and replaces it with DistributedScheduler. Now the points of extension are
handled via the --default_host_filters and --least_cost_functions only.
Also, greatly simplified the zone handling logic in DistibutedScheduler, mostly
by removing the cryptic dicts with helper classes.
Fixed up the Least Cost functions to better deal with multiple functions.
(In a followup patch I will removed the normalization that occurs as this will
be a problem).
Tests were mostly rewritten to support this new world order.
Debated removing JSONFilter since it's not accessible from the outside world,
but decided to keep it as there are discussions afoot on making scheduler
changes without having to redeploy code or restart services.
HostFilters once again get the all the host service capabilities, but now
via a HostInfo class that mostly contains read-only dicts of capabilities.
Virtual resource consumption is done in the DistributedScheduler class now.
The filters/weighing functions don't need to worry about this. Also, weighing
functions only have to return a single host and not worry about the number of
instances requested.
Change-Id: I92600a4a9c58b1add775c328a18d8f48c305861e
This creates a mapping of Glance uuids to preserve the
EC2-specific image id format. This adds a lazily generated
mapping layer that is stored in the database.
This also fixes bug 882658
Change-Id: I64bf6c7297b97f206b967781a28791aa3874ca81
If a exception is caught while processing a previous exception, make sure
to log it so it doesn't silently get discarded
Change-Id: Ic887db9c2592229970737daf5dd9732b2258877b
is the creation of IPs in the DB that are not
currently used(we are building the entire block).
This fix is just a bandaid, but it does cut ~25
seconds off of the quantum tests on my laptop.
(pre)$ ./run_tests.sh -N nova.tests.test_quantum:QuantumNovaIPAMTestCase
QuantumNovaIPAMTestCase
test_allocate_and_deallocate_instance_dynamic OK 11.36
test_allocate_and_deallocate_instance_static OK 11.27
test_create_and_delete_nets OK 10.35
test_validate_bad_network OK 0.10
(post)$ ./run_tests.sh -N nova.tests.test_quantum:QuantumNovaIPAMTestCase
QuantumNovaIPAMTestCase
test_allocate_and_deallocate_instance_dynamic OK 2.94
test_allocate_and_deallocate_instance_static OK 3.12
test_create_and_delete_nets OK 1.86
test_validate_bad_network OK 0.11
Change-Id: I46b629f9ca6e019c7c4c6aa8e869c551e5c13fb8
Fixes bug 862839
listing instances with IPs is extremely inefficient after changes were
made to query the network manager for IP information for each instance.
I tried adding a network manager call that said 'give me IP information
for 'x' instances', but that was also too slow.
We need a solution that caches IP info from the network manager before
we can fully untie things. So, this reverts APIs to use
instance['fixed_ips'] which hasn't been untied in the DB yet.
Change-Id: I37d21105d6306f0a812c5eb0f0717a5094cd17b9
Fixes bug 861666. This also removes some direct database access
in favor of using nova.compute.instance_types throughout the code.
Change-Id: I572cc19454fa76f435f5672d3d6e7ed55c8817da
With this modification both nova-manage and scheduler use the flag
service_down_time and check positive and negative values in a
correct way.
Fixes bug: 867674.
Change-Id: I15c48d80cafa2089cd228c09c61b0a1e513730e8
Removes instance_set_state() from db/api.py. The sqlalchemy version was
removed a while ago so this call is dead.
Change-Id: Icf6f55481bc0c6a9394ca9b7a15fcdab2c1ad483
Adds in bandwidth, state and IP data on standard notifications,
and new notifications on add/remove IP.
These were missing before, and are needed to meet spec.
This fixes bug 849117
Change-Id: Ie586ff3a91a56e5f5eff8abc6905ba6a0b624451
* Removes Ata Over Ethernet
* Adds drivers to libvirt for volumes
* Adds initialize_connection and terminate_connection to volume api
* Passes connection info back through volume api
Change-Id: I1b1626f40bebe8466ab410fb174683293c7c474f
By doing this, we allow the error messages to be more useful. When an import
of a class fails because of a missing module dependency, it would have fail
that way for example:
$ nova-manage
Traceback (most recent call last):
File "./bin/nova-manage", line 84, in <module>
from nova import image
File "/home/jd/Work/src/nova/nova/image/__init__.py", line 22, in <module>
from nova.image import glance
File "/home/jd/Work/src/nova/nova/image/glance.py", line 42, in <module>
GlanceClient = utils.import_class('glance.client.Client')
File "/home/jd/Work/src/nova/nova/utils.py", line 66, in import_class
raise exception.ClassNotFound(class_name=class_str)
nova.exception.ClassNotFound: Class Client could not be found
This does not help the user, since it indicates the class Client cannot be
found, even if it is actually found but fail to import.
With this commit, the error message is better:
nova-manage
Traceback (most recent call last):
File "./bin/nova-manage", line 84, in <module>
from nova import image
File "/home/jd/Work/src/nova/nova/image/__init__.py", line 22, in <module>
from nova.image import glance
File "/home/jd/Work/src/nova/nova/image/glance.py", line 42, in <module>
GlanceClient = utils.import_class('glance.client.Client')
File "/home/jd/Work/src/nova/nova/utils.py", line 66, in import_class
raise exception.ClassNotFound(class_name=class_str, exception=exc)
nova.exception.ClassNotFound: Class Client could not be found: No module named kombu.connection
This helps to know that in this kombu is missing.
It would probably even better to rename ClassNotFound to
ClassCannotBeImported or something like that too.
Change-Id: I4100d931a0a825fa0729d5467d2f9268fdd2a261
Signed-off-by: Julien Danjou <julien.danjou@enovance.com>
When a destination version is specified, check the current version and allow
downgrading the schema. Fixes bug 865357.
Change-Id: I47104158884421de92f50322a72243c170a4f1ad
added floating ip get by fixed address
added fixed_ip_get
moved floating ip testing from osapi into the network tests where they
belong
Change-Id: I3ee53971206e37405a2adc2491412f7896e1af87
Consolidate duplicated code between delete() and force_delete(). Treat soft
deleted instances like hard deleted instances in queries. Fix running unit
tests individually do to using flags from a non-imported module.
blueprint deferred-delete-instance
Change-Id: Id58b607320536364867ee5c8d347b250406d9a2d
For the first cut, we decided to keep it simple and compute progress by counting discrete steps. This is not ideal since some steps, in particular, steps which involve transferring large amounts of data over the network, take *much* longer than others. A better approximation would account for the data-transferred to the destination host, since in most cases, this dominates the time spent.
In addition to adding progress, this patch:
- Allows resizes to use same host for source and destination which is useful for dev environments without a second host. This is enabled by the --allow_resize_to_same_host flag.
- Fixes a bug in the glance and migration XenAPI plugins where the VHDs were being copied into the SR in the wrong order. Before the base-copy was copied first meaning it was possible for snapwatchd to see the base-copy before the dependent cow was present. It was treat the base_copy as an unreferenced parent, and GC it.
- Additional refactoring and cleanups.