Commit Graph

40 Commits

Author SHA1 Message Date
Takashi Kajinami 13e0df8130 Remove support for [scheduler] query_placement_for_availability_zone
... because the parameter was removed from nova.

Depends-on: https://review.opendev.org/c/openstack/nova/+/886779
Change-Id: I4c4a340741bd28247fc7e0a1ba831ad9108fa304
2023-09-08 14:42:28 +09:00
Takashi Kajinami 51829b985f Replace legacy facts and use fact hash
... because the latest lint no longer allows usage of legacy facts and
top scope fact.

Change-Id: Ibe75e48eeb387c213c42511797c59b9df39a7762
2023-03-02 12:25:22 +09:00
Takashi Kajinami bcfca7a4dd Remove ineffective support for [scheduler] periodic_task_interval
This parameter was deprecated during Xena cycle[1] and has had no
effect since then.

[1] 3375efcfd4

Change-Id: I36227d92bbbc64a4d3d756088ca57c8a6148d270
2022-04-19 09:12:28 +09:00
Takashi Kajinami aa2db56179 Do not define service resource when service management is disabled
Change-Id: I78662bd9579f3e920f0a08cf9cd27de1defb02aa
2022-02-11 00:14:40 +09:00
Takashi Kajinami 053c6e7729 Avoid testing details of nova::db multiple times
This change drops some redundant test cases which assert functionality
of nova::db class from spec files for different classes.
The nova::db class has its own spec file and is tested by that.

Change-Id: I92fd649b4a546dd74fac81b5a9231712768ec707
2022-01-21 20:39:08 +09:00
Takashi Kajinami d62be4a321 Avoid testing details of oslo::db
Change-Id: I3eb3ac65ee08f818ee5b8403548fb575cfe9675e
2022-01-21 20:38:36 +09:00
Takashi Kajinami 3375efcfd4 Deprecate support for [scheduler] periodic_task_interval
... because the parameter was removed from nova[1].

[1] 9d53f366ff8c9a29c4ddbf0fa27febbce7442fc9

Change-Id: Ie2e2c40a37c5d206ef483f48fac04a027f793b4b
2021-04-26 22:07:40 +09:00
Takashi Kajinami 0a3ab851a7 Clean up deprecated scheduler parameters
Change-Id: I82a1ce85d7f0d793bb9ff57f69d085c3a88ef2f0
2021-04-26 22:06:55 +09:00
Rajesh Tailor 1c8925468e Add parameter `query_placement_for_routed_network_aggregates`
Add parameter `query_placement_for_routed_network_aggregates`
that allows the scheduler to look at the nova aggregates related
to requested routed network segments.

Change-Id: I1db6a5d92a56a1a768826b6a9434e2f3c2602eff
2021-02-22 17:12:13 +05:30
Rocky 5e269a9f32 Deprecate database options
Change-Id: I05386140888a42d1bc83e4be38a812a7832c1904
2020-10-19 08:49:18 +11:00
Takashi Kajinami 248deef18e Migrate scheduler-generic parameters to nova::scheduler
This patch migrates some parameters from nova::scheduler::filter to
nova::scheduler, because these are parameters to determine behavior of
nova-scheduler, and not specific to scheduler filters.

Note that the default value for max_attempts parameter has been changed
from 3 to $::os_service_default, because its default is defined as 3 in
nova implementation.

Change-Id: Ic74e1fdb4adf9f954b6e58343050c5e166d40889
2020-10-01 02:44:28 +00:00
Takashi Kajinami 9bff55b175 Deprecate nova::scheduler::scheduler_driver
... because the actual parameter in nova, [scheduler]driver, was
deprecated[1].

[1] 6a4cb24d39

Change-Id: Ic0b99f4758c941b9ec14b98b7a8b447ef9043eef
2020-06-18 02:58:50 +00:00
Rajesh Tailor 8ffc47e48e Add parameter for `query_placement_for_availability_zone`
Add new parameter `scheduler/query_placement_for_availability_zone`
that allows the scheduler to look up a host aggregate with metadata
key of availability zone set to the value provided by incoming request,
and request result from placement be limited to that aggregate.

Change-Id: Ie02c732d9d75e1d5783f2aa841f244c9bee695ed
2020-05-19 04:48:34 +00:00
Rajesh Tailor 4b13841995 Expose enable_isolated_aggregate_filtering parameter
Add support for configuring scheduler parameter option
`enable_isolated_aggregate_filtering` which allows the
scheduler to restrict hosts in aggregates based on matching
required traits in the aggregate metadata and the instance
flavor/image.

Change-Id: Iefb7e8a4d867b8721cdb5b00c2f71b2dd3a492c0
2020-04-09 11:33:01 +05:30
Rajesh Tailor 23c242c16e Expose placement_aggregate_required_for_tenants parameter
Add support for configuring scheduler parameter option
`placement_aggregate_required_for_tenants` which controls
whether or not a tenant with no aggregate affinity will be
allowed to schedule to any available node.

Change-Id: I61e3784ff40665ced25a52f864455c2a3518def0
2020-03-31 14:24:51 +05:30
Tobias Urdin e75c6fbd63 Add scheduler max_placement_results param
Adds the max_placement_results config option
for the scheduler.

Change-Id: I6652b1321dd64f428fff2bc920f65e09e294ddfe
2019-11-22 23:05:57 +01:00
Oliver Walsh d7eb253e4d Include nova::availability_zone in nova::api and nova::conductor
For some reason this was included in nova::compute and nova::scheduler
but never included in nova::api eventhough bug #1529065 specifically
calls out the fact that it is missing.

Looking at the code - nova-api definitely requires it.
E.g the server create request handler sets the target AZ to
CONF.default_schedule_zone if none
https://github.com/openstack/nova/blob/stable/queens/nova/api/openstack/compute/servers.py#L486

and the az request handler skips the internal_service_availabily_zone
when listing AZs
https://github.com/openstack/nova/blob/stable/queens/nova/api/openstack/compute/availability_zone.py#L38

nova-conductor also requires it as it calls
availability_zones.get_host_availability_zone which defaults to
CONF.default_availability_zone

Change-Id: If4d6a4a8f4cc1e7066cacb00da67d5433acd6ac5
Closes-bug: #1529065
2019-10-21 16:31:44 +01:00
Rajesh Tailor 09b5d82294 Expose limit_tenants_to_placement_aggregate parameter
Add support for configuring scheduler parameter option
'limit_tenants_to_placement_aggregate' to enable tenant
isolation with placement.

Change-Id: I37ce0633b3b56563f373fadfb74820b2896d6734
2019-07-08 12:02:00 +05:30
Piotr Kopec 440fe0d318 Add parameter for `scheduler/query_placement_for_image_type_support`
Add paramerer `query_placement_for_image_type_support` that controls
whether to add ask placement only for compute hosts that support the
``disk_format`` of the image used in the request.

Change-Id: I6d895a4789f44380565e3d2e3461d0bbb501c86b
2019-06-10 10:00:46 +02:00
ZhongShengping 4478fdc82f Deprecate idle_timeout option
The idle_timeout parameter is deprecated, use connection_recycle_time
instead[1].

[1]https://review.opendev.org/#/c/334182/

Change-Id: Icdf42da63cc8bcb43c5320a1a1acf6a84682b706
Depends-On: https://review.opendev.org/656106/
Closes-Bug: #1826692
2019-04-29 12:02:21 +08:00
Alex Schultz 6efc36bd95 Update python packaging version for RHEL8
The novaclient is python3-novaclient for RHEL8

Change-Id: I4595f4a5dce28d40deb3bd1147a9804802d474a0
2018-11-28 08:30:08 -07:00
Tobias Urdin 3878df1f36 Add scheduler workers support
The configuration option scheduler/workers was added
in Rocky [1]. This patch adds the nova::scheduler::workers
parameter which can be used to set this new config option.

[1] https://docs.openstack.org/releasenotes/nova/rocky.html

Change-Id: I217444b2c30d62347cd9e25def769e94d12a70fc
2018-10-08 22:11:19 +00:00
Yaguang Tang ab51c308e2 Remove deprecated scheduler and scheduler filter options
This is a code clean and has no user impact.

Change-Id: I76dcf7772b25d18a8686dcd8a0279d999725cb39
2017-07-09 13:22:58 +08:00
Dmitry Tantsur 8c8d795067 Expose nova::scheduler::discover_hosts_in_cells_interval option
Starting with the Ocata release, bare metal nodes are no longer get recognized
by nova automatically. To avoid forcing users into running nova manage command
each time they enroll a node, we will have to allow enable the periodic task
to do so. This option configures it.

Change-Id: I1f0e40474018de593cb3f8798b5212285f5629a4
Closes-Bug: #1697724
2017-06-13 17:55:53 +02:00
ZhongShengping fd9a3550ee oslo db: check puppet resource instead of actual config in spec
Change-Id: I9ae857433d7fed3f9fbac0fa3fa22b5153154869
2017-04-11 16:15:08 +08:00
Alex Schultz 1083ee680a Update scheduler config options
The scheduler and scheduler filter options have been moved out of the
DEFAULT name space to scheduler and filter_scheduler namespaces. This
change updates the configuration namespace for the existing
configuration options, removes the DEFAULT version and adds additional
configuration options.

Change-Id: I8f1da7546bf6aa20bb2cb17d3c8163963ef32e2a
2016-11-22 14:37:46 -07:00
Emilien Macchi 6bffa3a961 Change scheduler configurations to use entrypoints
Update defaults values for scheduler_driver and scheduler_host_manager
to match with upstream values in Nova.

It was configured in Devstack:
b298e57c9f

And old values don't work anymore since:
7f1ff4b226

Change-Id: Idbbae5281d429edb95783cdde3d45804ddaeace1
Closes-Bug: #1572467
2016-04-20 12:22:03 -04:00
Iury Gregory Melo Ferreira 2a4e110a7e Switch Nova to $::os_service_default - Part1
Switch Nova to use $::os_service_default
Change logging.pp, db.pp and tests.

Change-Id: I928a93534c6d27c020b7afb5b7dda32c379e9d62
Related-bug: #1515273
2015-12-01 12:31:22 +00:00
kirby@puppetlabs.com 895e057abb Enable nova service by default
This commit updates the default value for enable for nova components to
default to true, instead of false. Without this
change the nova service is not enabled by default resulting in a
different behavior than with other puppet openstack modules.
Associated tests are updated to expect the change in defaults.

Co-Authored-By: Cody Herriges <cody@puppetlabs.com>
Change-Id: I49fc84f9fedfe00d7846441e1b49334abb09e0eb
Closes-bug: #1220473
2015-07-15 13:58:09 -07:00
Jiri Stransky 3d1ff0e135 Fix default for scheduler_driver
The default value was incorrect, breaking nova-scheduler
configuration and resulting in an error message:

AttributeError: 'HostManager' object has no attribute 'select_destinations'

FilterScheduler should be the default.

Change-Id: Ie4903019cbfe30088f42ac8b76174ed85ec00fcc
Closes-Bug: #1473130
2015-07-09 18:15:40 +02:00
Mike Dorman 36a24522c1 Add scheduler_driver parameter to nova::scheduler class
Support setting the scheduler_driver configuration parameter
for nova-scheduler.

Change-Id: Ie8afbbd0f0d312b2a2b55dd160cc0224d7139ba7
2015-06-22 09:32:52 -06:00
Sebastien Badia b8a187f54c spec: updates for rspec-puppet 2.x and rspec 3.x
This patch aim to update our specs test in order to work with the
rspec-puppet release 2.0.0, in the mean time, we update rspec syntax
order to be prepared for rspec 3.x move.

In details:

 * Upgrade and pin rspec-puppet from 1.0.1 to 2.0.0
 * Use shared_examples "a Puppet::Error" for puppet::error tests *
 * Convert 'should' keyword to 'is_expected.to' (prepare rspec 3.x) *
 * Fix spec tests for rspec-puppet 2.0.0
 * Clean Gemfile (remove over-specificication of runtime deps of puppetlabs_spec_helper)

Change-Id: I172439c6ed185bb38b325b2524cab1475cdc7504
2015-03-19 18:45:08 +01:00
Emilien Macchi 1b2725b551 Database: add slave_connection support
Nova is able to talk to a read-only database for some tables so it
improves the scalability of MySQL server and reduce the access to the
server in charge of writes.

More documentation: https://wiki.openstack.org/wiki/Slave_usage

Change-Id: I1d44332acb381b11d90b63535d274f535be26d55
2015-01-26 16:26:59 -05:00
Emilien Macchi 30b6a9c4c7 Configure database parameters on the right nodes
Since Grizzly, nova-compute does not need database access anymore.
Currently, only nova-api, nova-scheduler and nova-conductor really need
database access.

* Keep original nova parameters with backward compatibility
* Create nova::db with database parameters
* Import nova::db in nova::init for backward compatibility
* Import nova::db in nova::{api,conductor,scheduler}
* Refactorize unit tests for conductor & scheduler

Change-Id: I42b9d2b1efb5856fed6550c25ac3142952690df1
Implements: blueprint move-db-params
2014-11-26 16:37:28 -05:00
Mathieu Gagné b42ce7c3c4 Cleanup rspec tests of nova::scheduler
Change-Id: Ie072c21606dd509bf64d764f6efd3ebabe9f857a
2014-01-31 10:34:45 -05:00
Mathieu Gagné 7336c1dc7c Use Puppet boolean for better consistency
This fixes puppet-lint warning "quoted boolean value".

Change-Id: I043f00e1aefd4a9368232c0a93ee3ad4f4aba634
2013-06-30 21:39:23 -04:00
Derek Higgins f7830b7684 Set hasstatus => true for nova services
Fix bug 1170671

notifies to nova services on RHEL were not causing a restart of the service

Change-Id: I5fc91e1c519425e96677796d9de5222ab9d7f105
2013-04-19 09:02:03 -04:00
Dan Bode 124ae530fc fix test failures
make them work!
lazy tests, always want handouts :(
2012-11-02 11:12:39 -07:00
John Chilton 6f744cd4be Allow specifing specific package version for nova-scheduler. 2012-05-10 08:29:03 -05:00
Dan Bode 97c6710689 Install nova packages per service
This commit ensures that the individual Ubuntu nova
packages for any given service are only installed when that
service is configured.

This behavior was broken when RedHat support was added.
Since Redhat only has a single package, it was assumed
that all packages should always be installed on all nodes.

This was causing all services to be in a running state on
Ubuntu (b/c the packages were starting the related service)
2012-03-30 20:13:55 -07:00