| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
select_destinations returns a list of (host, node) tuples that satisfy
the request_spec and filter_properties passed to it. This will allow
the conductor to get a list of destinations for workflows such as
creating or resizing an instance and then handle the orchestration
itself.
part of bp query-scheduler
Change-Id: I1a42cea64dbad67562d7efe8d759e6efb5ec8121
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a first pass at client side version control for rpc. It allows
you to configure a max version of messages that clients are allowed to
send. You can find one example of how clients need to adapt in the
conductor rpcapi. All other changes in rpc apis since the grizzly
release are not applicable to this.
Some future improvements to this could be reporting the versions
supported by running services and having that be discoverable via the
API. We could also consider allow setting these client side version
caps via the API. For now, recommended values for these config
options while attempting a rolling upgrade will just have to be documented.
The config options allow specifying specific rpc api version numbers if
desired, but an alias of 'grizzly' is also supported. So typically at
the start of a rolling upgrade you'd have:
[upgrade_levels]
compute=grizzly
conductor=grizzly
scheduler=grizzly
... etc ...
And as you update all instances of a service, you would remove that bit
from your configuration across the deployment using your config management
system of choice.
DocImpact
Implements blueprint rpc-version-control.
Change-Id: I2c0fd6dd7484c87823846d7c31d6525d93cd1b43
|
|
|
|
|
|
|
|
|
|
| |
This method does not at all belong in the scheduler. Its only use is
from being remotely called by nova-manage to whom it returns data
fetched from the db. I think nova-manage is better of fetching this
data on its own instead of making this extra round trip to the
scheduler.
Change-Id: I435300cdd15bdd041cbe5718ae064b98cec4cceb
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Each service implemented the get_backdoor_port method individually. This
patch moves the implementation of this method to the base rpc API
instead, and removes the now unnecessary code from each of the services.
The server side method was left on all of the managers for rpc backwards
copmatibility. They can be removed on the next major rpc version bump
of those APIs.
Part of blueprint base-rpc-api.
Change-Id: Ia8838fafd80eb86a1c2d66f5e97370042d8d8c53
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The cfg API is now available via the oslo-config library, so switch to
it and remove the copied-and-pasted version.
Add the 2013.1b4 tarball to tools/pip-requires - this will be changed
to 'oslo-config>=2013.1' when oslo-config is published to pypi. This
will happen in time for grizzly final.
Add dependency_links to setup.py so that oslo-config can be installed
from the tarball URL specified in pip-requires.
Remove the 'deps = pep8==1.3.3' from tox.ini as it means all the other
deps get installed with easy_install which can't install oslo-config
from the URL.
Make tools/hacking.py include oslo in IMPORT_EXCEPTIONS like it already
does for paste. It turns out imp.find_module() doesn't correct handle
namespace packages.
Retain dummy cfg.py file until keystoneclient middleware has been
updated (I18c450174277c8e2d15ed93879da6cd92074c27a).
Change-Id: I4815aeb8a9341a31a250e920157f15ee15cfc5bc
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a select_hosts(...) method to the scheduler manager
rpc that allows other services to query it for the best suited
host instead of relying on it to proxy its messages.
This can be used by extensions that need the scheduler to determine
the best-fit host but want to prepare and send their own messages
to that host.
Change-Id: I5b4760114dfcdb0464fac8ea81f46f7532ac0580
|
|
|
|
|
|
|
|
| |
The scheduler_topic opt is only used in nova.scheduler.rpcapi and it
makes sense for the RPC module to "own" the topic option.
blueprint: scope-config-opts
Change-Id: Iafb8705eb716b650b63e060fe1dd36666bcee812
|
|
|
|
|
|
|
|
| |
This adds a get_backdoor_port function to the scheduler
service which enables returning the eventlet_backdoor port
from rpc for the service.
Change-Id: Ib88e2a9e709d5240722027c94e6762b4a3bd918c
|
|\ |
|
| |
| |
| |
| |
| |
| | |
This makes it possible to send multiple capabilites by single RPC.
Change-Id: I7c1b75eada17181c4fe08c55992b34d66276f498
|
|/
|
|
|
|
|
|
| |
This should fix the unit test failures observed in:
https://review.openstack.org/#/c/17539/
Change-Id: I75463a9ea9557f669b701c778bf24eb00502f47a
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The only reason for importing nova.config now is where one of the
options defined in that file is needed. Rather than importing
nova.config using an import statement, use CONF.import_opt() so
that it is clear which option we actually require.
In future, we will move many options out of nova.config so many
of these import_opt() calls will either go away or cause a module
other than nova.config to be imported.
Change-Id: I0646efddecdf2530903afd50c1f4364cb1d5dce1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Modules import nova.config for two reasons right now - firstly, to
reference nova.config.CONF and, secondly, if they use one of the
options defined in nova.config.
Often modules import nova.openstack.common.cfg and nova.config
which is a bit pointless since they could just use cfg.CONF if
they just want to nova.config in order to reference CONF.
Let's just use cfg.CONF everywhere and we can explicitly state
where we actually require options defined in nova.config.
Change-Id: Ie4184a74e3e78c99658becb18dce1c2087e450bb
|
|
|
|
|
|
|
|
|
| |
nova.flags is no longer needed. nova.config is now used.
Removes FLAGS and LOG from baremetal_host_manager completely, which
doesn't use them.
Change-Id: Ia1a4597e28e8ebb8adc5a77b8b006aabe354ac15
|
|
|
|
|
|
|
|
|
|
|
| |
Use the global CONF variable instead of FLAGS. This is purely a cleanup
since FLAGS is already just another reference to CONF.
We leave the nova.flags imports until a later cleanup commit since
removing them may cause unpredictable problems due to config options not
being registered.
Change-Id: Ia3f66aec300fd88e91cef926da735f9e95aa2cc2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Continuation of I0b540e54dbabd26901a7530035a38583bb521fda
* delete scheduler.simple
* modify scheduler.multi instead of delete to continue supporting
I753e87fc8979fd0b62529974f00cf11fa55b3d63
* update scheduler.multi docstring
* scheduler.rpcapi bumped to 2.3
* change default scheduler to scheduler.filter_scheduler
DocImpact
part of bp delete-nova-volume
Change-Id: Ie9d9b46742b2d92cd1e9ffe982ef658907a1d411
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If one volume was failed to get scheduled, removing such volume should
also clean up reservation.
Also when create_volume is ready to send to scheduler, reservation
should be committed no matter backend can successfully create that
volume or not since deleting volume call will do a minus reservation
even on volume with 'error' status.
This change updates RPC API to version 2.2
Fix bug 1052052
Change-Id: Ia632a0e49318d534f0acbd3df5c9f6bb86eefa2a
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit de09c1866b9138610914ddaaebb9b030884d1e28 updated the scheduler
rpc API but did not account for rpc API versioning. This patch fixes it
up. It updates the manager to reflect that it implements '2.1' and is
now backwards compatible with the old method signature. The client side
rpcapi now indicates that it requires '2.1' when sending the new
image_id argument.
Fix bug 1052670.
Change-Id: Ide541f38d3d0129809da56baffe95bc3faab0569
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds following extensions:
1. Create volume from image
2. Copy volume to image
Added unit tests.
Implements: blueprint create-volume-from-image
Conflicts:
cinder/api/openstack/volume/contrib/volume_actions.py
cinder/tests/api/openstack/fakes.py
cinder/tests/api/openstack/volume/contrib/test_volume_actions.py
cinder/tests/policy.json
nova/api/openstack/volume/volumes.py
nova/flags.py
nova/tests/api/openstack/volume/test_volumes.py
nova/tests/test_volume.py
nova/utils.py
nova/volume/api.py
nova/volume/manager.py
This is based on a cherry-pick of cinder commit
2f5360753308eb8b10581fc3c026c1b66f42ebdc with bug fixes
8c30edff982042d2533a810709308b586267c0e9 and
ffe5036fa0e63ccde2d19aa0f425ec43de338dd7 squashed in.
Change-Id: I9c73bd3fa2fa2e0648c01ff3f4fc66f757d7bc3f
|
|
|
|
|
|
|
|
|
|
|
|
| |
In commit ce4dbbd7, the BASE_RPC_API_VERSION was changed to '2.1' in
nova.compute.rpcapi. This should remain '2.0' until the API goes to
3.X. Only specify version '2.1' for the method that requires it
(rebuild_instance).
Add a NOTE above each instance of BASE_RPC_API_VERSION to try to help
clarify this for the future.
Change-Id: I06cef44c905e8966505d5fb5b1046d6a0c75d533
|
|
|
|
|
|
|
|
| |
Like we did for the compute RPC API, add version 2.0 of the scheduler
API while still retaining 1.x support. This allows all services to
be updated with 2.0 support before 1.x support is removed.
Change-Id: If438d5b6f521ea4c487d1490d4b8cf6547ba5c72
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a scheduler RPC message isn't handled directly by a SchedulerManager
method, the __getattr__() fallback passes the message to a driver
method in the form of schedule_${method}() and, if that doesn't exist,
instead calls the schedule() method supplying the topic and method
args.
This is pretty bizarre stuff and we appear to only use it in two cases:
1) live_migration - this is how the schedule_live_migration()
method in the driver gets called, but the side-effect is that
we require the client to pass a topic argument which is never
used. This would be much more sanely handled with an explicit
SchedulerManager.live_migration() method.
2) create_volume - the volume API asks the scheduler to pick a
target host for create_volume() using this method. This would
be easily handled with an SchedulerManager.create_volume()
method.
Change-Id: I1047489d85ac51d8d36fea1c4eb858df638ce349
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Revert "Fix rpc error with live_migration."
This reverts commit f72f3498656e8b4857001a1f3d194305245d56ba.
Add missing topic argument topic=FLAGS.compute_topic, to
nova/compute/api.py
Fixes bug 1036449
Change-Id: I11b77da60c8f8aa28748f8968380bca5b7b80e73
|
|
|
|
|
|
|
|
| |
The topic argument to live_migration was removed on the manager side in
rpc API version 1.3, but was not removed from scheduler/rpcapi.py.
Remove it now.
Change-Id: I0b1c68848f7bd55f6f10c63b9433746f0a343a63
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A recent patch change the RPC_API_VERSION in compute/rpcapi.py to 1.1.
This change was the right thing to do in compute/manager.py, but not
compute/rpcapi.py. This patch changes it back to 1.0, and changes the
code to only specify that 1.1 is required for the new method.
This version in the rpcapi modules is used as the default version to set
in a message. The version sent in a message is the minimum version
required to be implemented on the manager side for the message to be
successfully processed. For most messages, that is just 1.0. In the
case of the new method, it's 1.1.
This patch also changes the name of his variable in the rpcapi modules
from RPC_API_VERSION to BASE_RPC_API_VERSION to help clarify this a bit
more.
Change-Id: I2bb4602845869bd44b39531eeb4f1e7c0c4c20c2
|
|
|
|
|
|
|
|
| |
Final patch for blueprint common-rpc.
This patch removes nova.rpc in favor of the copy in openstack-common.
Change-Id: I9c2f6bdbe8cd0c44417f75284131dbf3c126d1dd
|
|
|
|
|
|
|
|
|
|
|
| |
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
|