Updated hostname sanitization method to more closely follow RFC-952
and RFC-1123. Also moved it to nova.utils, where it seems to fit
better.
Fixes bug 885374
(Patch Set 1) Updated hostname sanitization with more efficient and
[opinion] more readable implementation.
Change-Id: I60d7ee89867c05950bec1fd53b072a1c6247ebea
Removed contrib/nova.sh and any references to it in the RST docs.
removed refernece to old livecd that has nova circa 2010 on it.
.gitignore'ing some additional autogenerated doc files.
Change-Id: I7a07a58a9a6f1112fc7e486367a06f6916207784
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
The CI team is developing a new tool, git-review:
https://github.com/openstack-ci/git-review
which is intendend to replace rfc.sh. This adds a .gitreview file
so that it can automatically determine the canonical gerrit location
for the repository when first run. Later, rfc.sh will be updated to
indicate it is deprecated, and then eventually removed.
Change-Id: Ifc1d34143b1b90faa4324f7750bfc43f69a5f494
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