- 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>
Require operator specify swiftinit provider
on supported components rather then pass it through.
Change-Id: I7e35c0a49f51e252573f46af9ba2a8eda968e3e2
Closes-Bug: #1524381
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
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
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
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
Bump from UCA RDO Liberty testing to GA repos.
Depends-On: I19a1588c488d56b647703c0267540c7649fdc6d1
Change-Id: Ib6dcebff04401f6031744a7adff4c03739e74cb5
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
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
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
* 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
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
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
This patch makes sure /etc/swift/swift.conf is created *before* trying
to configure Swift with Swift_config provider.
Change-Id: Ic470e11fae73e36cde67e1168aeab06773e3d974
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>
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
- 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>
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
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
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
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
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
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
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
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
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