Merge pull request #33 from enovance/bug/32/sbadia

Fix #32 (ceilometer cron command) and fix all lint issues
This commit is contained in:
Yanis Guenane 2014-01-22 14:56:11 -08:00
commit 07345ba9cc
5 changed files with 31 additions and 18 deletions

View File

@ -4,12 +4,7 @@ require 'puppet-lint/tasks/puppet-lint'
PuppetLint.configuration.fail_on_warnings = true
PuppetLint.configuration.send('disable_80chars')
PuppetLint.configuration.send('disable_class_parameter_defaults')
PuppetLint.configuration.send('disable_autoloader_layout')
PuppetLint.configuration.send('disable_variable_scope')
PuppetLint.configuration.send('disable_nested_classes_or_defines')
PuppetLint.configuration.send('disable_selector_inside_resource')
PuppetLint.configuration.ignore_paths = ['spec/fixtures/modules/**/*.pp']
task(:default).clear
task :default => [:spec_prep, :spec_standalone, :lint]

View File

@ -343,6 +343,7 @@ class cloud::identity (
$ks_glance_password = $os_params::ks_glance_password,
$ks_glance_public_host = $os_params::ks_glance_public_host,
$ks_glance_public_proto = $os_params::ks_glance_public_proto,
$ks_glance_public_port = $os_params::ks_glance_public_port,
$ks_heat_admin_host = $os_params::ks_heat_admin_host,
$ks_heat_internal_host = $os_params::ks_heat_internal_host,
$ks_heat_password = $os_params::ks_heat_password,

View File

@ -0,0 +1,26 @@
#
# Copyright (C) 2014 eNovance SAS <licensing@enovance.com>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# Swift set_io_scheduler
#
define cloud::object::set_io_scheduler(){
# TODO: Add it on server boot
exec{"/bin/echo deadline > /sys/block/${name}/queue/scheduler":
onlyif => [
"/usr/bin/test '-e /sys/block/${name}/queue/scheduler'",
"/bin/grep -v -F '[deadline]' /sys/block/${name}/queue/scheduler"
],
}
}

View File

@ -15,16 +15,7 @@
#
# Swift Storage node
#
define set_io_scheduler(){
# TODO: Add it on server boot
exec{"/bin/echo deadline > /sys/block/${name}/queue/scheduler":
onlyif => [
"/usr/bin/test '-e /sys/block/${name}/queue/scheduler'",
"/bin/grep -v -F '[deadline]' /sys/block/${name}/queue/scheduler"
],
}
}
import 'set_io_scheduler.pp'
# swift storage
class cloud::object::storage (
@ -95,8 +86,8 @@ allow_versions = on
$object_nodes = flatten([ range('sdc','sdd')])
swift::storage::xfs { $object_nodes: }
swift::storage::xfs { 'sdb': }
set_io_scheduler{'sdb':}
set_io_scheduler{$object_nodes:}
cloud::object::set_io_scheduler {'sdb':}
cloud::object::set_io_scheduler {$object_nodes:}
@@ring_container_device { "${storage_eth}:${container_port}/sdb":
zone => $swift_zone,

View File

@ -68,7 +68,7 @@ class cloud::telemetry::server(
hour => '0',
}
Cron <| title == 'ceilometer-expirer' |> { command => "sleep $(($RANDOM % 86400)) && ${::ceilometer::params::expirer_command}" }
Cron <| title == 'ceilometer-expirer' |> { command => "sleep $((\$RANDOM % 86400)) && ${::ceilometer::params::expirer_command}" }
@@haproxy::balancermember{"${::fqdn}-ceilometer_api":
listening_service => 'ceilometer_api_cluster',