Skip to content

Commit

Permalink
Update ceph to c60c6209ac799555b94bf62ce1c2cf00084e42d2
Browse files Browse the repository at this point in the history
c60c6209ac799555b94bf62ce1c2cf00084e42d2 Fix RSpec 3.x syntax
7585a60ec7f9c6cd781068859663f57f9a945f2f Switch to new release key
aa6a46bbdecbf7f887f2464aae165cbd1a8e986a Drop no longer supported releases
398b904eb56611b948cc5aea2a33b3dd538337b7 use full length APT key
008370a86c2f32161473b97dbd51a00c07dbda55 Fix RGW Apache syslog creation
6cb9a00898c86bf32a5706ade64fe3787b0b739b Allow customization of OSDs journal size via class param
f6206a15cc5e52689d20d8b59e7a6bdd9bb9b887 Merge "Fix rgw keystone"
0d7fb171026fa998fbd3c87d3949b2d98863a913 Make args for conf, mons, osds and keys wrappers optional
79fd0d9aebcec4cfac054fb3ed81149a9ed88a53 Merge "osd: fix pattern when matching ${data}"
f65293e56c50c8300e2e975199c988da2a785c95 Merge "Clean the documentation for rspec-beaker"
0c42ba3c817cb97f146e371cf43365c94af1429b Merge "Fix a race condition in mon creation"
a8bccf57dd574e6af677273f10f061cd64e8d7dc Clean the documentation for rspec-beaker
2eb9458fdac9ac03a3474d104450c8634ab285ae Fix rgw keystone
e81e93e45881870b312ae5448e6d39614d7f9640 Fix a race condition in mon creation
10fabadd204587713dbc4ed99d8a57050c6b73fb Enable GPG for EPEL
a58eb25feb60bb1e28cc86cc67236d0c0700135a Merge "define ceph::rgw::keystone."
2ec59f3b8ae4da8f953212091c67ae943861923c osd: fix pattern when matching ${data}
38c4cacd423ece462a1c72837d175aeb8e1f67db Fix the two centos70 nodeset to install correct puppet
498f8e16a32e3c60b050fde6210f0ca3539bf5b3 Add rspec beaker boxes for centos7 and trusy
c1dd900b35d6aee72c6fd32587783b83bf4e6032 define ceph::rgw::keystone.
c58f1e282d2a85d79c221800e88a415eaeaa094a Merge "osd: fix pattern when matching ${data}"
2b0ba61b4697bab2f964321b96afc68340b62636 Bump default release to hammer
b76719ef98cfec1cc17ceec68773d7a7a0079dc7 osd: fix pattern when matching ${data}
71fccdf944a2b0721a972a8a86f97703cabd586e Add EL7 Support, Fix unit and integration tests
a1c1ce2aea987550e54bcb1f3e3a18f428a10506 Fix apt::key location to not contain redirect
a3c12f05d811f5506f69f3060e554c80793dc183 Convert rspec tests to rspec 3.x

Change-Id: If305311600ed3def71df06c32ab46b8672730887
  • Loading branch information
xbezdick committed Oct 13, 2015
1 parent c53b5dc commit 85af6c2
Show file tree
Hide file tree
Showing 69 changed files with 2,327 additions and 943 deletions.
2 changes: 1 addition & 1 deletion Puppetfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ mod 'ceilometer',
:git => 'https://github.com/openstack/puppet-ceilometer.git'

mod 'ceph',
:commit => 'b6ab15b47c81d7694fdcfd75d8f2e0a0481ca40c',
:commit => 'c60c6209ac799555b94bf62ce1c2cf00084e42d2',
: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 @@ -7,10 +7,10 @@ fixtures:
'inifile': 'git://github.com/puppetlabs/puppetlabs-inifile'
'apache':
repo: 'git://github.com/puppetlabs/puppetlabs-apache'
ref: '1.0.1'
ref: '1.4.1'
'concat':
repo: 'git://github.com/puppetlabs/puppetlabs-concat'
ref: '1.1.0'
ref: '1.2.1'

symlinks:
'ceph': "#{source_dir}"
4 changes: 2 additions & 2 deletions ceph/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ source 'https://rubygems.org'

group :development, :test do
gem 'puppetlabs_spec_helper', :require => false
gem 'rspec-puppet', '~> 2.0.0', :require => false
gem 'beaker-rspec', '~> 2.2.4', :require => false
gem 'rspec-puppet', '~> 2.1.0', :require => false
gem 'beaker-rspec', :require => false
gem 'puppet-lint-param-docs'
gem 'metadata-json-lint'
gem 'puppet-lint-absolute_classname-check'
Expand Down
2 changes: 1 addition & 1 deletion ceph/Gemfile-rspec-system
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ source 'https://rubygems.org'

group :development, :test do
gem 'puppetlabs_spec_helper', :require => false
gem 'rspec-puppet', '~> 2.0.0', :require => false
gem 'rspec-puppet', '~> 2.1.0', :require => false
gem 'metadata-json-lint'
gem 'puppet-lint-param-docs'
gem 'puppet-lint-absolute_classname-check'
Expand Down
4 changes: 2 additions & 2 deletions ceph/Puppetfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ mod 'bodepd/scenario_node_terminus',

mod 'puppetlabs/apache',
:git => 'git://github.com/puppetlabs/puppetlabs-apache',
:ref => '1.0.1'
:ref => '1.4.1'

mod 'puppetlabs/concat',
:git => 'git://github.com/puppetlabs/puppetlabs-concat',
:ref => '1.1.x'
:ref => '1.2.1'
77 changes: 45 additions & 32 deletions ceph/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,24 +75,27 @@ It also requires [Vagrant and Virtualbox](http://docs-v1.vagrantup.com/v1/docs/g
.

```
BUNDLE_PATH=/tmp/vendor bundle install
BUNDLE_PATH=/tmp/vendor bundle exec rspec spec/acceptance
bundle install
bundle exec rspec spec/acceptance
```

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

* two-centos-70-x64
* 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
* two-centos-64-x64
* centos-64-x64

The default is

```
BUNDLE_PATH=/tmp/vendor \
BEAKER_set=two-ubuntu-server-1204-x64 \
BEAKER_set=two-ubuntu-server-1404-x64 \
bundle exec rspec spec/acceptance
```

Expand All @@ -107,36 +110,36 @@ and tests are in spec/system. It runs virtual machines and requires
* [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_PATH=/tmp/vendor bundle install
* BUNDLE_PATH=/tmp/vendor bundle exec rake lint
* BUNDLE_PATH=/tmp/vendor bundle exec rake spec
* bundle install
* bundle exec rake lint
* bundle exec rake spec
* git clone https://github.com/bodepd/scenario_node_terminus.git ../scenario_node_terminus
* BUNDLE_PATH=/tmp/vendor bundle exec rake spec:system
* BUNDLE_PATH=/tmp/vendor RS_SET=two-ubuntu-server-1204-x64 bundle exec rake spec:system
* BUNDLE_PATH=/tmp/vendor RS_SET=two-centos-66-x64 bundle exec rake spec:system
* 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

```
BUNDLE_PATH=/tmp/vendor \
RELEASES='dumpling firefly giant' \
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-1204-x64
* ubuntu-server-1204-x64
* two-centos-66-x64
* centos-66-x64
* 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

```
BUNDLE_PATH=/tmp/vendor \
RS_SET=two-ubuntu-server-1204-x64 \
bundle exec rake spec:system
```
Expand All @@ -163,19 +166,29 @@ Finished in 4 minutes 1.7 seconds
Example invocation of gerritexec:

```
script='bash -c "'
script+='mv Gemfile-rspec-system Gemfile ; bundle install ; '
script+='RS_SET=two-ubuntu-server-1204-x64 bundle exec rake spec:system ; '
script+='RS_SET=two-centos-66-x64 bundle exec rake spec:system ; '
script+='" > /tmp/out 2>&1 ; r=$? ; '
script+='echo https://pypi.python.org/pypi/gerritexec output: ; '
script+='pastebinit /tmp/out ; '
script+='exit $r #'
GEM_HOME=~/.gems gerritexec \
--hostname review.openstack.org \
--verbose --username puppetceph \
--script "$script" \
--project stackforge/puppet-ceph
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 stackforge/puppet-ceph
```

Contributors
Expand Down
5 changes: 2 additions & 3 deletions ceph/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ require 'metadata-json-lint/rake_task'

begin
require 'rspec-system/rake_task'
rescue LoadError => e
warn e.message
warn "Run `gem install rspec-system-puppet` to enable integration tests."
rescue LoadError
# don't warn anymore as rspec-system is deprecated
end

PuppetLint.configuration.fail_on_warnings = true
Expand Down
3 changes: 2 additions & 1 deletion ceph/examples/common.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
---
######## Ceph
ceph::profile::params::release: 'giant'
ceph::profile::params::release: 'hammer'

######## Ceph.conf
ceph::profile::params::fsid: '4b5c8c0a-ff60-454b-a1b4-9747aa737d19'
ceph::profile::params::authentication_type: 'cephx'
ceph::profile::params::mon_initial_members: 'first, second'
ceph::profile::params::mon_host: '10.11.12.2:6789, 10.11.12.3:6789'
ceph::profile::params::osd_journal_size: '4096'
ceph::profile::params::osd_pool_default_pg_num: '200'
ceph::profile::params::osd_pool_default_pgp_num: '200'
ceph::profile::params::osd_pool_default_size: '2'
Expand Down
4 changes: 2 additions & 2 deletions ceph/manifests/conf.pp
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
# === Parameters:
#
# [*args*] A Ceph config hash.
# Mandatory.
# Optional.
#
# [*defaults*] A config hash
# Optional. Defaults to a empty hash
#
class ceph::conf($args, $defaults = {}) {
class ceph::conf($args = {}, $defaults = {}) {
create_resources(ceph_config, $args, $defaults)
}
5 changes: 5 additions & 0 deletions ceph/manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
# [*keyring*] The location of the keyring retrieved by default
# Optional. Defaults to /etc/ceph/keyring.
#
# [*osd_journal_size*] The size of the journal file/device.
# Optional. Integer. Default provided by Ceph.
#
# [*osd_pool_default_pg_num*] The default number of PGs per pool.
# Optional. Integer. Default provided by Ceph.
#
Expand Down Expand Up @@ -94,6 +97,7 @@
$ensure = present,
$authentication_type = 'cephx',
$keyring = undef,
$osd_journal_size = undef,
$osd_pool_default_pg_num = undef,
$osd_pool_default_pgp_num = undef,
$osd_pool_default_size = undef,
Expand Down Expand Up @@ -139,6 +143,7 @@
'global/sign_messages': value => $sign_messages;
'global/cluster_network': value => $cluster_network;
'global/public_network': value => $public_network;
'osd/osd_journal_size': value => $osd_journal_size;
}

if $authentication_type == 'cephx' {
Expand Down
4 changes: 2 additions & 2 deletions ceph/manifests/keys.pp
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
# === Parameters:
#
# [*args*] A Ceph keys config hash
# Mandatory.
# Optional.
#
# [*defaults*] A keys config hash
# Optional. Defaults to a empty hash.
#
class ceph::keys($args, $defaults = {}) {
class ceph::keys($args = {}, $defaults = {}) {
create_resources(ceph::key, $args, $defaults)
}
14 changes: 7 additions & 7 deletions ceph/manifests/mon.pp
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,13 @@
}

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
set -ex
touch /etc/ceph/${cluster_name}.client.admin.keyring",
}
->
exec { $ceph_mkfs:
command => "/bin/true # comment to satisfy puppet syntax requirements
set -ex
Expand All @@ -148,13 +155,6 @@
logoutput => true,
}
->
# 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
set -ex
touch /etc/ceph/${cluster_name}.client.admin.keyring",
}
->
service { $mon_service:
ensure => running,
}
Expand Down
4 changes: 2 additions & 2 deletions ceph/manifests/mons.pp
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
# === Parameters:
#
# [*args*] A Ceph mons config hash
# Mandatory.
# Optional.
#
# [*defaults*] A config hash
# Optional. Defaults to a empty hash
#
class ceph::mons($args, $defaults = {}) {
class ceph::mons($args = {}, $defaults = {}) {
create_resources(ceph::mon, $args, $defaults)
}
23 changes: 8 additions & 15 deletions ceph/manifests/osd.pp
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,8 @@
",
unless => "/bin/true # comment to satisfy puppet syntax requirements
set -ex
ceph-disk list | grep ' *${data}.*ceph data, prepared' ||
ceph-disk list | grep ' *${data}.*ceph data, active' ||
ls -l /var/lib/ceph/osd/${cluster_name}-* | grep ' ${data}'
ceph-disk list | grep -E ' *${data}1? .*ceph data, (prepared|active)' ||
ls -l /var/lib/ceph/osd/${cluster_name}-* | grep ' ${data}\$'
",
logoutput => true,
}
Expand All @@ -93,8 +92,8 @@
",
unless => "/bin/true # comment to satisfy puppet syntax requirements
set -ex
ceph-disk list | grep ' *${data}.*ceph data, active' ||
ls -ld /var/lib/ceph/osd/${cluster_name}-* | grep ' ${data}'
ceph-disk list | grep -E ' *${data}1? .*ceph data, active' ||
ls -ld /var/lib/ceph/osd/${cluster_name}-* | grep ' ${data}\$'
",
logoutput => true,
}
Expand All @@ -106,13 +105,10 @@
command => "/bin/true # comment to satisfy puppet syntax requirements
set -ex
if [ -z \"\$id\" ] ; then
id=\$(ceph-disk list | grep ' *${data}.*ceph data' | sed -ne 's/.*osd.\\([0-9][0-9]*\\).*/\\1/p')
id=\$(ceph-disk list | sed -nEe 's:^ *${data}1? .*(ceph data|mounted on).*osd\\.([0-9]+).*:\\2:p')
fi
if [ -z \"\$id\" ] ; then
id=\$(ceph-disk list | grep ' *${data}.*mounted on' | sed -ne 's/.*osd.\\([0-9][0-9]*\\)\$/\\1/p')
fi
if [ -z \"\$id\" ] ; then
id=\$(ls -ld /var/lib/ceph/osd/${cluster_name}-* | grep ' ${data}' | sed -ne 's:.*/${cluster_name}-\\([0-9][0-9]*\\) -> .*:\\1:p' || true)
id=\$(ls -ld /var/lib/ceph/osd/${cluster_name}-* | sed -nEe 's:.*/${cluster_name}-([0-9]+) *-> *${data}\$:\\1:p' || true)
fi
if [ \"\$id\" ] ; then
stop ceph-osd cluster=${cluster_name} id=\$id || true
Expand All @@ -127,13 +123,10 @@
unless => "/bin/true # comment to satisfy puppet syntax requirements
set -ex
if [ -z \"\$id\" ] ; then
id=\$(ceph-disk list | grep ' *${data}.*ceph data' | sed -ne 's/.*osd.\\([0-9][0-9]*\\).*/\\1/p')
fi
if [ -z \"\$id\" ] ; then
id=\$(ceph-disk list | grep ' *${data}.*mounted on' | sed -ne 's/.*osd.\\([0-9][0-9]*\\)\$/\\1/p')
id=\$(ceph-disk list | sed -nEe 's:^ *${data}1? .*(ceph data|mounted on).*osd\\.([0-9]+).*:\\2:p')
fi
if [ -z \"\$id\" ] ; then
id=\$(ls -ld /var/lib/ceph/osd/${cluster_name}-* | grep ' ${data}' | sed -ne 's:.*/${cluster_name}-\\([0-9][0-9]*\\) -> .*:\\1:p' || true)
id=\$(ls -ld /var/lib/ceph/osd/${cluster_name}-* | sed -nEe 's:.*/${cluster_name}-([0-9]+) *-> *${data}\$:\\1:p' || true)
fi
if [ \"\$id\" ] ; then
test ! -d /var/lib/ceph/osd/${cluster_name}-\$id
Expand Down
4 changes: 2 additions & 2 deletions ceph/manifests/osds.pp
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
# === Parameters:
#
# [*args*] A Ceph osds config hash
# Mandatory.
# Optional.
#
# [*defaults*] A config hash
# Optional. Defaults to a empty hash
#
class ceph::osds($args, $defaults = {}) {
class ceph::osds($args = {}, $defaults = {}) {
create_resources(ceph::osd, $args, $defaults)
}
Loading

0 comments on commit 85af6c2

Please sign in to comment.