Some parameters accept only certain parameter types/values. This adds
validations in parameter input to return sensible errors to users.
Change-Id: Ie6c0cf7956c228fead74dcb59e94111402303a56
Currently we restart all swift services regardless of the config file
being updated. This is very redundant, because some config files affect
only specific services (eg. account-server.conf is used only by
account-* daemons).
This introduces new "sub" tags such as swift-account-service and limit
the services being restarted.
Change-Id: Idfa09b63d291b0f71686554cb7c7b0597cb8842c
With this change now config files for storage services(account,
container and object) are managed by ini provider instead of concat
resources. This allows us to use the default file provided by packages
instead of replacing the whole file content by our templates, and use
the $::os_service_default value instead of hard-coding own defaults.
Related-Bug: #1921319
Change-Id: I375634214e88acc5075f64090287f934ce8451d1
This patch ensure that the swift-container-sharder service is started,
and provides all the facility (ie: parameters) to configure the sharder.
Change-Id: I0db7479e8634038871ce65990fd0104841d2010c
This change fixes the following lint errors discovered since we removed
pin of lint packages.
manifests/containerreconciler.pp:110:WARNING: absolute class name
reference
manifests/containerreconciler.pp:110:WARNING: absolute class name
reference
manifests/containerreconciler.pp:91:WARNING: class included by absolute
name (::$class)
manifests/objectexpirer.pp:159:WARNING: absolute class name reference
manifests/objectexpirer.pp:159:WARNING: absolute class name reference
manifests/objectexpirer.pp:130:WARNING: class included by absolute name
(::$class)
manifests/proxy.pp:192:WARNING: class included by absolute name
(::$class)
manifests/proxy/cache.pp:63:WARNING: absolute class name reference
manifests/proxy/cache.pp:63:WARNING: absolute class name reference
manifests/storage/account.pp:35:WARNING: class included by absolute
name (::$class)
manifests/storage/all.pp:32:WARNING: Duplicate class parameter
documentation for swift::storage::all::allow_versions
manifests/storage/all.pp:15:WARNING: Duplicate class parameter
documentation for swift::storage::all::allow_versions
manifests/storage/container.pp:41:WARNING: class included by absolute
name (::$class)
manifests/storage/object.pp:35:WARNING: class included by absolute name
(::$class)
Change-Id: Ic223f16d234c4385b95197ab460dc38eb561d16a
The systemd service files have been merged (see [1]), thus we can enable
the containersync service now by default without a distribution check.
[1] https://review.rdoproject.org/r/6172/ merged
Change-Id: I6c1f953efe5df32160719ea1de2dd718f281cec0
Before this update, subscribe and require could be passed
into the service class and work due to some default puppet
behaviors. This resulted in unknown variable warnings. Removal
of these parameters would remove the required resource dependencies.
Adding new parameters 'service_subscribe' and 'service_require'
to pass in these dependencies. The 'service_' prefix is used
here because use of 'subscribe' or 'require' as parameter names
would also print a meta parameter warning.
Change-Id: I33d2d6028347bbe50dc9b3f36b3f86b217db7c0c
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
Up to 2.0.0 concat was done as a define which contains File. Starting
from 2.0.0 concat::fragment define was rewritten as provider. This patch
replaces dependencies to File from concat::fragment with Concat to
enable concat ~> 2.0.0
Change-Id: Ifccc1bf2260dbbceb75b6bbe1d6b5bbbbb657a12
Adds service restarts for the following:
account-reaper, container-updater, object-updater,
container-sync, (account/container/object)-auditor.
Each will now be reloaded if their related config file
is updated.
Change-Id: I546bba253bbd0fe890fb77bb9a9f1e632fea242c
All three storage servers need an auditor, thus it is possible to
reuse the same template for all of them and reducing duplicate code.
Added a new test to ensure auditor services are defined.
Also update notifications to include the replicators as well.
Change-Id: I1fcbf55d1326790b35cd620196ca7e373b40df1a
The 'swiftinit' provider is a custom provider of the service type
that manages swift services using swift-init.
Use of the swiftinit service provider is optional, the default is
to use service providers specified in params file. This provider
also manages swift services starting at boot by adding or removing
a templated init or services file and making systemctl calls.
See README for more detail.
A wrapper defined type 'swift::service' has been created to simplify
use of the swiftinit provider without adding logic to every class.
this wrapper also aids in input validation and testing of the
swiftinit provider.
Two extra runs of apply_manifest have been added to the
basic_swift_spec acceptance test. The service_provider
is set to "swiftinit". The first run catches any errors upgrading
to the swiftinit service provider and the second run tests
idempotency.
This patch is an initial step towards using swift-init to manage
multiple swift services out of different configuration files such
as is needed to run a separate replication network.
Change-Id: I2f71c82c7a6c463f8c76a193409c0a17daa15bda
* use selinux_ignore_defaults parameter for directory to avoid this kind
of issue:
(...) seltype: seltype changed 'swift_var_run_t' to 'var_run_t'
* Do not manage ownership for /etc/swift/*-server to avoid this kind of
issue:
(...) owner changed 'root' to 'swift'
* Do not manage /etc/init.d/swift-container-sync file, already managed
by packaging:
~ dpkg -S /etc/init.d/swift-container-sync
swift-container: /etc/init.d/swift-container-sync
Change-Id: I1d742d118943fb0b11c47fd322052f50156e2994
In order to be able to take an action after all the packages of the
module have been installed/updated or all the services have been
started/restarted, we set a 'swift-package' and 'swift-service' tag
for each package and service of this module.
At the moment, there is a generic openstack tag that is not specific
enough if one wants to take action upon a single module change.
Use case :
If an action needs to be taken after all the packages have been
installed or updated : Package <| tag == 'swift-package' |> -> X
Change-Id: I1632bc0cee2a1c4cd5cc5d270a6d22919377c36b
swift.conf contains the hash_suffix. With the current module, we have a
race condition where services can start *before* having the right hash
in swift.conf, so some objects mays be put in quarantine.
When usint swift_config (which affect swift.conf), we should restart all
services to ensure our ring is running correctly.
Change-Id: I1087ba4ec079ca9c43bea9ff0511347632871ec2
Closes-bug: #1442329
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: I9b41f170a782fecf88f241dc12288670b552b433
This patch bump puppet-lint gem and add metadata and parameters checks.
Metadata lint issues (SPDX ID), missing parameters documentation and
syntaxe lint issues was also fixed in this patch
Doc for metadata syntax.
https://docs.puppetlabs.com/puppet/latest/reference/modules_publishing.html
Change-Id: Ia6bb3483b3ffdbeed60b58702a36e0c7b31ffb86
puppet-swift lacks of disabling service managing. This patch adds
$manage_service and $enabled parameter to all relevant classes.
Closes-bug: #1359823
Change-Id: I3d632e3a26e9394d03d94089ae704904bf77aa51
Some of the swift classes use parameterized settings defined in
swift::params but do not include the swift::params class.
Change-Id: I7704bf42db4554566d27b510bbbedb8afe0fe7b3
Closes-Bug: #1288252
* Fix following warnings:
* double quoted string containing no variables
* indentation of => is not properly aligned
* mode should be represented as a 4 digit octal value or symbolic mode
* string containing only a variable
* top-scope variable being used without an explicit namespace
* unquoted file mode
* variable not enclosed in {}
* Fix following errors:
* trailing whitespace found
* two-space soft tabs not used
* Remove quotes around class in include/require statements
Change-Id: Ia920d848e1955612a6486ec8731309e6d3a70f63
Now starting these services on all distros
swift-account-auditor swift-container-auditor swift-object-auditor
swift-account-reaper swift-container-updater swift-object-updater
Change-Id: I98cfcef3b43a2bdad6f359e4e4098a6113245353
the service upstart provider does not
work unless the init script is a symlink
to /lib/init/upstart-job for at least older
versions of Puppet.
This commit adds this symlink to avoid
run time apply failures.
Before this fix the following services where missing:
root@swift-storage-01:~# swift-init status all|grep ^No
No container-updater running
No account-auditor running
No object-auditor running
No object-expirer running
No container-auditor running
No account-reaper running
No container-sync running
No object-updater running
After this commit:
root@swift-storage-01:/etc/init# swift-init status all|grep ^No
No proxy-server running
No object-expirer running
It's OK for the proxy-server to be stopped since it's a storage
.
You only need to manage one object-expirer per cluster, so this not
place to manage it either. See:
http://docs.openstack.org/developer/swift/overview_expiring_objects.html
Previously, all of the storage server types
(account, container, proxy) were always
configured to be installed on the same node.
It often makes sense to only have the account and
container together, and to put the object server on
a different node. (or its possible that other
configurations make sense)
This commit refactors the swift module so that
each of the types of nodes can be built
independently of each other.