Change the type of mounts fact to array
With this change no need to parse string and use split() in the fuel-library manifests. Change-Id: If775d1097e9b1ff6d8f85af878693e876082a1f3 Depends-On: Ib70ae937165ddb2968c9e4346434f18778b31714 Closes-bug: 1500825 Related-bug: 1500414
This commit is contained in:
parent
62756e42ab
commit
16f46f9430
|
@ -1,6 +1,6 @@
|
|||
#
|
||||
# This fact returns the currently mounted ext{2,3,4}, xfs or btrfs disks as a
|
||||
# comma seperate list.
|
||||
# This fact returns the currently mounted ext{2,3,4}, xfs or btrfs disks as an
|
||||
# array
|
||||
#
|
||||
|
||||
mounts = []
|
||||
|
@ -19,7 +19,7 @@ end
|
|||
|
||||
Facter.add(:mounts) do
|
||||
setcode do
|
||||
mounts.join(",")
|
||||
mounts
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -6,13 +6,13 @@ class osnailyfacter::cluster::health {
|
|||
fail('The node role is not in corosync roles')
|
||||
}
|
||||
|
||||
# load the mounted filesystems from our custom fact, remove boot
|
||||
$mount_points = delete(split($::mounts, ','), ['/boot', '/var/lib/horizon'])
|
||||
# load the mounted filesystems from our custom fact and remove not needed
|
||||
$mount_points = delete($::mounts, ['/boot', '/var/lib/horizon'])
|
||||
|
||||
$disks = hiera('corosync_disks', $mount_points)
|
||||
$min_disk_free = hiera('corosync_min_disk_space', '512M')
|
||||
$disk_unit = hiera('corosync_disk_unit', 'M')
|
||||
$monitor_interval = hiera('corosync_disk_monitor_interval', '15s')
|
||||
$disks = hiera('corosync_disks', $mount_points)
|
||||
$min_disk_free = hiera('corosync_min_disk_space', '512M')
|
||||
$disk_unit = hiera('corosync_disk_unit', 'M')
|
||||
$monitor_interval = hiera('corosync_disk_monitor_interval', '15s')
|
||||
|
||||
class { '::cluster::sysinfo':
|
||||
disks => $disks,
|
||||
|
|
|
@ -54,7 +54,7 @@ class osnailyfacter::database::database {
|
|||
|
||||
if $enabled {
|
||||
|
||||
if '/var/lib/mysql' in split($::mounts, ',') {
|
||||
if '/var/lib/mysql' in $::mounts {
|
||||
$ignore_db_dir_options = {
|
||||
'mysqld' => {
|
||||
'ignore-db-dir' => ['lost+found'],
|
||||
|
|
|
@ -6,7 +6,7 @@ describe manifest do
|
|||
shared_examples 'catalog' do
|
||||
let(:facts) {
|
||||
Noop.ubuntu_facts.merge({
|
||||
:mounts => '/,/boot,/var/log,/var/lib/glance,/var/lib/mysql,/var/lib/horizon'
|
||||
:mounts => ['/', '/boot', '/var/log', '/var/lib/glance', '/var/lib/mysql', '/var/lib/horizon']
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ describe manifest do
|
|||
shared_examples 'catalog' do
|
||||
let(:facts) {
|
||||
Noop.ubuntu_facts.merge({
|
||||
:mounts => '/,/boot,/var/log,/var/lib/glance,/var/lib/mysql',
|
||||
:mounts => ['/', '/boot', '/var/log', '/var/lib/glance', '/var/lib/mysql', '/var/lib/horizon'],
|
||||
:root_home => '/root'
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue