diff --git a/CHANGELOG.md b/CHANGELOG.md index 0168bd3..f8124a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,12 @@ rs-mysql Cookbook CHANGELOG This file is used to list changes made in each version of the rs-mysql cookbook. +v1.1.8 +------ + +- Updated lvm cookbook dependency version to 1.3.6. +- Set default filesystem on RHEL 7 platform_family to xfs. + v1.1.7 ------ diff --git a/attributes/volume.rb b/attributes/volume.rb index 07838ad..6bea194 100644 --- a/attributes/volume.rb +++ b/attributes/volume.rb @@ -48,7 +48,9 @@ default['rs-mysql']['device']['controller_type'] = nil # The filesystem to be used on the device -default['rs-mysql']['device']['filesystem'] = 'ext4' +# RHEL 7 and CentOS 7 uses XFS as their default file system. +default['rs-mysql']['device']['filesystem'] = + node['platform_family'] == 'rhel' && node['platform_version'] =~ /^7\./ ? 'xfs' : 'ext4' # Amount of time (in seconds) to wait for a volume to detach at decommission default['rs-mysql']['device']['detach_timeout'] = 300 @@ -56,9 +58,10 @@ # Whether to destroy volume(s) on decommission default['rs-mysql']['device']['destroy_on_decommission'] = false -# The additional options/flags to use for the `mkfs` command. If the whole device is formatted, the force (-F) flag -# can be used (on ext4 filesystem) to force the operation. This flag may vary based on the filesystem type. -default['rs-mysql']['device']['mkfs_options'] = '-F' +# The additional options/flags to use for the `mkfs` command. If the whole device is formatted, the force flag +# can be used to force the operation. This flag varies based on the filesystem type. +default['rs-mysql']['device']['mkfs_options'] = + node['rs-mysql']['device']['filesystem'] == 'xfs' ? '-f' : '-F' # The stripe size to use while creating LVM default['rs-mysql']['device']['stripe_size'] = 512 diff --git a/metadata.rb b/metadata.rb index 72e330b..ef2e6da 100644 --- a/metadata.rb +++ b/metadata.rb @@ -4,7 +4,7 @@ license 'Apache 2.0' description 'Installs and configures a MySQL server' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) -version '1.1.7' +version '1.1.8' depends 'chef_handler', '~> 1.1.6' depends 'marker', '~> 1.0.1' @@ -12,10 +12,10 @@ depends 'mysql', '~> 4.0.18' depends 'collectd', '~> 1.1.0' depends 'rightscale_tag', '~> 1.0.2' -depends 'filesystem', '~> 0.9.0' -depends 'lvm', '~> 1.1.0' -depends 'rightscale_volume', '~> 1.2.4' -depends 'rightscale_backup', '~> 1.1.5' +depends 'filesystem', '~> 0.10.0' +depends 'lvm', '~> 1.3.6' +depends 'rightscale_volume', '~> 1.2.7' +depends 'rightscale_backup', '~> 1.1.8' depends 'dns', '~> 0.1.3' depends 'git', '~> 4.0.2' @@ -108,7 +108,9 @@ attribute 'rs-mysql/device/nickname', :display_name => 'Device Nickname', - :description => 'Nickname for the device. Example: data_storage', + :description => 'Nickname for the device. rs-mysql::volume uses this for the filesystem label, which is' + + ' restricted to 12 characters. If longer than 12 characters, the filesystem label will be set to the' + + ' first 12 characters. Example: data_storage', :default => 'data_storage', :recipes => ['rs-mysql::volume', 'rs-mysql::stripe', 'rs-mysql::decommission'], :required => 'recommended' @@ -135,8 +137,8 @@ attribute 'rs-mysql/device/filesystem', :display_name => 'Device Filesystem', - :description => 'The filesystem to be used on the device. Example: ext4', - :default => 'ext4', + :description => 'The filesystem to be used on the device. Defaults are based on OS and determined in' + + ' attributes/volume.rb. Example: ext4', :recipes => ['rs-mysql::volume', 'rs-mysql::stripe'], :required => 'optional' diff --git a/recipes/volume.rb b/recipes/volume.rb index 236cd62..972351a 100644 --- a/recipes/volume.rb +++ b/recipes/volume.rb @@ -48,7 +48,9 @@ action [:create, :attach] end + # Filesystem label must be <= 12 chars filesystem device_nickname do + label device_nickname[0,12] fstype node['rs-mysql']['device']['filesystem'] device lazy { node['rightscale_volume'][device_nickname]['device'] } mkfs_options node['rs-mysql']['device']['mkfs_options']