ceph::mon : tag cephx spec test

And add a comment to be interpreted by emacs and used as a reminder at
the end of the mon test file.

Change-Id: I665b233d89de964db9f84c308ab31beba1bb7fba
Signed-off-by: Loic Dachary <loic@dachary.org>
ceph::mon : control client.admin key generation

Creating an empty /etc/ceph/ceph.client.admin.keyring file disables the
automatic creation of the client.admin credentials when the first
monitor is created.

The creation of the key must be done via ceph::key, using the
mon. keyring, in the same way ceph-create-keys does.

Modify the client.volumes test to actually use cephx instead of
injecting a key in a non cephx cluster. It makes the client.something
test redundant and also demonstrates that the client.admin key can be
created by puppet instead of being automatically created by
ceph-create-keys.

Change-Id: I7060e418c27ea3f6f4e53604044f21865438382e
Signed-off-by: Loic Dachary <loic@dachary.org>
ceph::osd : do not hardcode the cluster name

And cleanup the content of the OSD when it is removed, before umounting it.

Change-Id: Ie255d4ae4012b995fd2fc0e6f643ed32a03ce165
Signed-off-by: Loic Dachary <loic@dachary.org>
ceph::osd : add support for mon data directories

The creation of the OSD is separated in two stages, ceph-disk prepare
and ceph-disk activate. When dealing with a device this is not
necessary. But it is necessary when mon data is a directory.

The mon data directory is created if it does not exist. Although this is
not necessary for versions >= dumpling, it is for cuttlefish.

The tests are unmodified : they are run once with the /dev/sdb device
and again with the /srv/data directory.

The filestore_xattr_use_omap = true is added because cuttlefish does not
set it by default and will fail if trying to OSD::mount a directory from
a file system with limited xattr capacity such as ext4.

Note: the indentation in the tests is intentionally incorrect to not
introduce white space changes and make a clean diff.

Change-Id: Ie40eea0908b0f2e14420e2b0df2ba26e1465d23e
Signed-off-by: Loic Dachary <loic@dachary.org>
ceph::osd : indent tests

Change-Id: I5cc8f9711b02a39e7a3dc6da47ff37bd551f75e9
Signed-off-by: Loic Dachary <loic@dachary.org>
ceph::osd : add tests for osd data on an existing partition

Specifying an existing partition as osd data is supported when the
partition is properly set with the Ceph type uuid (
4fbd7e29-9d25-41b8-afd0-062c0ceff05d ). Add a test that shows it is.

Change-Id: I186647e331157a5ea8df025c0074e38a25cb238a
Signed-off-by: Loic Dachary <loic@dachary.org>
Create rspec-system tests for RedHat family

Provides the necessary nodset configurations and examples
on how to run the tests on RedHat family systems.

Using CentOS 6.4 as a representative for RedHat family systems,
as there is a box available from the puppetlabs Vagrant boxes
repository with the same Virtualbox version requirements as the
existing Ubuntu Precise one:

http://puppet-vagrant-boxes.puppetlabs.com

This is needed to test solutions for bugs 1264959 and 1264916.

There is a circular dependency issue between those bugs and this:
Cannot test the solutions to those bugs without this patch, but without
solutions to those tests the rspec-system tests for RedHat family
systems won't run. To have only running code committed, this should
only be merged together with the other patches.

Change-Id: I2093635034ca78b7fb6dbfd950cf35af8a03bc6f
Closes-Bug: 1253211
Related-Bug: 1264959
Related-Bug: 1264916
drop --cluster from ceph-disk activate (osd).

This commit removes the --cluster option from the 'ceph-disk activate'
part of the osd configuration (when the cluster is given as an arg).
Only 'ceph-disk prepare' accepts a cluster option.

Change-Id: I4027690c36141a184c1fb1b64b382e17cbbcf487
Closes-Bug: #1323120
define ceph::pool.

Provides pool management.

Handles ceph pools, including creation and the basic pool attributes
(pg_num, pgp_num, size/replica), as well as deletion of existing pools.

Includes rspec system puppet for validation.

Change-Id: Ia5aa832fc286f0eb5ad0932dcc2fb0796c21187b
Fixes Bug: "yum repo don't work in CentOS 6.4"

Removing curly braces around the the basearch parameter which
lead to parsing issues.

Fixing additional issues with yum repo configuration and
adapting the CI test.

Locally verified this with RS_SET=two-centos-64-x64.
While it would be preferable to verify it via gerritexec,
all of the CI except ceph_repo_spec.pp fail.
This will be handled with subsquent patches.

Change-Id: Ia99e20dab8c496cc3becec77acbe38003c6d7779
Closes-Bug: 1264959
Partially-Bug: 1264916
Merge "define ceph::pool."
Support for RedHat in ceph::mon

Support for RedHat in ceph::mon and in ceph::mon, ceph::keys CI tests.

Yumrepo isn't propperly removed but only disabled. This leads to a need
to ensure => absent on the ceph::repo whenever a switch to a different
ceph version happens. Therefore it's refactored run tests ordered by
release

Change-Id: I51150c1e3316bdab20c4458e79c4aeeb15fe4bd2
Closes-Bug: #1264916
Closes-Bug: #1323841
Fixed removal command in ceph::osd

And updated the CI tests. ceph::repo needs to be removed whenever
a different release is targeted. This is mainly because "enabled" is
used in yumrepos, because of the lack of "ensure" in Puppet < 3.5
Refactored to not have to switch ceph::repo constantly, but run tests
on a per release order.

Change-Id: I555acda7413765aaa99f922893649e1f13215450
Closes-Bug: #1264916
Closes-Bug: #1323841
Closes-Bug: #1323838
Merge "drop --cluster from ceph-disk activate (osd)."
Remove unnecessary if statement in ceph::mon

A previous patchset implementing RedHat family support for ceph::mon had
an erroneous if statement in the OS selection code.
This is fixed here, in its own patchset though, as changes to the previous
patchset failed the CI tests (and even crashed the test infrastructure as
it got stuck indefinitely.)

The removal of the if statement requires some changes in the tests as well.

Also added a check for the exec in RedHat family.

Change-Id: I38fbf189c806a21c40bb55dd47d6debb3a592b89
Adding spec tests for RedHat family where needed

Change-Id: Ia10aabf889416eeaa643533d2f658409368ae977
Partial-Bug: #1323655
Merge "Support for RedHat in ceph::mon"
Merge "Fixed removal command in ceph::osd"
Merge "Remove unnecessary if statement in ceph::mon"
Merge "Adding spec tests for RedHat family where needed"