| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
| |
Fixes for:
* nova/*py
* nova/scheduler/
* nova/compute/*py
* nova/api/ec2/
Change-Id: I7bec89b3551eda84d596e55eeba9ccb9d944a5cb
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently a request for multiple instances issent to the scheduler,
where it is written to the database. It appears that this was done so
that more advanced schedulers could handle the request as one
batch, but the result is the scheduler is sometimes slow enough
that the call will timeout.
Instead this converts to always creating the instance records
locally and making run_instance into a casting instead of a call.
This made a small change to the rpc api for run instance, so the
version was bumped. Legacy messages are still handled properly.
Fixes bug 1036911
Co-authored-by: Chris Behrens <cbehrens@codestud.com>
Change-Id: I63bbc98c285faebec53f8e62857c01548807db68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes LP 1030010.
Close off a back-door allowing users to go over-quota on ram
and/or cores by creating a tiny instance and then resizing
to any size regardless of the remaining usage headroom.
The quota management logic is distributed in the sense that
the reservations are passed with the RPC casts that may fail
silently, so that the rollback or commit is handled by the
actor finalizing the resize/confirmation/reversion.
Up-sizing requires there is sufficient quota headroom upfront
to accommodate the larger size, whereas conversely down-sizing
only results in a usage reduction when the resize is confirmed.
Change-Id: I2b1cbb098c79e37d7ad19221fe23657eb018eae6
|
|
|
|
|
|
|
|
|
|
| |
Updates the scheduler manager so that update_db is an optional
argument. This fixes issues when trying to make RPC calls
with the most recent version (1.4) of the scheduler RPC API.
Fixes LP Bug #1035004.
Change-Id: Ib998c0465cead1b8e117a7344557f8ff496c7e40
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is done by the manager once things are ready on the destination
compute node.
Fixes bug 1034593
Also removes now-unneeded update_db argument passed via rpcapi and bumps
scheduler rpcapi version for prep_resize to 1.4
Change-Id: I0ac3be39877f3afcf42f5996d0da90042fe7c6e3
|
|
|
|
|
|
|
|
|
|
| |
Remove the instance_id parameter and send a full instance dict to the
live_migration method of the scheduler manager. This cuts down on some
unnecessary database access in the scheduler.
Part of blueprint no-db-messaging.
Change-Id: Ic45105300c967c760559df2225e59e515cea8b7b
|
|
|
|
|
|
| |
This argument to run_instance was unused, so just remove it.
Change-Id: I42366514285a2355f647c776af140effc1618b7d
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch goes through code paths related to run_instance in the
scheduler to use explicit arguments instead of **kwargs. I'm trying to
work out exactly what data is getting passed through the system when an
instance is created, so that I can make the no-db-messaging related
changes. This patch helps clarify some things.
Part of blueprint no-db-messaging.
Change-Id: Id83fc1e399e1d5c75af6dd3c8972b8ba9d706af1
|
|
|
|
|
|
|
|
| |
This patch removes *args and **kwargs from _set_vm_state_and_notify.
The only additional argument used was request_spec, so just list it out
explicitly.
Change-Id: I64590a2d79c2d303e7c936a4c3b1545eecfd0f2b
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I started looking at this because of the prep_resize rpc call in the compute
manager. An API server calls prep_resize on the scheduler which then calls it
on a compute node. I will need to make the same changes on the compute side,
but this is the first step.
The prep_resize call was taking two object IDs, an instance UUID and an
instance_type ID. Both of these have been converted. It now takes an instance
dict and an instance_type dict, instead. It can also handle receiving the old
IDs for backwards compatibility. prep_resize also took a topic argument that
was unused, so it has just been removed.
There are a number of changes in the scheduler code tied up in this to make it
more explicit about exactly what arguments are expected instead of just using
*args, **kwargs.
Part of blueprint no-db-messaging.
Change-Id: I4af18e5575e2bb60a410fc8edabf3d607c72aabc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This partially reverts commit 2aaa3d2860eed7574c5df64a8ceeb8a6adf23460.
The problem pointed out by this bug is that these changes introduce a
non-backwards compatibile change to the schedulre rpc API. There are a
couple of acceptable ways to deal with this:
1) Leave most of the code and only remove the client side. This means
that a message sent from an earlier version will still work. This is
the ideal situation for almost *all* changes to rpc APIs. We have to
make a habit of this to eventually be able to support rolling
upgrades.
2) Leave the manager methods, but simply have them raise an exception.
This is a bit better than removing the method because the error
can be made more explicit and obvious. Otherwise, the operator will
get "no such method" rpc exceptions, which will seem a bit more
bizzare.
An example of when this option makes sense is commit
cac332c39645286a11c009094a86f62d02752183. This patch refactored the
live migration code is such a significant way that making it
backwards compatibile seemed rather difficult to do. The old rpc
methods stuck around but just raise an exception. The potential
failure is just that live migration would fail, but the exception
makes it obvious that an upgrade must be completed for live migration
to work.
The current patch implements #2 in the case of get_service_capabilities,
since it hasn't been used since pre-essex. Approach #2 is taken for
get_host_list() as well. It was used until fairly recently, but was
broken, including being broken in Essex. The fix that went into Essex
for this makes it no longer use RPC.
Fix bug 1029262.
Change-Id: I74c7d2a3e88b3a4f114e7da62c56f0481ee64a64
|
|
|
|
|
|
|
|
|
|
|
|
| |
* get_service_capabilities
* get_host_list
* host_service_caps_stale
* delete_expired_host_services
The functions were introduced in d328ddcadb24d1b1961bd05a7676bc8f54b6776f
but are currently unused outside of nova.tests
Change-Id: I15388db5eb684a9f5cfe74f4c2a32b6c87f57894
|
|
|
|
|
|
|
|
|
|
|
| |
- Added notifier files to openstack-common.conf, merged from common.
- Import notifiers from common rather than nova.
- Removed nova-specific notifier code.
- Update some driver paths to refer to the new location within nova.
Should be a no-op, as the common notification code is freshly copied from Nova.
Change-Id: Icdf892bc3826b683fc74f22ead00939beda2859f
|
|
|
|
|
|
| |
I only just moved logging from nova to common, so behavior should remain the same.
Change-Id: I1d7304ca200f9d024bb7244d25be2f9a670318fb
|
|
|
|
|
|
|
|
| |
Fixes instance update notifications to follow the nova convention for
publisher ids. The notification publisher id will now be of the format
service.host (e.g. compute.somehostname).
Change-Id: Ib5c4c962b9ac3e0bac90703b20465f99dfd047c0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added a instance update notification (compute.instance.update) that
will report on changes to vm_state and task_state. The goal here is
to provide useful insight into instance state transitions. (e.g.
BUILDING->ACTIVE)
The new notification has minimial dependencies and is intended for
wide use across the different layers/packages within nova. Calls
in compute api/manager, scheduler, and the virt layer that modify
the instance state have been instrumented with this notification.
Change-Id: I223eb7eccc8aa079b782f6bb17727cd0b71d18ed
|
|
|
|
|
|
|
|
|
|
|
| |
Finishes quota refactoring by making use of the new quota infrastructure.
Partially implements blueprint quota-refactor (the final piece is to
remove the old quota architecture).
This change is fairly substantial. To make it easier to review, it has been
broken up into 3 parts. This is the second part.
Change-Id: I1c8b43198f0d44e9e13a45575361aa043fd0639e
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Part of blueprint versioned-rpc-apis.
One side effect of this change was that nova.scheduler.api was removed
in favor of nova.scheduler.rpcapi. In this case, the api was just a
direct wrapper around rpc usage. For other APIs, I've been following
the pattern that the rpcapi module provides the rpc client wrapper, and
if any other client-side logic is needed, that's where an api module is
used.
Change-Id: Ibd0292936f9afc77aeb5d040660bfa857861eed1
|
|
|
|
|
|
|
|
|
|
|
| |
This is a rearchitecting/rewriting of quota handling to correct the
quota atomicity issues highlighted by bug 938317. Partially implements
blueprint quota-refactor as well.
This change is fairly substantial. To make it easier to review, it has been
broken up into 3 parts. This is the first part.
Change-Id: I805f5750c08de17487e59fe33fad0bed203188a6
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Note that previously several notification drivers
created an admin context and embedded it in their
messages. Those drivers now use the passed-in
context instead if it's available.
For blueprint novaplugins.
Change-Id: Icb89030256022d0a68db4a147611fd37fe83316a
|
|/
|
|
|
|
|
|
|
|
|
|
| |
This patch common.excutils from openstack-common, which includes
save_and_reraise_exception(). The patch also converts the code
base to use it from there instead of nova.utils and then removes
it from nova.utils.
The initial motivation for this was removing another nova dependency
from nova.rpc so that it can eventually be moved to openstack-common.
Change-Id: I7354ca51a02aec9c709cf33f77d4abc46acc2742
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use import_class(), import_object(), and import_module() from
openstack-common's importutils module. The equivalent functions have
been removed from nova.utils. A few modules had import order cleaned up
in passing, as well.
My initial motivation for this was to remove some more usage of nova
bits from nova.rpc as another step towards being able to move nova.rpc
import openstack-common. Since I was pulling importutils into nova, I
went ahead and converted the whole thing.
Change-Id: I7c7786cf0001bcd06db52b9a99ff4284a3f6c6fa
|
|
|
|
| |
Change-Id: I603eaa43b784e38532e88e9d2c844183730d44e9
|
|
|
|
|
|
|
| |
Openstack => OpenStack
for nova/*py
Change-Id: Ibcfae4776422a515a109e59510fc84f8b63c00b9
|
|\
| |
| |
| | |
developer guide"
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
guide
blueprint sphinx-doc-cleanup
bug 945160
- Correct parameter declarations, list formatting, cross-references, etc.
- We don't need "let" in generate_autodoc_index.sh since we aren't doing math.
- Change conf.py to not prefix class and function names with full namespace
in generated output to save width on the screen.
Change-Id: I9adc8681951913fd291d03e7142146e9d46841df
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
bug 928521
modified nova/scheduler/manager.py to reset vm_state to ACTIVE and set
task_state to None when prep_resize raises a NoHostsFound
refactored run_instance and prep_resize so they don't go through
_schedule and now must be implemented in driver
Changed behavior to set vm_state to error on any other exception in
prep_resize.
Change behavior to change instance vm_state to ERROR on exceptions
Added tests that the vm_state gets updated
Added tests that schedule_prep_resize and schedule_run_instance
have no implementation in the Driver base class
Had to adjust methods and tests for Multi scheduler to reflect the
new Scheduler contract
Change-Id: Ibcac7ef0df3456793a2132beb7a711849510da80
|
|
|
|
|
|
|
| |
Re-added lost fake virt hypervisor info (required for local dev).
Added multiple exchange topic support to RabbitNotifier.
Change-Id: I33cc9076ee35061c21852cabba3275006fc87b86
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is a new Zones implementation coming that will use AMQP-to-AMQP
channels vs. the public API. This is being done for three reasons:
1. remove complications in the OpenStack API (and possibly allow EC2 Zones)
2. remove dependencies on keystone and novaclient
3. faster scheduling (fewer chances for race conditions)
Learn more here:
http://wiki.openstack.org/EssexSchedulerImprovements
Change-Id: I6fe538923dd5ae19276afac2ac3311a285fd5c99
|
|
|
|
|
|
| |
* Make modules use getLogger(__name__) and log to the result
Change-Id: Ib6d69b4be140ec89affc86ed11e65e422d551df1
|
|
|
|
|
|
|
| |
Make FLAGS a ConfigOpts instance and fix up all the places where we
expected FlagValues behaviour.
Change-Id: I8f96f42e0d8d30ba6b362d29861e717cf0fa9e89
|
|
|
|
|
|
|
|
|
| |
Fixes bug #925281
Backslash continuations removal for packages
nova.network and nova.scheduler
Change-Id: I84f886d6bc179ecf5d09e57d278bfa644d5d851d
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move it here so that it can be kept in sync with openstack-common using
the new update.py script for code in openstack-common's incubation area.
See here for more details:
http://wiki.openstack.org/CommonLibrary#Incubation
Note: this commit just moves the existing code in Nova with no other
changes. A subsequent commit will sync it with latest openstack-common
so that it is easier see the new changes.
Change-Id: If88d678b1b9bad3d37117de7f7159d7fea8ab4c8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The next obvious step in porting to cfg is to define all options using
cfg schemas directly rather than using the flags.DEFINE_* helpers.
This is a large change, but it is almost entirely pure refactoring and
does not result in any functional changes.
The only change to note is that the default values for glance_host,
glance_api_servers and default_publisher_id options are now using opt
value interpolation i.e.
-glance_host=_get_my_ip()
+glance_host='$my_ip'
-glance_api_servers=['%s:%d' % (FLAGS.glance_host, FLAGS.glance_port)]
+glance_api_servers=['$glance_host:$glance_port']
-default_publisher_id=FLAGS.host
+default_publisher_id='$host'
Also note that the lower_bound check on the {report,periodic}_interval
options are no more, but this has been true since cfg was first added.
Change-Id: Ia58c8f0aaf61628bb55b1b8485118a2a9852ed17
|
|
|
|
| |
Change-Id: I5e1f5dddaf45d1c6eae8666647425bff748b639e
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes bug 918615
start_instance doesn't need to go through scheduler because it still has
instance['host'] set and resources are still accounted for in the
scheduler, which means there's still room to restart it on its assigned
host (even though it is deleted from the virt layer)
Change-Id: I3cdd73b7ad2297b57f7e36be84819ff233ac8f08
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a bit of a scheduler refactoring to support future scaling work
as a part of blueprint scaling-zones.
Also fixes bug 891971 (remove unused set_network_host in scheduler)
With or without that blueprint work, this cleans a number of things up
and paves the way for combining a lot of the schedulers by using this
new 'HostManager' for filtering and weighing (future work :)
On to the goodies:
Introduces new HostManager, splitting code out from ZoneManager.
Zone communication and management is handlded in the ZoneManager.
Host filtering and weighing is handled in the HostManager.
ZoneManager is removed from the SchedulerManager and direct calls to it
from the SchedulerManager now occur via the scheduler driver. This
simplifies a number of things.
ZoneManager and HostManager classes to use are now flags. This allows
one to extend the current classes and use them.
HostManager uses a HostState class to keep info about hosts. This class
needs to be extendable. Since it's very much tied to the HostManager,
the HostState class to use is not a flag. It is, instead, a class
variable in HostManager.
Filtering functions now accept a single host to filter. This improves
performance by not having to build a new array of hosts within every
filter function.
Filtering functions now accept a more generic 'filter_properties'
dictionary which we can fill with information available for filtering.
Adding additional data to this 'filter_properties' can be done by
subclassing.
Weighing functions now accept this 'filter_properties', also, although
it's poorly named ATM. Will be cleaned up in a future branch when I
move some weighing functions into the host manager.
Filtering tests are true unit tests now.
test_zones was moved from top level to under scheduler as zone_manager
tests and refactored to be true unit tests.
Host tests are true unit tests now.
Other minor cleanups
Change-Id: I0ef2acef6639b4500c400c18cf2c673cb80f0150
|
|
|
|
|
|
|
|
|
|
|
| |
Fix based on revewer's comment
upgraded the migration version
nova/db/sqlalchemy/migrate_repo/versions/069_block_migration.py
rebase on master
Change-Id: Ia762f8dec761c3d595bc6fcd39f127f6d92306d2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes bug 904971
Scheduler error handler was looking for instance_id when it may or may
not exist. Added the proper code for it to determine whether the
instance was actually created in the DB or not and how to find its ID.
Note: there's some pretty nasty stuff in here, but unavoidable without
larger changes. I'd like to hold off on these larger changes, because
the problem should be solved with some of the scalability work coming.
Tests included.
Change-Id: Ief5fde8128437c9dc257af9c4d0c2950d0962ce5
|
|
|
|
|
|
|
|
|
|
|
| |
this implements the blueprint nova-vm-state-management
It implements the following functionalities:
- Filter compute api calls according to state of the VM
(defined in compute/state_checker).
- Sets error state if the scheduler cannot allocate the VM in any host
- Handles the create/delete concurrency in the compute manager
Change-Id: Ie6d016b7d4781f70bb5967f204fa88a6412bd727
|
|
|
|
|
|
|
|
|
|
|
|
| |
Additional work:
1. Added support for tasks being scheduled at differing rates via the
`ticks_between_runs` argument.
2. Fixed `reclaim_queued_deletes` so that it doesn't run if
`FLAGS.reclaim_instance_interval` is 0.
Change-Id: I18c01baf07bd06301a6fe26a7b29dc2452a4fa96
|
|
|
|
|
|
|
|
|
|
| |
When the scheduler's selected driver method raises an exception, such
as NoValidHost, any affected instance must be placed into the ERROR
state. This is done by catching exceptions raised in _schedule() and,
if 'instance_id' is present in kwargs, moving the identified instance
to the ERROR state. This fixes bug 886289.
Change-Id: I5c73549e073493701b86658569823b9bc161291d
|
|
|
|
| |
Change-Id: I79daf7519c99cc363ac7175c85912298f273da8a
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes bug 844160
Makes the servers create API call work with all schedulers, removes
'zone boot', and folds create_instance_helper back into servers
controller.
Notable changes:
1) compute API's create_at_all_once has been removed. It was only used
by zone boot.
2) compute API's create() no longer creates Instance DB entries. The
schedulers now do this. This makes sense, as only the schedulers will
know where the instances will be placed. They could be placed locally or
in a child zone. However, this comes at a cost. compute_api.create() now
does a 'call' to the scheduler instead of a 'cast' in most cases (* see
below). This is so it can receive the instance ID(s) that were created
back from the scheduler. Ultimately, we probably need to figure out a
way to generate UUIDs before scheduling and return only the information
we know about an instance before it is actually scheduled and created.
We could then revert this back to a cast. (Or maybe we always return a
reservation ID instead of an instance.)
3) scheduler* calls do not return a host now. They return a value
that'll be returned if the caller does an rpc.call(). The casts to
hosts are now done by the scheduler drivers themselves.
4) There's been an undocumented feature in the OS API to allow multiple
instances to be built. I've kept it.
5) If compute_api.create() is creating multiple instances, only a single
call is made to the scheduler, vs the old way of sending many casts. All
schedulers now check how many instances have been requested.
6) I've added an undocumented option 'return_reservation_id' when
building. If set to True, only a reservation ID is returned to the API
caller, not the instance. This essentially gives you the old 'nova
zone-boot' functionality.
7) It was requested I create a stub for a zones extension, so you'll see
the empty extension in here. We'll move some code to it later.
8) Fixes an unrelated bug that merged into trunk recently where zones DB
calls were not being done with admin context always, anymore.
9) Scheduler calls were always done with admin context when they should
elevate only when needed.
10) Moved stub_network flag so individual tests can run again.
* Case #6 above doesn't wait for the scheduler response with instance
IDs. It does a 'cast' instead.
Change-Id: Ic040780a2e86d7330e225f14056dadbaa9fb3c7e
|
| |
|
|
|
|
| |
to FLAGS; rework SchedulerManager() to only catch missing 'schedule_<method>' attribute and report other missing attributes
|
|\
| |
| |
| | |
I wrote some description the below URL. I hope it may help for reviewing.
<http://etherpad.openstack.org/kvm-block-migration>
|
| |\ |
|