Fixes bug lp885815 by ensuring the scheduler doesn't update the database with destination host. Compute manager now updates upon completion of resize.
Change-Id: I3f9ac664c8807e8523802e2485d316a731190764
* adds nova/local.py:store for storing greenthread local data
* saves a weak reference to the last context object created
* uses the last context object if it exists for logging
* Fixes bug 879582
Cc: stable-maintainers
Change-Id: Ic373556ce197f2e8e7d23c807a65b12111db96eb
Only when scheduling with distributed scheduler for now.
Adds flags:
flags.DEFINE_integer('reserved_host_disk_mb', 0,
'Amount of disk in MB to reserve for host/dom0')
flags.DEFINE_integer('reserved_host_memory_mb', 512,
'Amount of memory in MB to reserve for host/dom0')
Change-Id: Ib9b8a4deca241db399a8541ab21697ab08e29dd6
This changes the security groups extension tests to use the Controllers
directly, bypassing the slow wsgi setup process. This is part 2 of this
patch and contains the majority of the changes. The code required more
changes than the other test suite speedups because of how the previous
code was written and as a result, the diff is kind of long. As a bonus,
there is a net removal of almost 150 lines.
Change-Id: I7893cf16092ce58860607fd4ab2df10550fe3270
Fixes bug 885349
We can short circuit waiting on the scheduler if we're in a single zone
deployment and only building 1 instance. This patch checks for that
case and creates the instance DB entry directly in the API (in
compute/api) without the call to the scheduler.
Change-Id: I98b27156167f057d11fbc56a9ff99d4e2ec423d3
This is the first step in moving this part of the test suite to using
Controllers directly, bypassing wsgi. After these patches get merged,
tests should end up getting sped up by about 45 seconds.
This is the first in a set of smaller merges that should hopefully
make the original 1200 line patch easier to review.
Change-Id: Ib2849f64220bf2efa333cd739bafdd241348a4a4
Fix double-registration of the syslog handler.
NovaRootLogger.setup_from_flags is called twice from log.setup() -- once
through NovaRootLogger.__init__ and once through reset(). setup_from_flags
wasn't idempotent, so this resulted in the syslog handler being registered
twice.
Rather than fix the twisty-turny maze that is setup(), I've opted to make
setup_from_flags idempotent in this regard, by always unregistering the
syslog handler before doing anything else.
Change-Id: I59ad61751e1a19d2cbb73dc1deea9c708d4c5032
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
Currently we're returning a lot of information in the POST /servers
response. This isn't according to spec and is misleading to other
projects that might try and implement the OpenStack API specification.
The example on docs.openstack.com for the v1.1 API says:
"Note that when creating a server only the server ID, its links, and
the admin password are guaranteed to be returned in the request.
Additional attributes may be retrieved by performing subsequent GETs
on the server."
We're returning too much right now and this patch addresses that.
Further patches should be submitted to refactor the 'view builder'
concept as using keyword arguments like this patch does is not ideal
and I recognize that.
(Patch Set 2) Merged with master + conflict fix
(Patch Set 3) Reverted non-nova-standard superclass call
Change-Id: If246e51dbf84f1db3d2905694235692ab027859d
SQLite uses synchronous mode by default, which will synchronously write
data to disk. This will increase durability of data at the expense of
performance. The test suite does not need data to be durably written
to disk, so disabling synchronous mode results in a speeding up the
full test suite by about 20 seconds.
Change-Id: I5ca1ab1e8691e912d801fe1002dff752c82f3d5d
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