Skip to content

Commit

Permalink
Update ceph to 59fc06026da552462e6d852695eb963cb5272e1a
Browse files Browse the repository at this point in the history
59fc06026da552462e6d852695eb963cb5272e1a fix collectors: Ceph_Config -> Ceph_config
8df08058ea0a0d4d3f051c3b046bec4529be8182 Merge "Disable udev rules in ::osd for releases <= Hammer"
08806947a8e282f80bdd33c16a4e45bbd3bf189f Add possibility to use mod_proxy for radosgw
1794166bb01558439d9dc3b763614ebee1039d53 Merge "Enable radosgw on restart * Add 2 new parameters for radosgw start and enable after reboot * Update test"
336a3567f54c51c2b35585991911ea5ab834d2f5 Merge "Fixes circular argument reference in Ruby >=2.2"
7ef9402b6fa0fe8ece8c4b472a96e0a770b758db Merge "Bump allowed version of puppetlabs-concat"
7f7191da136e74eeb8eaee145379e74ae70476f4 Merge "The ceph extras location is no more."
d91f45ec1ba64cd17e6d718e278ce427245bcc1a Disable udev rules in ::osd for releases <= Hammer
2ca15a50d35cd5910231af482bf3e63e4d44fdc9 Fix idempotency when bootstrapping ceph::mon with cephx
d2da01f592146e9a56c0effe685a8995923fec89 Bump allowed version of puppetlabs-concat
998e023d8f20584220d8c4ab2eed27541cd7ef98 Bump required version of puppetlabs-apt
a9f20b38f929b0544738c32f0054fef796e444a3 Fixes circular argument reference in Ruby >=2.2
5da48368d97094d18eccb3fb89e58c26422ca3ca Enable radosgw on restart * Add 2 new parameters for radosgw start and enable after reboot * Update test
2e676077ada17df1533befbff1d1e640124ffbfc The ceph extras location is no more.
9b9de929f292dc6ab861ec379c4b53369ba29ef7 Merge "Split the Rados GW tests into parts"
45d9124a55eed3699b3db28e6aa8b07119a7c3a8 Drop deprecated rspec-system tests and releases
cba5340f8abb5d3abe594470c26e171df4ef4a2d Merge "Update ceph::repo to use download locations documented at ceph.com http://docs.ceph.com/docs/master/install/get-packages/"
c59467369dd2e6f54ed9a7d94176f8639941b8f5 Update ceph::repo to use download locations documented at ceph.com http://docs.ceph.com/docs/master/install/get-packages/
5c517b347abbf4a0fc77a115c72ed35666b51bb0 Split the Rados GW tests into parts
185f76380b57d7c420729be10bf70ef3a3c046ae mon: fix service provider for redhat systems

Change-Id: I42f0e3125a80a9dc42c8fbbe413b1defc45a442d
  • Loading branch information
jguiditta committed Feb 29, 2016
1 parent 92ef2ec commit f9ec276
Show file tree
Hide file tree
Showing 86 changed files with 1,498 additions and 6,017 deletions.
2 changes: 1 addition & 1 deletion Puppetfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ mod 'ceilometer',
:git => 'https://github.com/openstack/puppet-ceilometer.git'

mod 'ceph',
:commit => '45c81859a5ff37c6cbbce0d260801e9f25354515',
:commit => '59fc06026da552462e6d852695eb963cb5272e1a',
:git => 'https://github.com/stackforge/puppet-ceph.git'

mod 'certmonger',
Expand Down
4 changes: 2 additions & 2 deletions ceph/.fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ fixtures:
'stdlib': 'git://github.com/puppetlabs/puppetlabs-stdlib'
'apt':
repo: 'git://github.com/puppetlabs/puppetlabs-apt.git'
ref: '1.4.0'
ref: '2.2.1'
'inifile': 'git://github.com/puppetlabs/puppetlabs-inifile'
'apache':
repo: 'git://github.com/puppetlabs/puppetlabs-apache'
ref: '1.4.1'
'concat':
repo: 'git://github.com/puppetlabs/puppetlabs-concat'
ref: '1.2.1'
ref: '2.1.0'

symlinks:
'ceph': "#{source_dir}"
4 changes: 2 additions & 2 deletions ceph/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ pkg
Gemfile.lock
.bundle
vendor
.rspec_system
Gemfile-rspec-system.lock
.vagrant/*
log
.bundled_gems/
27 changes: 0 additions & 27 deletions ceph/Gemfile-rspec-system

This file was deleted.

3 changes: 0 additions & 3 deletions ceph/Puppetfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ mod 'puppetlabs/inifile',
:git => 'git://github.com/puppetlabs/puppetlabs-inifile',
:ref => '1.0.3'

mod 'bodepd/scenario_node_terminus',
:git => 'git://github.com/bodepd/scenario_node_terminus'

mod 'puppetlabs/apache',
:git => 'git://github.com/puppetlabs/puppetlabs-apache',
:ref => '1.4.1'
Expand Down
111 changes: 8 additions & 103 deletions ceph/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ ceph
3. [Setup - The basics of getting started with ceph](#setup)
4. [Implementation - An under-the-hood peek at what the module is doing](#implementation)
5. [Limitations - OS compatibility, etc.](#limitations)
6. [Development - Guide for contributing to the module](#development)
7. [Contributors - Those with commits](#contributors)
7. [Integration - Apply the module and test restults](#integration-tests)
8. [Release Notes - Notes on the most recent updates to the module](#release-notes)
6. [Use Cases - Examples of how to use this module](#limitations)
7. [Development - Guide for contributing to the module](#development)
8. [Beaker Integration Tests - Apply the module and test restults](#integration-tests)
9. [Contributors - Those with commits](#contributors)
10. [Release Notes - Notes on the most recent updates to the module](#release-notes)

Overview
--------
Expand Down Expand Up @@ -53,12 +54,12 @@ bundle install

The developer documentation of the puppet-openstack project is the reference:

* https://wiki.openstack.org/wiki/Puppet-openstack#Developer_documentation
* https://wiki.openstack.org/wiki/Puppet#Developer_documentation

Mailing lists:

* (puppet-openstack)[https://groups.google.com/a/puppetlabs.com/forum/#!forum/puppet-openstack]
* (ceph-devel)[http://ceph.com/resources/mailing-list-irc/]
* [puppet-openstack](https://groups.google.com/a/puppetlabs.com/forum/#!forum/puppet-openstack)
* [ceph-devel](http://ceph.com/resources/mailing-list-irc/)

IRC channels:

Expand Down Expand Up @@ -87,10 +88,6 @@ to be run. Available values are
* centos-70-x64
* two-ubuntu-server-1404-x64
* ubuntu-server-1404-x64
* two-centos-66-x64
* centos-66-x64
* two-ubuntu-server-1204-x64
* ubuntu-server-1204-x64

The default is

Expand All @@ -99,98 +96,6 @@ BEAKER_set=two-ubuntu-server-1404-x64 \
bundle exec rspec spec/acceptance
```

Deprecated Integration Tests
----------------------------

Relies on
[rspec-system-puppet](https://github.com/puppetlabs/rspec-system-puppet)
and tests are in spec/system. It runs virtual machines and requires
4GB of free memory and 10GB of free disk space.

* [Install Vagrant and Virtualbox](http://docs-v1.vagrantup.com/v1/docs/getting-started/)
* sudo apt-get install ruby-dev libxml2-dev libxslt-dev # nokogiri dependencies
* mv Gemfile-rspec-system Gemfile # because of https://bugs.launchpad.net/openstack-ci/+bug/1290710
* bundle install
* bundle exec rake lint
* bundle exec rake spec
* git clone https://github.com/bodepd/scenario_node_terminus.git ../scenario_node_terminus
* bundle exec rake spec:system
* RS_SET=two-ubuntu-server-1204-x64 bundle exec rake spec:system
* RS_SET=two-centos-66-x64 bundle exec rake spec:system

The RELEASES environment variable contains the list of ceph releases
for which integration tests are going to be run. The default is

```
RELEASES='firefly hammer' \
bundle exec rake spec:system
```

The RS_SET environment variable contains the resource set of linux
distribution configurations for which integration tests are going
to be run. Available values are

* two-ubuntu-server-12042-x64
* one-ubuntu-server-12042-x64
* two-centos-65-x64
* one-centos-65-x64
* two-centos-70-x64
* one-centos-70-x64

The default is

```
RS_SET=two-ubuntu-server-1204-x64 \
bundle exec rake spec:system
```

The MACHINES environment variable contains the list of virtual
machines that are used for integration tests. This needs to match
with the RS_SET above. I.e. for a two-* RS_SET use 2 machines.
The default is

```
MACHINES='first second' \
bundle exec rake spec:system
```

On success it should complete with

```
...
=end=============================================================
Finished in 4 minutes 1.7 seconds
1 example, 0 failures
```

Example invocation of gerritexec:

```
cat > ./ci.sh << EOF
#!/bin/bash
bundle install
export BEAKER_debug=yes
export BEAKER_destroy=yes
echo ---------------- CENTOS 7 --------------
BEAKER_set=two-centos-70-x64 bundle exec rspec spec/acceptance
rc=$?
echo ---------- UBUNTU 14.04 --------------
BEAKER_set=two-ubuntu-server-1404-x64 bundle exec rspec spec/acceptance
exit $(( $? | $rc))
EOF
chmod +x ./ci.sh
GEM_HOME=~/.gems screen -dmS puppet-ceph gerritexec \
--timeout 14400 --hostname review.openstack.org \
--verbose --username puppetceph --script "../ci.sh > /tmp/out$$ 2>&1 ; r=$? ; pastebinit /tmp/out$$ ; exit $r #" \
--project openstack/puppet-ceph
```

Contributors
------------

Expand Down
2 changes: 1 addition & 1 deletion ceph/manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@

if $ensure !~ /(absent|purged)/ {
# Make sure ceph is installed before managing the configuration
Package<| tag == 'ceph' |> -> Ceph_Config<| |>
Package<| tag == 'ceph' |> -> Ceph_config<| |>
# [global]
ceph_config {
'global/fsid': value => $fsid;
Expand Down
2 changes: 1 addition & 1 deletion ceph/manifests/key.pp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
$inject_keyring_option = " --keyring '${inject_keyring}' "
}

Ceph_Config<||> -> Exec["ceph-injectkey-${name}"]
Ceph_config<||> -> Exec["ceph-injectkey-${name}"]
Ceph::Mon<||> -> Exec["ceph-injectkey-${name}"]
exec { "ceph-injectkey-${name}":
command => "/bin/true # comment to satisfy puppet syntax requirements
Expand Down
25 changes: 20 additions & 5 deletions ceph/manifests/mon.pp
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
$init = 'sysvinit'
Service {
name => "ceph-mon-${id}",
provider => 'init',
start => "service ceph start mon.${id}",
stop => "service ceph stop mon.${id}",
status => "service ceph status mon.${id}",
Expand All @@ -112,12 +113,26 @@
if $key {
$keyring_path = "/tmp/ceph-mon-keyring-${id}"

file { $keyring_path:
mode => '0444',
content => "[mon.]\n\tkey = ${key}\n\tcaps mon = \"allow *\"\n",
Ceph_config<||> ->
exec { "create-keyring-${id}":
command => "/bin/true # comment to satisfy puppet syntax requirements
set -ex
cat > ${keyring_path} << EOF
[mon.]
key = ${key}
caps mon = \"allow *\"
EOF
chmod 0444 ${keyring_path}
",
unless => "/bin/true # comment to satisfy puppet syntax requirements
set -ex
mon_data=\$(ceph-mon ${cluster_option} --id ${id} --show-config-value mon_data) || exit 1 # if ceph-mon fails then the mon is probably not configured yet
test -e \$mon_data/done
",
}

File[$keyring_path] -> Exec[$ceph_mkfs]
Exec["create-keyring-${id}"] -> Exec[$ceph_mkfs]

} else {
$keyring_path = $keyring
Expand All @@ -131,7 +146,7 @@
$public_addr_option = "--public_addr ${public_addr}"
}

Ceph_Config<||> ->
Ceph_config<||> ->
# prevent automatic creation of the client.admin key by ceph-create-keys
exec { "ceph-mon-${cluster_name}.client.admin.keyring-${id}":
command => "/bin/true # comment to satisfy puppet syntax requirements
Expand Down
26 changes: 24 additions & 2 deletions ceph/manifests/osd.pp
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,31 @@

if $ensure == present {

$ceph_check_udev = "ceph-osd-check-udev-${name}"
$ceph_prepare = "ceph-osd-prepare-${name}"
$ceph_activate = "ceph-osd-activate-${name}"

Ceph_Config<||> -> Exec[$ceph_prepare]
Package<| tag == 'ceph' |> -> Exec[$ceph_check_udev]
Ceph_config<||> -> Exec[$ceph_prepare]
Ceph::Mon<||> -> Exec[$ceph_prepare]
Ceph::Key<||> -> Exec[$ceph_prepare]

$udev_rules_file = '/usr/lib/udev/rules.d/95-ceph-osd.rules'
exec { $ceph_check_udev:
command => "/bin/true # comment to satisfy puppet syntax requirements
# Before Infernalis the udev rules race causing the activation to fail so we
# disable them. More at: http://www.spinics.net/lists/ceph-devel/msg28436.html
mv -f ${udev_rules_file} ${udev_rules_file}.disabled && udevadm control --reload || true
",
onlyif => "/bin/true # comment to satisfy puppet syntax requirements
set -ex
DISABLE_UDEV=\$(ceph --version | awk 'match(\$3, /[0-9]\\.[0-9]+/) {if (substr(\$3, RSTART, RLENGTH) <= 0.94) {print 1}}')
test -f ${udev_rules_file} && test \$DISABLE_UDEV -eq 1
",
logoutput => true,
}

Exec[$ceph_check_udev] -> Exec[$ceph_prepare]
# ceph-disk: prepare should be idempotent http://tracker.ceph.com/issues/7475
exec { $ceph_prepare:
command => "/bin/true # comment to satisfy puppet syntax requirements
Expand All @@ -73,6 +92,7 @@
mkdir -p ${data}
fi
ceph-disk prepare ${cluster_option} ${data} ${journal}
udevadm settle
",
unless => "/bin/true # comment to satisfy puppet syntax requirements
set -ex
Expand All @@ -94,10 +114,12 @@
if ! test -b ${data} || ! test -b ${data}1 ; then
ceph-disk activate ${data} || true
fi
if test -f ${udev_rules_file}.disabled && test -b ${data}1 ; then
ceph-disk activate ${data}1 || true
fi
",
unless => "/bin/true # comment to satisfy puppet syntax requirements
set -ex
ceph-disk list | grep -E ' *${data}1? .*ceph data, active' ||
ls -ld /var/lib/ceph/osd/${cluster_name}-* | grep ' ${data}\$'
",
logoutput => true,
Expand Down
2 changes: 1 addition & 1 deletion ceph/manifests/pool.pp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@

if $ensure == present {

Ceph_Config<||> -> Exec["create-${name}"]
Ceph_config<||> -> Exec["create-${name}"]
Ceph::Mon<||> -> Exec["create-${name}"]
Ceph::Key<||> -> Exec["create-${name}"]
exec { "create-${name}":
Expand Down
2 changes: 1 addition & 1 deletion ceph/manifests/profile/mon.pp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
class ceph::profile::mon {
require ::ceph::profile::base

Ceph_Config<| |> ->
Ceph_config<| |> ->
ceph::mon { $::hostname:
authentication_type => $ceph::profile::params::authentication_type,
key => $ceph::profile::params::mon_key,
Expand Down
3 changes: 1 addition & 2 deletions ceph/manifests/profile/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,7 @@
# Optional. Defaults to true
#
class ceph::profile::params (
# puppet 2.7 compatibiliy hack. TODO: change to undef once 2.7 is deprecated
$fsid = '4b5c8c0a-ff60-454b-a1b4-9747aa737d19',
$fsid = undef,
$release = undef,
$authentication_type = undef,
$mon_initial_members = undef,
Expand Down
Loading

0 comments on commit f9ec276

Please sign in to comment.