561 Commits

Author SHA1 Message Date
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
Adam Vinsh
67df8085d0 Use include for swift::storage::${type}
Require operator specify swiftinit provider
on supported components rather then pass it through.

Change-Id: I7e35c0a49f51e252573f46af9ba2a8eda968e3e2
Closes-Bug: #1524381
2015-12-09 10:25:21 -05:00
Jenkins
c58ed14ef0 Merge "Remove references to puppet-openstack from README" 2015-12-08 19:38:06 +00:00
Adam Vinsh
5a7d18975f Manage swift with swiftinit service provider
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
2015-12-07 16:00:50 -05:00
Jenkins
b62ed3a5ca Merge "Update ceilometer proxy template" 2015-12-07 17:29:36 +00:00
Denis Egorenko
e8ad981eff Update ceilometer proxy template
Now for using Ceilometer notifications from Swift we should
use Ceilometer middleware. Hence we need update template for Swift
to account for incoming and outgoing traffic notifications.

[1] I686e5d94fb72fd2a00973c91673edc417142ee2f
[2] http://docs.openstack.org/developer/oslo.messaging/transport.html#oslo_messaging.TransportURL

Change-Id: Ib6efd4a1ab4b76c74cffc546383f5382c24a8c43
Related-bug: #1510064
2015-12-02 18:20:59 +03:00
Emilien Macchi
4e28060dc9 Checkout openstack-integration from master
Since stable/liberty was created, let's now checkout master to prepare
the next release (Mitaka).

Change-Id: Ie0fba306041fce84d78b62f7f663af06d6790d9b
2015-11-26 14:32:05 +01:00
Emilien Macchi
5ca8b0b75f release: prepare 7.0.0 (liberty)
This patch prepares this Puppet module to be released in 7.x series (Liberty)
with 7.0.0.

Change-Id: Ie4215a8aa36c886972ad4ab801fb038e2afffc93
2015-11-26 09:36:15 +01:00
Nate Potter
981693a1dc Remove references to puppet-openstack from README
The README references to the retired puppet-openstack module
should be removed, as they link to the empty github page.

Change-Id: If85db53bbe21114610d2ee1dcf5fcd0194f1668e
Closes-bug: #1518589
2015-11-22 16:31:47 +00:00
Emilien Macchi
6145bf6120 Acceptance: use common bits from puppet-openstack-integration
Change-Id: I191d507b459631eb4c2d0fe1dc52e39d098d77d0
2015-11-19 11:42:21 +01:00
Jenkins
82b0a90dd9 Merge "Make sure Facter is only executed on agent" 2015-11-18 12:06:00 +00:00
Cody Herriges
dbfa88f684 Make sure Facter is only executed on agent
This commit moves conditionals based on values obtained from Facter
  inside code blocks that are only executed on agents and replaces
  the use of Facter['osfamily'].value with Facter.value:(:osfamily).

  Without this change we are returning values based off the master's
  facts, so if a Debian agent checks into a RedHat master then the type
  is currently making a decision based off of RedHat and not the actual
  OS of the agent running the catalog.  Code ran outside blocks is
  evaluated on masters and inside a block is evaluated by the agent when
  the catalog is executed.  We do not notice this because all our
  testing uses "puppet apply" and autorequire only matters when they
  find a matching resource name in the catalog.  The latter results
  in no error because the relationship is simply ignored on the Debian
  agent if a package resource with the RedHat name is not found.

  This issue was found by running facter 3, the C++11 re-implementation
  under the jruby and clojure implemented puppetserver.  The clojure
  jni shim written so that facter can be ran inside of puppetserver does
  not implement the [] method for the Facter module but the ruby shim
  does.  So I noticed that the code had an issue when
  Facter['osfamily'].value was executed on the master, which returned a
  not method error.  Once again, something we didn't notice becuase we
  do not test against a master.  I decided to migrate to
  Facter.value(:osfamily) to simply keep to an API that is consistent
  across both puppet and puppetserver but fixing where the code runs
  does actually solve the not method found error.

Change-Id: I24b0b20b2839c7bc33a76ac14849783f2285579f
2015-11-12 15:09:58 -08:00
Gael Chamoulaud
cee9bc8794 Remove class_parameter_defaults puppet-lint check
Change-Id: Iecbcf22e1cb01e6814c1616ea9a860421a212ebd
Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
2015-11-12 12:49:31 +01:00
Emilien Macchi
dd85f270bd Bump UCA and RDO to Liberty GA
Bump from UCA RDO Liberty testing to GA repos.
Depends-On: I19a1588c488d56b647703c0267540c7649fdc6d1

Change-Id: Ib6dcebff04401f6031744a7adff4c03739e74cb5
2015-11-04 10:20:48 -05:00
Adam Vinsh
0a16263636 Remove tenant parameter from keystone_user
Puppet-swift to match recent update in keystone module.
The tenant parameter was made deprecated in Kilo and to be removed in Liberty.
Removing the tenant parmamter from keystone_user in dispersion.pp

Change-Id: Ie86497f462e2a94819b8dbd1e4131890858af266
2015-11-03 15:37:49 -05:00
Sebastien Badia
31ab888be2 Prepare 6.1.0 release
Change-Id: I19c791d60c977eaefe6276730eba322c01a79ea2
(cherry picked from commit 69031e85eb6a9ea5d1163d2f0b2ae877b1b65e54)
2015-10-21 01:57:53 +00:00
Jenkins
91fcf4625f Merge "Add support for swift-object-expirer service" 2015-10-19 22:36:30 +00:00
Emilien Macchi
68eb6373f0 Try to use zuul-cloner to prepare fixtures
In OpenStack Infra, we would like to run Puppet unit tests that
sometimes depends on other Puppet OpenStack modules.
Example: a patch in puppet-openstacklib that needs to be tested in puppet-nova.

This patch modifies the Rakefile to:
* clean spec_prep and spec_clean Rake tasks
* use openstack/puppet-openstack-integration/install_modules_unit.sh script
  to clone modules.
* do not use .fixtures.yaml file to clone modules and rely on
  zuul-cloner or git.
* Add openstack/ in gitignore so we never commit the
  puppet-openstack-integration repository (can happen when spec_clean
  did not run but you want to submit the patch anyway)
* Allow to run a custom Puppetfile if PUPPETFILE env is exported. It
  will allow people to test the module with the dependencies they like,
  feature we had with .fixtures.yaml.

Also add 'r10k' to Gemfile.

That way, we will be able to use zuul dependencies and run tests accross
modules like we do with functional testing.

It also fix proxy/ceilometer rspec syntax for Puppet 3.x. This change
could not be in a separated patchset since it's related to this patch.

Change-Id: I8d20b5297dde8a2ecfcaf3d21d221735bc9df8d6
2015-10-09 09:16:58 -07:00
Javier Pena
d8a8b70547 Add support for swift-object-expirer service
The swift-object-expirer service was not supported by
puppet-swift. Adding support by creating a new class
(swift::objectexpirer), and its associated custom type/provider.

Change-Id: I498ffe525a7316c0091e4c9d8b7d9658234231f6
2015-09-30 10:09:09 +02:00
Emilien Macchi
f1f9a24998 drop useless comment in authtoken.conf.erb
Drop useless comment in authtoken.conf.erb.
Change-Id: I7d027d0647e0fb10aa32313e9550815b74ec7bac
2015-09-29 18:41:19 +00: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
981fcaeb53 proxy: ceilometer httpd support
When running Ceilometer in WSGI, 'httpd' service will need to be allowed
to write in /var/log/ceilometer.

Instead of hardcoding 'swift' user for being part of 'ceilometer' group,
create a new parameter 'group' so we can override which user we want
part of 'ceilometer' group.

Change-Id: Ib4c63ea386e93161cddb44c0a588f8e658c214e4
2015-09-29 13:48:00 -04: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
Jenkins
79b596b817 Merge "Add support for DLO configuration." 2015-09-25 13:54:35 +00:00
Aleksandr Didenko
4ee7b74aed Add support for DLO configuration.
New class swift::proxy::dlo for DLO configuration.
Add acceptance tests
Add docs to README

Change-Id: Ie209e494d7affd72c3fea3f2cc3459b91d7c6765
2015-09-24 16:36:21 -05:00
Jenkins
df70d51f16 Merge "Warn that object storage parameter mount_check changes next release" 2015-09-24 20:17:56 +00:00
Ben Kero
b3ff1ac9d4 Warn that object storage parameter mount_check changes next release
The 'mount_check' parameter is different in this Puppet module than
in Swift. This patch adds a warning() to tell the user that starting
in the next version, the default will change to match the upstream
default from False to True.

Closes-Bug: 1265243

Change-Id: I7f98e523be2f8bbf39b70c544a1965c975c690dd
Signed-off-by: Ben Kero <ben.kero@gmail.com>
2015-09-23 22:13:42 -07:00
Jenkins
2359924d48 Merge "provide means to disable log_requests in config templates" 2015-09-24 00:44:54 +00:00
Emilien Macchi
f34cd0865b Bump RDO packages to tested repos
RDO has now [1] a repo that is tested against real CI.
Using this repository will avoid more failures in our CI.

[1] http://trunk.rdoproject.org/centos7-liberty/current-passed-ci/

Change-Id: Ia45b1cc281838c8213cf91a5286316778de91a96
2015-09-22 13:47:11 -04:00
Benedikt von St. Vieth
c2bb2fb31e provide means to disable log_requests in config templates
it is hard coded into account, object and container config templates to log
every request. Provide a means to disable log_requests via
swift::storage::server and swift::storage::all, this reduces the log output.

Change-Id: I2fd97c1406710bb0305955f8ff9b47f91c09e13d
Closes-Bug: #1484614
2015-09-12 14:30:16 +02:00
Jenkins
96b4f5c7c5 Merge "Config resources applied after config template" 2015-09-11 14:09:10 +00:00
Emilien Macchi
6fe1ec4ad6 acceptance: switch RDO to CBS repositories
This patch changes the repositories used to install OpenStack Liberty on
RDO by using CBS repositories and RDO trunk.

Here is the RDO roadmap that is suggested if we want to run Liberty:
From now until GA:
http://trunk.rdoproject.org/centos7-liberty/current/
http://cbs.centos.org/repos/cloud7-openstack-liberty-testing/x86_64/os/
http://cbs.centos.org/repos/cloud7-openstack-common-testing/x86_64/os/

After GA:
http://mirror.centos.org/centos/7/cloud/x86_64/openstack-liberty

Note about EPEL: deps from EPEL are rebuilt in CBS, so EPEL could be
disabled in the future.

Change-Id: I67e7e676d9d9351628d341fb61797f36898d372f
2015-09-10 21:44:17 +00:00
Gael Chamoulaud
86851f4a2f Fix rspec 3.x syntax
- Convert 'should' keyword to 'is_expected.to',
- The old ':should' syntax in rspec 3.x is deprecated in favor of ':expect'
  syntax,
- Expectations on attribute of subject with 'its'.

Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>

Change-Id: Id2892bb493cdd8357b74bf81c8606ba00c74b93c
Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
2015-09-10 12:43:56 +02:00
Cody Herriges
bbcccfa801 Initial msync run for all Puppet OpenStack modules
This patch is the initial modulesync run, it impacts:

* gitignore: just a sync between projects
* gemfile:
  - update and allow to setup facter version and gem source
  - split beaker gems with a dedicated group
  - switch to rspec-puppet 2.2.0
* rakefile:
  - use the new syntax for lint configuration
  - add a acceptance target
* acceptance:
  - sync nodesets
* spec: added rspec coverage report

Change-Id: Ibc1c4cd5f4d9b553b565c2625b7fc380a509edc8
2015-09-06 02:05:29 +02:00
Sebastien Badia
c306830644 spec: Enable webmock connect to IPv4 link-local
compile and compile.with_all_deps rpsec matchers make
a call to all facts, and especially the ec2 one (this fact, try
to make a connection on the IPv4 link-local for ec2 metadata which
is incompatible with webmock restrictions), this seems to produce
random errors with puppet 3.{3,4}.x and facter 1.7.6.

Closes-bug: #1492636
Change-Id: Ia47236e1c929e8d449bbb43cd2162f3d79d654f7
2015-09-06 02:04:20 +02:00
Jenkins
554b3a6ec1 Merge "Add incoming/outgoing chmod params to storage/all" 2015-09-04 22:04:13 +00:00
Emilien Macchi
1ba8424df2 acceptance: bump trusty packaging to trusty-proposed/liberty
Since our recent discussion about Ubuntu packaging, we decided to bump
Ubuntu packaging to trusty-proposed/liberty so we can install Liberty in
a better shape than current situation (Staging repo).

This patch installs UCA liberty repository.

Depends-On: I57e2ddc5d0e228142f8045623ffbde362c0e7f7b
Change-Id: Iddc9210db33df7f34b429a6cacfb8607ceb52742
2015-09-02 21:10:59 +00:00
Guilherme Maluf
4c5f53d0d3 Add a blank line to the beginning of each filter
Filters fragments leads to section headers and previous options with no
blank line between them

  foo = bar
  [section]

Add a blank line to the beginning of each filter so that when applied
the resulting file is more human readable

Change-Id: I411eba5da5fc4e1a7217df197edbaf5ef2d5e4fa
2015-08-28 16:50:38 -03:00
Dan Prince
16d9cc0cd8 Add incoming/outgoing chmod params to storage/all
This patch adds support for setting incoming_chmod and
outgoing_chmod parameters to the swift::storage::all
definition.

This is useful because leaving incoming_chmod and outgoing_chmod
set to their default values causes deprecation warnings. Users
of swift::storage::all may want to start setting the new
values and thereby avoid these warning messages.

Change-Id: I627ab2255087b0ebc2d3ddc9cd4a7a7d254abb65
2015-08-28 09:47:45 -04:00
Jenkins
4e20b73500 Merge "Reflect provider change in puppet-openstacklib" 2015-08-21 20:52:27 +00:00
Jenkins
8a09d4c33d Merge "Add tempurl middleware options" 2015-08-20 14:28:29 +00:00
Yanis Guenane
e6e8c9d836 Reflect provider change in puppet-openstacklib
With the creation of the new openstack_config provider, some processing
that was done in swift_config has been centralized in
openstack_config.

Impacted methods are :

  * section
  * setting
  * separator

Also, this commit adds the fact that, when passing a specific string
(ensure_absent_val) the provider will behave as if ensure => absent was
specified. '<SERVICE DEFAULT>' is the default value for
ensure_absent_val.

The use case is the following :

swift_config { 'DEFAULT/foo' : value => 'bar' } # will work as usual

swift_config { 'DEFAULT/foo' : value => '<SERVICE DEFAULT>' } # will mean absent

That means that all the current :

if $myvar {
  swift_config { 'DEFAULT/foo' : value => $myvar }
} else {
  swift_config { 'DEFAULT/foo' : ensure => absent }
}

can be removed in favor of :

swift_config { 'DEFAULT/foo' : value => $myvar }

If for any reason '<SERVICE DEFAULT>' turns out to be a valid value for
a specific parameter. One could by pass that doing the following :

swift_config { 'DEFAULT/foo' : value => '<SERVICE DEFAULT>',
ensure_absent_val => 'foo' }

Change-Id: I9281d2cae81f9799327f7f6e04498d6bc723f233
Depends-On: I0eeebde3aac2662cc7e69bfad7f8d2481463a218
2015-08-19 12:00:34 +02:00
Jenkins
c91b4c0941 Merge "Rely on autorequire for config resource ordering" 2015-08-18 04:37:41 +00:00
Jenkins
8f334ea1df Merge "acceptance: bump to Liberty release" 2015-08-14 20:56:57 +00: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
Jenkins
43bb515ea3 Merge "Fix ordering issue related to swift.conf" 2015-08-11 17:13:15 +00:00
Yanis Guenane
29e110e2f1 Use openstack/ namespace for fixtures modules
When running the tests, rspec will download the modules speficied in
.fixtures.yml and put them in spec/fixtures/modules.

Some of those modules still point to stackforge/ namespace when they
should be pointing to openstack/ namespace.

Change-Id: I82c77e95a18e3f4545dcb344d4eb6ab344b21790
2015-08-11 14:57:20 +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
Jenkins
48c4134ceb Merge "Add tempauth middleware options" 2015-08-06 14:30:54 +00:00