Add cells v1 deprecation notice and remove broken code

In Nova cells v1 has been deprecated since Ocata but we
have no notices about it. This adds warnings about it
being deprecated and will be removed.

The functionality in nova::cells when passing create_cells
parameter is broken and has therefore been removed and
instead outputs a warning and is deprecated.

A known issue has been added to the release notes to inform
about this. It's probably safe to say that nobody is using it
since it has been broken since we switched over to transport_url
for rabbit, it's also safe to probably assume that no deployments
that run cell v1 right now will be running a later version of Nova.

Closes-Bug: 1687395
Change-Id: I564fc4f43a752b051280dce095a52ca4d477fb09
This commit is contained in:
Tobias Urdin 2018-10-21 17:27:14 +02:00
parent f2ab2d4783
commit fa8660917a
5 changed files with 37 additions and 31 deletions

View File

@ -19,6 +19,8 @@
#
# nova_cells provider
#
# CELL v1 IS DEPRECATED AND WILL BE REMOVED
#
require File.join(File.dirname(__FILE__), '..','..','..', 'puppet/provider/nova')

View File

@ -19,6 +19,8 @@
#
# nova_cells type
#
# CELL v1 IS DEPRECATED AND WILL BE REMOVED
#
# == Parameters
# [*name*]
# Name for the new cell

View File

@ -20,6 +20,8 @@
#
# Installs the Nova Cells
#
# CELL v1 IS DEPRECATED AND THIS WILL BE REMOVED.
#
# === Parameters:
#
# [*enabled*]
@ -30,10 +32,6 @@
# (optional) Whether to start/stop the service
# Defaults to true
#
# [*create_cells*]
# Create cells with nova-manage
# Defaults to 'True'
#
# [*ensure_package*]
# Desired ensure state of packages.
# Defaults to present
@ -132,6 +130,12 @@
# It might be used by some cell scheduling code in the future
# Defaults to '1.0'
#
#### DEPRECATED PARAMETERS
#
# [*create_cells*]
# Create cells with nova-manage
# Defaults to 'True'
#
class nova::cells (
$bandwidth_update_interval = '600',
$call_timeout = '60',
@ -139,7 +143,6 @@ class nova::cells (
$cell_name = 'nova',
$cell_type = undef,
$cell_parent_name = undef,
$create_cells = true,
$db_check_interval = '60',
$enabled = true,
$ensure_package = 'present',
@ -160,11 +163,15 @@ class nova::cells (
$scheduler_weight_classes = 'nova.cells.weights.all_weighers',
$weight_offset = '1.0',
$weight_scale = '1.0',
## DEPRECATED PARAMETERS
$create_cells = undef,
) {
include ::nova::deps
include ::nova::params
warning('nova::cells v1 is deprecated and will be removed in a future release')
case $cell_type {
'parent': {
nova_config { 'DEFAULT/compute_api_class': value => 'nova.compute.cells_api.ComputeCellsAPI' }
@ -209,32 +216,7 @@ class nova::cells (
}
if $create_cells {
@@nova::manage::cells { $cell_name:
cell_type => $cell_type,
cell_parent_name => $cell_parent_name,
rabbit_username => $::nova::rabbit_userid,
rabbit_password => $::nova::rabbit_password,
rabbit_hosts => $::nova::rabbit_hosts,
rabbit_port => $::nova::rabbit_port,
rabbit_virtual_host => $::nova::rabbit_virtual_host,
weight_offset => $weight_offset,
weight_scale => $weight_scale,
before => Service['cells']
}
case $cell_type {
'parent': {
# A parent cell must declare its child cell(s)
Nova::Manage::Cells <<| cell_parent_name == $cell_parent_name and cell_type == 'child' |>>
}
'child': {
# A child cell must declare its parent cell
Nova::Manage::Cells <<| name == $cell_parent_name and cell_type == 'parent' |>>
}
default: {
fail("Invalid cell_type parameter value: ${cell_type}")
}
}
warning('cells v1 is deprecated and nova::cells::create_cells has no effect')
}
}

View File

@ -18,6 +18,9 @@
#
#
# Configuring the database in each cell
#
# CELL v1 IS DEPRECATED AND WILL BE REMOVED
#
# == Namevar
# The namevar will be the name of the cell
#
@ -73,6 +76,8 @@ define nova::manage::cells (
include ::nova::deps
warning('nova::cells v1 is deprecated and will be removed in a future release')
nova_cells { $name:
ensure => present,
cell_type => $cell_type,

View File

@ -0,0 +1,15 @@
---
issues:
- |
The nova::cells::create_cells functionality is not working and will not
be fixed and has therefore been removed.
upgrade:
- |
The nova::cells::create_cells functionality is deprecated and has no effect
since it was broken before and will not be fixed. Cells v1 has been
deprecated in Nova since Ocata and will be removed soon.
deprecations:
- |
The Cell v1 functionality is now deprecated and should not be used.
It has been deprecated since Ocata and will be removed soon. This affects
nova::cells, nova::manage::cells and the nova_cells resource.