The current usage is causing the following error in puppet 8.
validate_legacy(validate_re) expects an Integer value, got String
at ["/.../modules/swift/manifests/ringbuilder/rebalance.pp", 23]:
Change-Id: I60fcea3c1a04456898816b844bf9e555a790d1d4
Since 63688a14e5 was merged, this module
support configuring storage policies.
When multiple storage policies are used, we need to create multiple
object rings like object.ring.gz, object-1.ring.gz. However the current
regexp to validate the ring name does not consider this format and
shows the type validation warning when creating a non-default policy
rings.
This change updates the regexp used in validation to accept that
object-<number> format as well.
Closes-Bug: #1987260
Change-Id: Ibc7479e7defbfa4c49bf3c9f1574cdcf61b90ab9
This changes all the puppet 3 validate_* functions
to use the validate_legacy function.
The validate_legacy function has been available since
about three years but require Puppet >= 4.4.0 and since
there is Puppet 4.10.12 as latest we should assume people
are running a fairly new Puppet 4 version.
This is the first step to then remove all validate function
calls and use proper types for parameter as described in spec [1].
[1] https://review.openstack.org/#/c/568929/
Change-Id: I5661c2d685b4bf2422936326db1c3d543a49f92a
If the ring has been rebalanced recently, the next call to rebalance
will not rebalance again if the time passed is shorter than
min_part_time. swift-ring-builder returns an exit code of 1 in this
case, which is a warning, but not a hard error (errors will use an exit
code of 2).
It makes sense therefore to expect an exit code of 0 or 1 and only fail
if it's different.
Closes-Bug: 1677588
Change-Id: I03dd075c590344a920099c57b6a7530f103e0ede
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: I00cf4846bb933291469be94c9debed425eddf798
This patch adds an optional seed parameter to the
swift::ringbuilder::rebalance definition. The seed
parameter can be useful if you want to (manually)
generate rings on independant servers and ensure that
the partition assignments are the same.
Change-Id: I840b8fe0125ed25e84f7681fada1b1102e48f32b
the defined resource types ringbuilder::create
and ringbuilder::rebalance were incorrectly
named.
This commit updates them to the correct names:
- swift::ringbuilder::create
- swift::ringbuilder::rebalance
This commit adds a class, defined resources and
native types that can be used together to manage
the creation, configuration, and rebalancing of
rings.
Creates the following native types:
ring_account_device
ring_container_device
ring_object_device
The implementation of these types is provided
by swift-ring-builder and most of the functionality
is provided by the parent provider (SwiftRingBuilder)
Each of the providers is hard-coded to find the
relevent ring database in /etc/swift. This directory
location can currently not be configured.
Each provider implements self.instances so the
current state can of the ring can be queried from
puppet.
These providers do not handle either the creation
or the rebalancing of the rings, they are intended
to be used in combination with defined resource types
that perform that functionality:
swift::ringbuilder::create
swift::ringbuilder::rebalance
The swift::ringbuilder class is also created as
a part of this commit. This class does the following:
- creates object, account, and container rings
(it uses the same parameters to create these rings)
- creates the rebalance defines
- sets up the following relationships:
for each ring type, create should be applied before
the native types which should refresh the rebalance