Commit Graph

47 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 f0cb20a86a replace validate_legacy with proper data types
the validate_legacy function is marked for deprecation in
v9.0.0 from puppetlabs-stdlib.

Change-Id: I7a66cba32f00851e0c93b8ef6e5a620fb474f111
2023-06-21 17:37:34 +09:00
Takashi Kajinami 7688084aed Add strict validation about boolean parameters
This ensures the parameters used by if-else logic accept only boolean
values because non-boolean can result in unexpected behavior.

Change-Id: I3a27d94e453f9cfbea701337308a7086693c89bb
2023-03-18 16:14:03 +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
Rajesh Tailor 72109eaf9a Fix some typos
This change fixes some of the typos in parameter descriptions,
conditions and tests.

Change-Id: I81aa8f0b0338662f0dcf9bec866dc5610a9141e8
2022-06-15 13:38:20 +05:30
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 7a2a857975 Deprecate query_placement_for_availability_zone
... because the parameter was already deprecated in nova[1].

[1] 7c7a2a142d74a7deeda2a79baf21b689fe32cd08

Change-Id: I817f9cff13f164e6a54f4ef5eebe8d2be8dd2b8e
2021-09-28 15:08:53 +00: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
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 7deecfbdf2 Convert all class usage to relative names
Change-Id: Ibe5a433cb67c38c0c9b05a50bffa2eda7391f241
2019-12-08 23:13:08 +01:00
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
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
Keigo Noha fd7587d71f Include nova::availability_zone in scheduler.pp
nova-scheduler uses CONF.default_availabiliy_zone.
However, the required class was not included in scheduler.pp
This patch includes nova::availability_zone class in scheduler.pp.

Signed-off-by: Keigo Noha <knoha@redhat.com>
Closes-Bug: #1824273
Change-Id: Ia94a5d7baf1dd2efc8339475176a1e1c24ad99d0
2019-04-11 13:22:53 +09: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
Rajesh Tailor 69d90c63ac Trivial-Fix: fix typos
Change-Id: I2dde3b2b951b469a889f63ab3fed75978f3de381
2018-04-18 16:50:41 +05:30
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
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
Clayton O'Neill cb77bc295f Add hooks for external install & svc management
This adds defined anchor points for external modules to hook into the
software install, config and service dependency chain.  This allows
external modules to manage software installation (virtualenv,
containers, etc) and service management (pacemaker) without needing rely
on resources that may change or be renamed.

Change-Id: I0b524e354b095f2642fd38a2f88536d15bcdf855
2015-12-08 10:14:11 -05: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
Richard Raseley eb1a114e5a Fix Nova Scheduler Typo
This changes the in-class documentation to reflect the correct module
namespace (scheduler vs. schedule)

Change-Id: Ic211b4287aa5fdc960351d3753e269c2ba2d5485
2015-03-04 11:39:32 -08:00
Clayton O'Neill 00e744a9b1 Add Puppet 4.x lint checks
This changes the puppet-lint requirement to 1.1.x, so that we can use
puppet-lint plugins.  Most of these plugins are for 4.x compat, but some
just catch common errors.

Change-Id: I48838fa11902247101c0473abff65cbb2558f609
2015-02-16 15:58:23 -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
Doug Schaapveld c45f573882 Adding manage_service parameter to all services
When set to false, enables puppet to configure a service without
starting/stopping it on each run.  This may be necessary when
using an external clustering system (Corosync/Pacemaker, for
example).  Defaults to true.

Change-Id: Iff21ee384fa857e1ddec0e15ca85df8aedad3e80
2014-02-11 08:42:15 -06:00
Michael Chapman 6a358c0e9d Make parameter doc RDoc compatible
This patch fixes all remaining parameter documentation
in the nova module to be compatible with puppet-doc
and documents all parameters in a standard way.

Change-Id: I451078d46cb2498dd8e3c23bd8cbcc81b8845fcd
2013-12-16 16:07:10 +11:00
Dan Bode 63eddebbb2 update inline docs 2012-10-14 13:00:26 -07:00
John Chilton 9e8cced563 Remove commas for older puppet compat 2012-05-10 08:34:10 -05:00
John Chilton 6f744cd4be Allow specifing specific package version for nova-scheduler. 2012-05-10 08:29:03 -05:00
Dan Bode 6897e43e14 Remove unnessary inheritance
This commit removes any occurrences of the inherits
keyword.

Ineritance should only be used for overriding
resources and accessing params from class defaults.

Any other uses are confusing to people who may
read this code in the future.
2012-04-23 19:41:56 -07:00
Dan Bode 616c4763c7 Refactor nova services to use generic_service
Previously, there was a lot of copy/paste code for
handling the various nova services.

This commit creates the define nova::generic_service
which is used to capture common code for
configuring nova services.

It also updates the following classes to use that code:
  - nova::api
  - nova::cert
  - nova::compute
  - nova::objectstore
  - nova::network
  - nova::sceduler
  - nova::volume

It also updates spec tests for all of these classes
2012-04-01 14:39:53 -07: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
Dan Bode e66e5ab7c4 Add fedora support
This commit is a refactor of work performed by
Derek Higgins that adds fedora 16 support to these
openstack modules.

It contains the following:
- creates a params class to store all of the
data differences.
- installs all packages on all nova nodes
- introuces an anchor that is used to specify
ordering for things that need to occur before
nova is installed.
- manages libvirt package and service in the
nova::compute::libvirt class
2012-03-15 15:38:55 -07:00
Dan Bode b97237db88 Service depends on nova-db-sync
According to the multi-node install insturctions,
the services should be started/restarted after the
management objects are created and database is 
restarted.
2011-06-24 09:06:55 -07:00
Dan Bode 52fa7b5435 Added exec to serve as an anchor for post-config.
Forwards notifications to services to clean up graph.
2011-06-21 13:52:04 -07:00
Dan Bode c1afee600d Removed class inheritence.
It wasnt doing anything.
2011-06-18 23:09:54 -07:00
Dan Bode ee06a743dd Fixed dependency/order issues.
all nova services are started after nova.conf is
configured

db and rabbitmq should be configured before
nova.conf

Basically using nova_config as an anchor

network should only be started after nova-compute
service is started.
2011-06-18 23:05:48 -07:00
Dan Bode 072e519171 Converted into nova module repo.
- removed all submodules
  I will create an openstack repo to
  hold all modules (including nova) as
  submodules
- moved nova module to top dir
2011-06-16 20:29:58 -07:00