476 Commits

Author SHA1 Message Date
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
Martin Mágr
d05d97d39e Bring Redhat support to acceptance tests
OpenStack Infra has jobs to run this on both Ubuntu Trusty and CentOS7.

* Add minitest to Gemfile (dependency to run beaker on centos - see
  http://projects.theforeman.org/issues/2650 for details)
* separate nodepool files to have trusty & centos7 support in OS infra
* basic_swift_spec: add case for repo configuration and support
  RH systems.

Change-Id: I745fa76b2b36b0dbada83260fedffc4ee60f9c03
Closes-bug: #1444736
2015-05-22 11:39:10 -07:00
Martin Mágr
7483eaf336 Beaker: install APT repo with openstack_extras
Use openstack_extras module to manage Ubuntu Cloud Archive repository.

Change-Id: I43c3cadcbe4d2791cd58095ae16341119b272099
2015-05-22 11:38:42 -07:00
Emilien Macchi
49fd248002 mount.pp: fix lint issue
Make sure ::selinux fact is a boolean to support all
versions of Facter.

Change-Id: I173fd7b916456a96642458ef52f2af1edfa58841
2015-05-22 11:38:13 -07:00
Jenkins
08f6107311 Merge "Added rsyslog logging support to object-server" 2015-05-06 17:18:30 +00:00
Emilien Macchi
59b47a29d1 Beaker tests
Implement basic structure for beaker tests.

Change-Id: I3ff1f74115be8029bffc0eb9f11e09cbd4cd74a9
Closes-bug: #1444736
2015-05-04 14:22:38 -04:00
Adam Vinsh
c9809f8c92 Added rsyslog logging support to object-server
Also change both proxy-server and object-server
.conf templates to test if log_udp_server and
log_udp_port are nil, instead of an empty string.
Testing for an empty string would have retruned
true if set to 'undef' - for futer parser compat.

Change-Id: Idac805f628dbec70a4adb6a1c021d85a743fdb72
2015-05-03 21:22:12 -06: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
Jenkins
2a0b89dfa7 Merge "Remove creation of /home/swift" 2015-04-24 06:45:49 +00:00
Jenkins
601c18f311 Merge "Bump rspec-puppet to 2.1.0" 2015-04-23 15:02:53 +00:00
Emilien Macchi
24a08bcf9c Bump rspec-puppet to 2.1.0
rspec-puppet 2.1.0 includes Puppet 4.0 support [1].

[1] https://github.com/rodjek/rspec-puppet/commits/v2.1.0

Change-Id: I87a629c6272eda7b79f60fda6830915c2f6ea5b5
2015-04-22 23:57:02 -04: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
Jenkins
35b386479d Merge "Synchronize LICENSE file with OpenStack projects" 2015-04-20 14:29:10 +00:00
Emilien Macchi
56f1eb5014 Synchronize LICENSE file with OpenStack projects
Update LICENSE file to be the same as other OpenStack projects.

Change-Id: I6c864b6a6676f74641b31f3163845fbe8dfa0a2c
Closes-bug: #1241725
2015-04-20 09:30:24 -04:00
Jenkins
f67877f1fa Merge "read_affinity requires affinity sorting_method" 2015-04-17 15:37:25 +00:00
Colleen Murphy
2737af141a Pin puppetlabs-concat to 1.2.1 in fixtures
Puppet Labs is in the process of releasing a 2.0.0 version of
puppetlabs-concat, which will have many breaking changes that affect
many dependent modules. Changes have been merged to master, but not yet
released. While we figure out what changes we need to make in our own
modules and wait for updates in dependent modules, we should just pin
to a stable version.

Change-Id: Ifb4ca49a9dcbeb3b20781ed24ecd16ae9348903b
2015-04-15 15:42:46 -07:00
Jenkins
cb6aa56b54 Merge "Fix ipv6 support" 2015-04-14 19:46:51 +00:00
Jenkins
ebb8986567 Merge "Tag all Swift packages" 2015-04-11 09:15:19 +00:00
Emilien Macchi
6dc85b0f79 Notify services if swift.conf is modified
swift.conf contains the hash_suffix. With the current module, we have a
race condition where services can start *before* having the right hash
in swift.conf, so some objects mays be put in quarantine.

When usint swift_config (which affect swift.conf), we should restart all
services to ensure our ring is running correctly.

Change-Id: I1087ba4ec079ca9c43bea9ff0511347632871ec2
Closes-bug: #1442329
2015-04-09 17:03:07 -04:00
vinsh
e04486fe46 read_affinity requires affinity sorting_method
proxy-server.conf read_affinity setting has no
effect unless sorting_method is set to 'affinity'

Change-Id: Ife0a30158289ea1dd44c1e93f058538c45c3a9c8
2015-04-08 17:08:47 -06:00
Gael Chamoulaud
06addb7b3b Fix Rspec 3.x new is_expected.[to|to_not] keywords
Some 'should' keyword have been forgotten during the rspec2.x to rspec3.x
updates. This patch fixes that!

Change-Id: I9cbec83b58eea6e417af6418b99cf3338c463ba7
Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
2015-04-07 20:01:19 +02: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
Lukas Bezdicka
b6ba9f09b2 Fix ipv6 support
One shold never parse uri with split(':') as it was in types
ring_account_device, ring_container_device and ring_object_device.
This is fixed by using uri and just setting variables from that.
Also swift_ring_builder didn't add brackets to ipv6 address before
adding port information to it.

Change-Id: I55b7032143c8446abeed4f6c266c0fff0cb6b3b3
2015-04-07 12:54:14 +02:00
Colleen Murphy
7ad2a10e1f Update ssh module version
The ssh module had an issue with hostkeys on RHEL systems prior to
version 2.4.0 that would cause puppet to error during a run: the
sshdsakey fact returns empty, so the exported dsa sshkey resource fails
due to an empty parameter[1]. The current dependency restricts the ssh
module to less than 2.0, which contains the bug.

Problematically, version 2.5.0 of the ssh module adds a change that is
incompatible with older 3.x versions of puppet [2], which breaks our tests.

This patch updates the ssh dependency to use full range of the next
major version in order to be as accomodating as possible. However, for
RHEL users to avoid the ssh key bug, they must use at least version
2.4.0. For users of older puppet versions to avoid the bad parameter
issue, they must use a version less than 2.5.0. The .fixtures.yml pins
to 2.4.0 for maximum compatibility. We could pin the dependency in the
metadata to exactly 2.4.0 as well, but since these are issues in the
ssh module, not swift's use of the ssh module, it is more appropriate
just to allow the newer version but not be too restrictive on the
version.

The ssh::server class has an API change between 1.x and 2.x, but the
new parameters (ensure, storeconfigs_enabled, and an options hash) have
acceptable defaults.

[1] https://github.com/saz/puppet-ssh/blob/v1.4.0/manifests/hostkeys.pp#L8
[2] https://github.com/saz/puppet-ssh/blob/v2.5.0/manifests/server/install.pp#L7

Change-Id: I30216b0336b5f1f1c65e711cb97654ef663ba01f
2015-04-06 10:20:48 -07:00
Jenkins
96ad9dd223 Merge "Add Puppet 4.x lint checks" 2015-03-27 12:13:59 +00:00
Jenkins
cc00b5cf5f Merge "spec: updates for rspec-puppet 2.x and rspec 3.x" 2015-03-27 00:53:45 +00:00
Jenkins
35ad8ab1a3 Merge "Upgrade puppet-lint and fix metadata, parameter and style lint issues" 2015-03-27 00:53:06 +00:00
Jenkins
1ca74aafa4 Merge "Add base swift class name to call" 2015-03-26 14:29:05 +00:00
David Moreau Simard
7a0c615db8 Add node_timeout parameter for proxy-server.conf
This commit allows to configure the node_timeout parameter
of proxy-server.conf proxy-server middleware in the pipeline.

Change-Id: Idbac35336a5b266f6de288a28243f91ee4d67afd
2015-03-25 13:55:39 -04:00
Derek Tamsen
88541bdef6 Add base swift class name to call
When the ring server manifest `swift::ringserver` is called
the client throws and error with missing class. The module
`swift::ringserver` appears to refer to an incorrect class of
`Class['ringbuilder']` which should be `Class['swift::ringbuilder']`.

Change-Id: I9ddb12d2614440fe245aaaa10b7b17781a742f37
Implements: Add swift base class name to class call
Closes-Bug: 1414900
2015-03-25 17:10:26 +00: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
f4cfe8e8e4 spec: updates for rspec-puppet 2.x and rspec 3.x
This patch aim to update our specs test in order to work with the
rspec-puppet release 2.0.0, in the mean time, we update rspec syntax
in order to be prepared for rspec 3.x move.

In details:
  * Use shared_examples "a Puppet::Error" for puppet::error tests
  * Convert 'should' keyword to 'is_expected.to' (prepare rspec 3.x)
  * Fix spec tests for rspec-puppet 2.0.0
  * Upgrade and pin rspec-puppet from 1.0.1 to 2.0.0
  * Clean Gemfile (remove over-specificication of runtime deps of puppetlabs_spec_helper)
  * Remove un-used puppet-lint (name_containing_dash config)

Change-Id: I5488507176d4665895eef65ddb4b6f0fb4eda3e7
Card: https://trello.com/c/eHXc1Ryd/4-investigate-the-necessary-change-to-be-rspec-puppet-2-0-0-compliant
2015-03-24 15:22:16 +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
Dan Prince
15aa71f001 Remove unused fragment_title variable
This variable was added in commit 020b772 but it doesn't
appear that it was ever used.

Change-Id: Ica96e07b58472a12ac3a06893a4fa89c1799b081
2015-03-21 11:32:39 +00:00
Jenkins
03e7cfd978 Merge "Adds ability to override service name for service catalog" 2015-03-20 21:35:34 +00:00
Rico Lin
9a45dff83c Adds ability to override service name for service catalog
Instead of forcing the name of the service in the service catalog to
match auth_name, this allows the ability to explicitly set the service
name, spearately from auth_name.
If service_name is not specified, it's value defaults to the value
of auth_name (which maintains the current behavior.)

Change-Id: Ie586b2892c092a9694b067a9e0f28f36396de30d
Closes-bug: #1359755
2015-03-20 09:00:57 +08:00
David Moreau Simard
2caba862a8 Provide a mean to change the default rsync chmod
puppet-rsync provides a default chmod of 0644.
puppet-swift, until this commit, did not provide a way
to change that default chmod.
According to the experience in bug #1433390, it
seemed possible for folders to be created in 0644, thus
denying access to the folders unless you were root.

Backwards compatibility is maintained through the same
defaults.. It looks like the default is broken in
the context of Swift (unless it runs as root?), however.
We should consider putting 'Du=rwx,g=rx,o=rx,Fu=rw,g=r,o=r'
which translates to 755 for folders and 644 for files.

Change-Id: I7fcef6e4cdf478e808de2895168165989ff098e4
Closes-bug: #1433390
2015-03-17 23:51:01 -04:00
Dan Prince
119ff9c3e0 Add support for identity_uri.
This patch adds the ability to set a new identity_uri parameter.
It also deprecates the old auth_host, auth_port, auth_protocol,
and auth_admin_prefix parameters. Logic is in place so that
users of the deprecated settings should have a smooth upgrade
process and get deprecation warnings until they adopt the
new settings.

Change-Id: Ideefb4d824cbd5b4b83f9eb773a75e536e3458fb
2015-03-17 14:31:19 +01:00
Sebastien Badia
a5c52d2a2d Add missing openstacklib fixture
openstackclient lib/provider are now migrated from keystone to openstacklib
let's add openstacklib as a new dependency.

Change-Id: I1854e18ecf6497daef70bccef46e5d6cb7c0b819
2015-03-16 10:42:32 +01:00
Jamie Lennox
128ce97061 Use keystonemiddleware instead of client
The auth_token middleware that lives in
keystoneclient.middleware.auth_token has been deprecated in favour of
keystonemiddleware.auth_token.

This prints a deprecation warning and means we are not getting new
features.

Closes-Bug: #1428376
Change-Id: If5352801b8105533600965a25f02a577a858f1a2
2015-03-05 00:54:31 +00:00
vinsh
0d40df78fe doc spelling corrections
Change-Id: I2d19bcf6fa01aca6025cdd5828e35db4a2b17199
2015-02-12 14:28:09 -07:00
Mathieu Gagné
60e785776b Remove non-ASCII characters from puppet doc
It crashes catalog compilation with this error:
  Error 400 on SERVER: invalid byte sequence in US-ASCII

Change-Id: Ia784c840b1b05ed43b3f72426caa480916d9635b
Closes-bug: #1420979
2015-02-11 16:34:39 -05:00
Sebastien Badia
2c61fd3187 spec: pin rspec-puppet to 1.0.1
rspec-puppet (2.0.0) was released yesterday[1], this new version broke
puppet-openstack unit tests (undefined method `resource')[2] as talked on
and in a second time to update your specs to 2.0.0 and rspec 3.x`)

[1] 8459e14807
[2] http://logs.openstack.org/45/105245/6/check/gate-puppet-nova-puppet-unit-3.3/3682541/console.html

Change-Id: Ia98ccb05dddf592b5680cf27dfbc37c96e691f04
Partial-bug: #1417604
2015-02-03 15:32:20 +01:00
Dan Prince
499386a89d Swift proxy won't start if using proxy:ceilometer
The Swift ceilometer middleware needs to be able to
write its log file in the /var/log/ceilometer
directory. Not all distributions set permissions
on this directory such that the swift user/group
can write into the ceilometer log directory. This
can cause the swift-proxy to fail to startup due
to permissions issues.

This patch updates the swift::proxy::ceilometer so
that we create an empty /var/log/ceilometer/swift-proxy-server.log
file with proper permissions before starting the swift-proxy
service.

Change-Id: If7b88bf51046317171f6fa85bb8c01390fa26a37
2015-01-26 22:11:02 -05:00
Jenkins
08d00c3516 Merge "Correct proxy::authtoken docs" 2015-01-11 23:58:49 +00:00
Dan Prince
b8b443416d Add seed parameter to ringbuilder::rebalance.
This patch adds an optional seed parameter to the
swift::ringbuilder::rebalance definition. The seed
parameter can be useful if you want to (manually)
generate rings on independant servers and ensure that
the partition assignments are the same.

Change-Id: I840b8fe0125ed25e84f7681fada1b1102e48f32b
2015-01-08 17:36:24 -05:00
Dan Prince
1e1c6041ac Correct proxy::authtoken docs
Updates several proxy::authtoken documentation parameters so
that they match the implementation defaults.

Change-Id: I572af876cbce704c0a252695afd44ec782f6b1d1
2015-01-08 16:06:09 -05:00
Jenkins
f9724a5050 Merge "Enlarging the scope of ssh module" 2014-12-04 16:00:02 +00:00
Jenkins
a69a506df0 Merge "Refactorise Keystone resources management" 2014-12-03 22:27:06 +00:00