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
Upgrade acceptance manifest from Kilo (stable) to Liberty (dev)
on both Ubuntu Trusty & Centos7.
Change-Id: I1e2b09c79e20ee1212906a680f2f3f5b8e93fe91
Co-Authored-By: Lukas Bezdicka <lbezdick@redhat.com>
Depends-On: I7c1f31b3cc4c6ea1f894a263a8cff60e357accb8
Tempauth middleware template included only example entries
This commit provides most options to configure tempauth middleware,
especialy an array of accounts/users hash which defines the authenticated
list available by tempauth
It's add by default the admin account/user
user_admin_admin = admin .admin .reseller_admin
Change-Id: Ib67d7deeeb2f98a464d18813ae4569c28a04472a
Tempurl middleware is set with default options only
This commits make it possible to manage all tempurl configs defined in
proxy-server.conf-sample[1]:
methods
incoming_remove_headers
incoming_allow_headers
outgoing_remove_headers
outgoing_allow_headers
Parameters are optional and can be set with array or string
[1] https://github.com/openstack/swift/blob/master/etc/proxy-server.conf-sample
Change-Id: I1fab905a46aa58c43b8b3fd35ecdaf310bffc121
When swift_*_config resources are applied before the respective config
file, the resources are overwritten
Set swift_${type}_config resources to be collected after
Concat['/etc/swift/${type}-server.conf']
types = {account,container,object,proxy}
Change-Id: I8072c7c5e1780ba8b0d9a3553aae6ee52f5c7de1
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