[object/storage] Fix module layout
This commit is contained in:
26
manifests/object/set_io_scheduler.pp
Normal file
26
manifests/object/set_io_scheduler.pp
Normal 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"
|
||||||
|
],
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -15,16 +15,7 @@
|
|||||||
#
|
#
|
||||||
# Swift Storage node
|
# Swift Storage node
|
||||||
#
|
#
|
||||||
|
import 'set_io_scheduler.pp'
|
||||||
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"
|
|
||||||
],
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# swift storage
|
# swift storage
|
||||||
class cloud::object::storage (
|
class cloud::object::storage (
|
||||||
@@ -95,8 +86,8 @@ allow_versions = on
|
|||||||
$object_nodes = flatten([ range('sdc','sdd')])
|
$object_nodes = flatten([ range('sdc','sdd')])
|
||||||
swift::storage::xfs { $object_nodes: }
|
swift::storage::xfs { $object_nodes: }
|
||||||
swift::storage::xfs { 'sdb': }
|
swift::storage::xfs { 'sdb': }
|
||||||
set_io_scheduler{'sdb':}
|
cloud::object::set_io_scheduler {'sdb':}
|
||||||
set_io_scheduler{$object_nodes:}
|
cloud::object::set_io_scheduler {$object_nodes:}
|
||||||
|
|
||||||
@@ring_container_device { "${storage_eth}:${container_port}/sdb":
|
@@ring_container_device { "${storage_eth}:${container_port}/sdb":
|
||||||
zone => $swift_zone,
|
zone => $swift_zone,
|
||||||
|
|||||||
Reference in New Issue
Block a user