525 Commits

Author SHA1 Message Date
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
Emilien Macchi
4dfa6e0320 acceptance: bump to Liberty release
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
2015-08-04 20:35:36 -04:00
Guilherme Maluf
62ba90a475 Add tempauth middleware options
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
2015-08-03 07:18:55 -03:00
Jenkins
ccccd66b09 Merge "keystone/auth: make service description configurable" 2015-07-31 22:56:48 +00:00
Guilherme Maluf
25a96920f6 Add tempurl middleware options
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
2015-07-29 18:40:42 -03:00
Iury Gregory Melo Ferreira
720dd4c307 Update Swift README
Add wiki link (Like Neutron README.md)
Fix command in Installing swift

Change-Id: I05d76903f19c66434fd853be3d328843e16a036f
2015-07-28 12:02:42 -03: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
Jenkins
b12279a790 Merge "Add swift::config class" 2015-07-21 15:45:19 +00:00
Yanis Guenane
f69c046fe1 Add swift::config class
Other modules provide an X::config class to be able to specify
parameters that are not yet part of the module. Swift was missing this
feature. This commit aims to add it for puppet-swift.

Change-Id: Ifb6f78f177d9cc721f8388290c983c49137a2557
2015-07-20 11:58:53 +02:00
Jenkins
c5cbd46e51 Merge "fix module install reference" 2015-07-14 20:19:41 +00:00
Matt Fischer
ceb69f9dda fix module install reference
Change-Id: Ie475a893e0b12a283251b41777dbfa6995f933b3
Closes-Bug: #1468950
2015-07-13 19:43:54 -06:00
Emilien Macchi
851e0530fd Prepare 6.0.0 release
Update CHANGELOG, README and metadata.json to bump the module to the
first Kilo release (6.0.0).

Change-Id: Ie03dec60485d6dd94034fff8186d6124bffed34b
2015-07-09 10:11:46 -04:00
Colleen Murphy
275fb9b111 Fix git clone for locally running tests
Zuul-cloner's behavior is to clone the repository into a subdirectory
under a directory named for the repo namespace. Git's default behavior
is to just clone it directly into the present working directory. This
patch adds an argument to the git clone command to clone it into the
<namespace>/<repo name> directory, so that whether zuul-cloner or git
is used the repo ends up in the same directory relative to the PWD.

Change-Id: Iec2fec4b59ac12626a14b9926f07f867017c59d7
2015-07-08 11:56:50 -07:00
Colleen Murphy
be2b670a94 Use module install script for acceptance tests
This patch updates the spec_helper_acceptance.rb file to use the common
module install script and Puppetfile from the new
openstack/puppet-openstack-integration repo. This will allow us to take
advantage of Zuul's Depends-On feature so that we can test changes
across multiple related modules. This is based on idea 1 from this
brainstorming session[1].

This will probably be abstracted out into a separate function or
eventually a separate gem so that it can be more easily shared across
the OpenStack modules and the Infra modules.

[1] https://etherpad.openstack.org/p/puppet-git-dependencies

Change-Id: I51faac5f2eaa4c7a8850c2b1e365d700a0fa0b68
Co-Authored-By: James E. Blair <jeblair@hp.com>
Co-Authored-By: Spencer Krum <spencer.krum@hp.com>
2015-07-07 14:15:11 -07:00
Colleen Murphy
fbe109d212 Correct puppet module list check in beaker
The final check during the prep stage, where `puppet module list` is
run so that its output can be used for debugging, should run on the
current host in the loop, not the first host in the array.

Change-Id: I78d5d616fbed44c21005e35e78f5d54371570b6b
2015-07-07 14:14:47 -07:00
Jenkins
0b6d31b5ee Merge "Add max_header_size field for PKI tokens" 2015-07-07 05:39:05 +00: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
Emilien Macchi
13c40e8d0d Use beaker-puppet_install_helper to install puppet
When running with BEAKER_provision=no, the following happens:

In Trusty: beaker is running dpkg with '--force' option so even
if Puppet is already installed, the return code will be 0.
In CentOS: beaker is running 'rpm -ivh' the second time and since
the package is already here, the return code will be 1.

Using the new puppet install helper will abort installing puppet
if BEAKER_provision is no, so tests will continue as normal.

Change-Id: I30ade99fd33b76ebb3959851902746f58a249ff1
Co-Authored-By: Colleen Murphy <colleen@gazlene.net>
2015-06-30 16:58:59 -04:00
Sebastien Badia
8d7fa4d5a7 keystone/auth: make service description configurable
This commit adds the service description (service_description) and service
description for S3 (service_description_s3) as a class parameter in order
to allowusers to update from a previous version if the service description
is changed (incorrectly spelled or wrong description).

Change-Id: I5b52ce2fb89c9e0c4e9470c676b35da249f89bbe
Closes-Bug: #1468407
2015-06-30 12:02:43 +00:00
Emilien Macchi
95b4d9d6af acceptance: install latest openstack-selinux
Since SELinux is enforced by default, we need to make sure
openstack-selinux is installed from the latest version to have OpenStack
correctly working.

Change-Id: Ib07d2a724c0cf0ac78cc656fcdcef849f05ea8b7
2015-06-29 15:26:06 -04:00
Xingchao Yu
7ef8c53cce Update README.md for project namespace change
Change-Id: I8a73cf3debf9f23bd0588a788a0ccecd77035c3c
2015-06-28 20:30:48 +08:00
Colleen Murphy
c4ca308c26 Split release notes into a CHANGELOG.md file
This patch splits out release notes into a separate dedicated file for
consistency with the puppetlabs puppet modules. Additionally, this
patch improves the release notes by:

- Fixing the tense to be consistent with commit message standards ("Add
  new feature" instead of "Added new feature" or "Adds new feature")
- Breaking up changes into categories to make it easier for operators
  to know what happened in the change: backwards-incompatible changes,
  features, bugfixes, and maintenance commits
- Linewrapping to 80 chars
- Adding release dates, formatted according to ISO-8601

Change-Id: I44f3e7bc16fa85dcdf6eab90f26fa6ad94c6e4fd
2015-06-26 17:48:59 -07:00
Emilien Macchi
9edd4fce3c acceptance: install RDO repo the right way
Install packages from RDO properly, by using regular packages and not
ones from testing repo that are too unstable.

Change-Id: I66c705503f64fdd19e3a65b80c50225fdbf75237
2015-06-26 15:52:31 -04:00
Sebastien Badia
9b9c27294b lint: Fix lint issues (missing documentation for define types)
The gem 'puppet-lint-param-docs' was bumped to 1.2.0 and now handle
class and define type. This patch fix lint issues (missing documentation).

Change-Id: If3718cc533e6e81071aba191310552031508f132
2015-06-26 19:52:59 +02:00
Jenkins
3c87fd8662 Merge "Introduce public_url(_s3), internal_url(_s3) and admin_url(_s3)" 2015-06-23 15:02:13 +00:00
Colleen Murphy
96208fc8d0 Release 5.1.0 - Juno
Prepare 5.1.0 release.

Change-Id: Ifee8f9026427903cda7aad09a974493055190c8b
2015-06-17 11:27:04 -07:00
Jenkins
6cf73275fc Merge "Update spec_helper_acceptance for project renames" 2015-06-15 23:45:57 +00:00
Colleen Murphy
5323487b78 Update spec_helper_acceptance for project renames
Change-Id: I9f2a01190b99b35b480f4792aa5877c377b13931
2015-06-12 17:36:19 -07:00
Jeremy Stanley
1c655eb5bd Update .gitreview file for project rename
Change-Id: Id68e551f72dc1b50065d43df81da508402da2817
2015-06-12 23:12:30 +00:00
David Moreau Simard
f87e43e8a8 Introduce public_url(_s3), internal_url(_s3) and admin_url(_s3)
This change deprecates the following parameters:
- endpoint_prefix: replaced by public/internal/admin_url
- port: replaced by public/internal/admin_url(_s3)
- public_port: replaced by public_url(_s3)
- public_protocol:  replaced by public_url(_s3)
- public_address: replaced by public_url(_s3)
- public_port: replaced by public_url
- internal_protocol: replaced by internal_url
- internal_address: replaced by internal_url
- admin_protocol: replaced by admin_url
- admin_address: replaced by admin_url

Add deprecation warnings if any of those values are provided
while maintaining full backward compatibility.

Co-Authored-By: David Moreau Simard <dmsimard@iweb.com>
Co-Authored-By: Richard Raseley <richard@raseley.com>
Closes-bug: #1274979
Change-Id: Ie4afc21ac6e9539edd70635de7f3db957a22467e
2015-06-11 18:17:28 -04:00
Sebastien Badia
4a6e4cbb33 Fix spec tests for RSpec 3.x and Puppet 4.x
Remove value testing (we only check the key here), the value is nil or undef
and fix resource array, according[1].

[1]https://github.com/puppetlabs/puppet/blob/3.7.5/lib/puppet/resource.rb#L446-L453

Change-Id: Ic7a9b9d1e6d6b6b1c40fbce40d0bf9ff913f191e
Closes-bug: #1447620
2015-06-09 19:40:49 +02:00
Jenkins
5e814f1b5f Merge "Unpin beaker-rspec" 2015-06-08 21:46:58 +00:00
Colleen Murphy
0d8892425c Unpin beaker-rspec
The latest version of beaker tries to manage sshd_config[1] in order to
pass through environment variables. JJB also tries to manage
sshd_config by adding Match blocks to securely allow root SSH[2]. When
beaker tries to append the PermitUserEnvironment line after the Match
blocks, SSH fails to open port 22 and beaker can't SSH in to the
node[3]. This patch unpins beaker-rspec and adds set_env: false to the
nodepool nodesets so that the set_env method is never called and does
not try to mess with the sshd_config.

[1] https://github.com/puppetlabs/beaker/blob/master/lib/beaker/host_prebuilt_steps.rb#L528
[2] http://git.openstack.org/cgit/openstack-infra/project-config/tree/jenkins/jobs/puppet-module-jobs.yaml#n42
[3] http://logs.openstack.org/61/185161/1/check/gate-puppet-nova-puppet-beaker-rspec-dsvm-centos7/cd81608/console.html.gz#_2015-05-22_22_05_46_933
[4] https://github.com/puppetlabs/beaker/blob/master/lib/beaker/host_prebuilt_steps.rb#L502

Change-Id: I0784643812f9947afba4e2e556aadae3296f7e36
2015-06-08 13:47:32 -07:00
Emilien Macchi
3c28a4bbc1 Beaker: fix tests on Ubuntu
Change-Id: I7e0ad9b169f6061e3087b9a3e6d8a5251bfcc6c6
2015-06-07 11:29:13 -04:00
Robin H. Johnson
ef9f9a4194 Handle both string and array for memcache param.
Evaluation Error: Left match operand must result in a String value. Got
an Array. at .../modules/swift/manifests/proxy/cache.pp:26:6

Please note that Puppet syntax, while it defines a regex type, does NOT
permit regex type arguments to be passed to functions (as literals or
assigned to variables).

Change-Id: Ia230720e2cafb5b03404cea1ba54dd3b0ced6af3
Closes-Bug: #1449272
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2015-05-27 20:41:42 +00:00
Clayton O'Neill
3ceea9fa89 Fix concat file mode
The concat module passes the file permissions straight through to a file
resource, so for this to work in future parser then the mode has to be a
quoted string.

Change-Id: Iddfa6416e68127f874ce38edcdf1e208def2473f
2015-05-22 11:46:09 -07:00