49 Commits

Author SHA1 Message Date
Rajesh Tailor
4d937a4a02 Fix typos in parameter descriptions and tests
Change-Id: Ic91d910b973303b0d4db5164fdf9b5fd807a4f70
2022-06-27 13:39:37 +00:00
Zuul
a6a2451e46 Merge "Skip creating files/directories created by packages" 2022-05-23 17:39:59 +00:00
Takashi Kajinami
0461df0c09 Skip creating files/directories created by packages
Change-Id: I00f8477ec7d1b04c6ba1eadcbcc4972b725f4ca8
2022-05-19 16:09:38 +09:00
Takashi Kajinami
b0c9ae29ab Revert "Avoid duplicate package swift."
This reverts commit 31aa020b0fbfe98772c4271d58ee9e4a62a2166e.

The original change mentioned puppet-glance can install the same
package but it is not correct (at least currently) and puppet-glance
installs not the core package but the client package.

Conflicts:
	manifests/init.pp

Change-Id: I53f29aa6435b757b72ce785e4d7f29dcdcf03d33
2022-05-11 00:58:15 +09:00
Takashi Kajinami
f781eb9e34 Avoid hard-coding OS user/group in each manifest
and replace hard-codes by definition in params.pp .

Change-Id: I7bb32a93bbd0299917f6e7e13b84e808e179e5cc
2022-02-22 01:09:15 +09:00
Takashi Kajinami
56b76020af Cleanup deprecated parameters
Change-Id: I7a4010f833da12f7adbdae8cfc343d0fb39b1552
2020-05-04 03:01:52 +09:00
Tobias Urdin
0868b32e79 Convert all class usage to relative names
Change-Id: I0335cf49c2ce55659c49325f2c0028f1af93705d
2019-12-08 23:21:35 +01:00
Tobias Urdin
38753f433d Deprecated swift::client_package_ensure
This should be directly set in the swift::client
class, this also makes us supress the unknown
variable error.

Change-Id: I79a148c90fbd4f70f6f5e6d9857d0c14da99338f
2019-06-10 22:31:05 +02:00
ZhongShengping
8686642562 Update resource references for dependencies
The latest version of puppet now reports these as catalog failures so
this change removes the unnecessary references and the references
should be updated.

Change-Id: I2001f8bb91ff70cf100140c7861606db459c2ad9
Closes-Bug: #1702964
Co-Authored-By: Alex Schultz <aschultz@redhat.com>
2017-08-01 16:09:42 -06:00
Andrew Woodward
4304c6e7bc Move swift::client to include from declared class
We need to be able to include swift::client multiple times in a
given catalog. In order to ensure that we get the value of
$swift::client_package_ensure, we change it to be the default in
swift::client

Change-Id: I65fb0736e9fa9e68c3c7877cf6caf228c49eb82d
Related-bug: 1632143
2016-10-14 13:02:36 -07:00
Iury Gregory Melo Ferreira
2d84cf4e16 Remove deprecated swift_hash_suffix
swift_hash_suffix was deprecated in Mitaka and
should be removed in Newton.

See http://docs.openstack.org/icehouse/config-reference/content/swift-general-service-configuration.html

Change-Id: I3b5c55607bcd8a2aa5288cdfefa96a152d1682cb
2016-06-03 12:55:02 +00:00
Adam Vinsh
c659733d39 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: I00cf4846bb933291469be94c9debed425eddf798
2016-05-25 08:52:47 -04:00
Matt Fischer
df59fcbb3f Grammar corrections in comment
Change-Id: I077ece4676db9638dc7213c5a54d3a89e4eb96bd
2016-05-18 15:25:19 +00:00
Alex Schultz
c41983cd87 Update to swift hash parameters
This change adds the ability to configure the swift_hash_path_prefix for
swift. Additionally it deprecated swift_hash_suffix in favor of a new
parameter called swift_hash_path_suffix for consistency.

Change-Id: I26935fe21af42b488f4479c4e50e8f481a75ea40
Closes-Bug: #1505269
2016-01-26 08:18:28 -07:00
Gael Chamoulaud
b75290b54c Require swift package installation before swift user.
- The user 'swift' is being ensured without any restriction on openstack-swift
package, so it is highly potential that the user is created before package is
installed with /bin/bash instead of /sbin/nologin as shell.

Closes-bug: #1525243
Change-Id: I4c7b7afb7eefeda0379db631f14eb8c32cbe8671
Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
2015-12-11 10:05:46 +01:00
Emilien Macchi
c0a1195f53 Improve File resources idempotency
* 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
2015-09-29 18:40:49 +00:00
Emilien Macchi
47ac5095b3 Stop managing file modes
File modes should be managed by packaging, not by Puppet.
This patch aims to stop managing File { mode => } parameters.

Partial-bug: #1458915
Change-Id: Ic38317521ac4a91bfdf234ecb4c74e4b00e3d887
2015-09-28 12:11:27 -04:00
Emilien Macchi
e1ecd15f7d Fix swift.conf / Swift_config ordering
This patch makes sure /etc/swift/swift.conf is created *before* trying
to configure Swift with Swift_config provider.

Change-Id: Ic470e11fae73e36cde67e1168aeab06773e3d974
2015-09-28 11:22:43 -04:00
Yanis Guenane
a72e27f83c Rely on autorequire for config resource ordering
Currently we specify the ordering of config resources wherever it is
necessary based on the presence of the file it will write to, or the
presence of the package in charge of providing the file it will write
to.

Those kind of ordering can be specified directly at the resource level
using the autorequire mechanism. With this patch, any config resource
will make sure the package in charge of providing the file will be
installed first.

Change-Id: Icb3464cc0a747d40326d610d38806d059c9a0fc3
2015-08-13 09:54:06 +02:00
Yanis Guenane
cd0e32b2c6 Fix ordering issue related to swift.conf
The file /etc/swift/swift.conf is managed by puppet.
There is no ordering contraint between swift_config resource and the
/etc/swift/swift.conf file resource.

It causes randomly failure when the swift_config resource applies before
the file resource

Change-Id: I08803a68ede6e3659e93c342949d8bb4e823ccd9
2015-08-11 12:17:22 +02:00
Yanis Guenane
da4a0dd2ae Add tag to package and service resources
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
2015-07-22 23:32:14 +02:00
Matthew Mosesohn
f37b4ffbd7 Add max_header_size field for PKI tokens
PKI tokens can be extremely large (>64k), requiring
a custom max_header_size to be configured.
This field defaults to the default from swift internal
defaults, which is 8192 bytes.

Change-Id: I9d2df074e333e110df4dfeaf5ba1cdab5c4ff19f
Related-Bug: #1470664
2015-07-06 16:57:04 +03:00
Jenkins
76d9827938 Merge "Removal of SSH Components" 2015-04-27 12:43:37 +00:00
Richard Raseley
00d10f1c3e Removal of SSH Components
This change removes all SSH-related components, their configuration
options, and tests.

SSH is such a low-level service (from the perspective of any operator
deploying a cloud), that it is reasonable to assume that (or provide
direction that) SSH must be installed and configured prior to usage of
the puppet-swift module.

Without this change, there is a significant liklihood of confusion
occurring in the likely case of SSH being managed elsewhere.

Change-Id: I0f695788b2784669a3fb285e4bedf0159c4cb89a
Closes-Bug: 1447259
2015-04-24 17:23:53 +02:00
Derek Higgins
b0a3d8a298 Remove creation of /home/swift
It isn't used in the puppet module anywhere, the signing directory is
defaulting to /var/cache/swift, if the user is setting it to /home/swift
they should also create it.

Change-Id: I085bdba172b6316f9dcd19dcc8d44399be014647
2015-04-22 15:59:22 +01:00
Gael Chamoulaud
9561ffffa2 Tag all Swift packages
Some users wish to override the default package provider by their own.

Tag all packages with the 'openstack' to allow mass resource attributes
override using resource collectors.

Change-Id: Ib0cec660f134e266006f41572cafcc4661ca1e67
Closes-bug: #1391209
Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
2015-04-07 20:00:41 +02:00
Sebastien Badia
dc8657e203 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: I9b41f170a782fecf88f241dc12288670b552b433
2015-03-25 13:46:00 +01:00
Sebastien Badia
77be0932fc Upgrade puppet-lint and fix metadata, parameter and style lint issues
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
2015-03-24 15:18:28 +01:00
Michal Skalski
e6a225d79b Enlarging the scope of ssh module
Including only ssh::server::install class in init.pp give too small scope
and cause warnings about inability to look up ssh::server::ensure.

Closes-Bug: 1355873

Change-Id: I443c9f006b47c609e4a05da38b4a2124acbf886e
2014-12-03 11:11:18 +01:00
Sebastien Badia
21f9eff35c Add client_package_ensure parameter and swift::client class
In the actual state of the manifest we can only setup package_ensure to
absent|present|latest. This commit allow end users to pin swift* and
swift-client to a specific version. (note that swift* and
python-swiftclient version are not the same).

A new class (swift::client) manage now client packages, and we keep the
retro-compatibility of commit 020b7723cbbe75fbcae89514a1e1882ae807fb27.

Change-Id: I9bcc5a0f9d0a93a812fb574c4571fb9584077e4a
2014-03-06 02:09:52 +01:00
David Moreau Simard
449fd78f48 Remove redundant user ownership declaration and ensure spec test coherency
swift is already set as a owner for File[] resources. This is a
simple cleanup that removes a redundant user declaration. The spec
tests did not verify that default File[] values were applied to
/var/lib/swift.

Change-Id: I608ef39ca8bbf78ca8029a65979db659184baa3f
2014-01-09 11:48:04 -05:00
Jenkins
943c2f0c6e Merge "Fix puppet-lint warnings about ensure" 2013-08-28 18:10:27 +00:00
Dan Prince
c89e327fb8 Use swift_config to configure swift.conf
This change also adds an autorequire in the swift_config
type to ensure the /etc/swift/swift.conf exists.

Change-Id: Ic591a3ceb040c4599339ed7f750a5273d2052ac1
Implements: blueprint puppet-swift-ini-settings
2013-08-26 20:54:06 -04:00
Dan Prince
f10bcda7e6 Revert "Use swift_config"
This reverts commit e7bb58e6ba39d7daeee9069c83451f8898d8a424.

Fixes LP Bug #1216881.

Change-Id: I65109b8bfeeb2f59971dadbdb14ec47b1fc82a89
2013-08-26 08:12:07 -04:00
Mathieu Gagné
0098067226 Fix puppet-lint warnings about ensure
Fix warning: "ensure found on line but it's not the first attribute"

Change-Id: Iecc0cd4fe267c40fbef9a84ff1da2eaff5aa45a7
2013-08-25 23:29:34 -04:00
Mathieu Gagné
e7bb58e6ba Use swift_config
Use swift_config to configure swift.conf

Implements: blueprint puppet-swift-ini-settings
Change-Id: I3cb4b4f6f5586216e503dfe9b66b5e2e457cc90f
2013-08-25 23:22:05 -04:00
Daneyon Hansen
f71d159c4d Improve Proxy Signing Directory Support
1. The signing_dir was being created on every swift node
when it's only needed on proxies:

  http://docs.openstack.org/grizzly/openstack-compute/install/apt/content/installing-and-configuring-the-proxy-node.html

2. The signing_dir was not configurable, even though
the OpenStack doc's show multiple references
(/var/cache/swift and /home/swift/keystone-signing).

Change-Id: I3eb00046fc535a32d7a1800d15489e9fe071373b
2013-08-12 18:39:15 +00:00
Mathieu Gagné
178f4b18dc Various Puppet lint fixes
* 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
2013-08-02 11:51:57 -04:00
Newptone
b0f4834165 Fix dependency problem in class swift
Class swift requires class['ssh::server::install'], otherwise it will
complain and fail to compile the catalog.

Change-Id: Ieeef735cc3e78bb6a6b514c711e5b87a861ee31b
2013-06-10 18:32:41 +08:00
Dan Bode
f97f8c5412 Merge pull request #77 from Mirantis/avoid-duplicate-package-swift
Avoid duplicate package swift.
2012-12-11 21:50:09 -08:00
Eugene Kirpichov
52753b9508 Create swift user and home directory 2012-11-30 19:44:17 +04:00
Vladimir Kuklin
31aa020b0f Avoid duplicate package swift.
A duplicate can appear if installed on the same node with
openstack::glance with glance_backend=swift, which also installs
this package for client utilities and libraries.
2012-11-30 19:37:44 +04:00
Joe Topjian
020b7723cb Several changes:
* `python-swiftclient` is now installed by default.
* Fixed swift3.
* Fixed s3token.
* Recreated authtoken - it used to be configured in the Keystone module.
* Created proxy-logging filter
2012-11-01 17:48:12 -06:00
Sergio Rubio
2bb6be25bd Create /var/cache/swift directory
Default directory for middleware like Swift-recon
2012-10-02 11:13:45 +02:00
Dan Bode
cd33a745c5 Add fedora support
This commit adds support for fedora.

It introduces a params namespace class
to hold data differences between ubuntu and fedora.

It also moves the xfs packages into their own class (swift::xfs)
2012-03-20 12:55:34 -07:00
Dan Bode
954e6c0357 Remove reference to ssh keys
Swift does not need to have keys. This commit
removes the ssh keys.
2012-03-02 10:35:02 -08:00
Dan Bode
e9dfe0f8e5 Improve documentation
Improves README and inline docs, comments
2012-02-14 15:05:35 -08:00
Dan Bode
18d681943e Add inline docs to manifests
This commit adds some initial inline documentation
of the manifests.

It also performs some basic whitespace cleanup.
2012-02-13 15:39:18 -08:00
Dan Bode
47d49e7780 Initial commit.
This initial commit only targets a single node
swift install on Natty based on 1.4.6
2012-01-19 18:58:37 -08:00