Initial Liberty Changes
Metadata changes - Updated maintainer email - Updated the version rubocop updates Change-Id: I294fc0847c8ab621cc061430029b833fb952984d
This commit is contained in:
committed by
Mark Vanderwiel
parent
7de9297043
commit
0ebc8586e6
@@ -1,10 +1,10 @@
|
|||||||
name 'openstack-object-storage'
|
name 'openstack-object-storage'
|
||||||
maintainer 'openstack-chef'
|
maintainer 'openstack-chef'
|
||||||
maintainer_email 'opscode-chef-openstack@googlegroups.com'
|
maintainer_email 'openstack-dev@lists.openstack.org'
|
||||||
license 'Apache 2.0'
|
license 'Apache 2.0'
|
||||||
description 'Installs and configures Openstack Swift'
|
description 'Installs and configures Openstack Swift'
|
||||||
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
|
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
|
||||||
version '11.0.0'
|
version '12.0.0'
|
||||||
|
|
||||||
recipe 'openstack-object-storage::account-server', 'Installs the swift account server'
|
recipe 'openstack-object-storage::account-server', 'Installs the swift account server'
|
||||||
recipe 'openstack-object-storage::client', 'Install the swift client'
|
recipe 'openstack-object-storage::client', 'Install the swift client'
|
||||||
@@ -20,5 +20,5 @@ end
|
|||||||
|
|
||||||
depends 'memcached', '>= 1.7.2'
|
depends 'memcached', '>= 1.7.2'
|
||||||
depends 'statsd', '>= 0.1.5'
|
depends 'statsd', '>= 0.1.5'
|
||||||
depends 'openstack-common', '>= 11.0.0'
|
depends 'openstack-common', '>= 12.0.0'
|
||||||
depends 'openstack-identity', '>= 11.0.0'
|
depends 'openstack-identity', '>= 12.0.0'
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
require 'chef/mixin/shell_out'
|
require 'chef/mixin/shell_out'
|
||||||
include Chef::Mixin::ShellOut
|
include Chef::Mixin::ShellOut
|
||||||
|
|
||||||
# rubocop:disable CyclomaticComplexity, MethodLength
|
# rubocop:disable MethodLength
|
||||||
def load_current_resource
|
def load_current_resource
|
||||||
dev_name = @new_resource.name
|
dev_name = @new_resource.name
|
||||||
@current = Chef::Resource::OpenstackObjectStorageDisk.new(dev_name)
|
@current = Chef::Resource::OpenstackObjectStorageDisk.new(dev_name)
|
||||||
@@ -173,7 +173,8 @@ action :ensure_exists do
|
|||||||
|
|
||||||
cur_size = cur[idx][:size]
|
cur_size = cur[idx][:size]
|
||||||
|
|
||||||
cur_min, cur_max = (req_size * 0.9), (req_size * 1.1)
|
cur_min = req_size * 0.9
|
||||||
|
cur_max = req_size * 1.1
|
||||||
recreate = true unless (cur_size > cur_min) && (cur_size < cur_max)
|
recreate = true unless (cur_size > cur_min) && (cur_size < cur_max)
|
||||||
|
|
||||||
current_block += cur[idx][:size]
|
current_block += cur[idx][:size]
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ def generate_script # rubocop:disable Metrics/AbcSize
|
|||||||
# figure out what's present in the cluster
|
# figure out what's present in the cluster
|
||||||
disk_data[which] = {}
|
disk_data[which] = {}
|
||||||
role = node['openstack']['object-storage']["#{which}_server_chef_role"]
|
role = node['openstack']['object-storage']["#{which}_server_chef_role"]
|
||||||
disk_state, _, _ = Chef::Search::Query.new.search(:node, "chef_environment:#{node.chef_environment} AND roles:#{role}")
|
disk_state = Chef::Search::Query.new.search(:node, "chef_environment:#{node.chef_environment} AND roles:#{role}")
|
||||||
Chef::Log.info("#{which} node count: #{disk_state.count} for role: #{role}")
|
Chef::Log.info("#{which} node count: #{disk_state.count} for role: #{role}")
|
||||||
|
|
||||||
# for a running track of available disks
|
# for a running track of available disks
|
||||||
@@ -131,7 +131,7 @@ def generate_script # rubocop:disable Metrics/AbcSize
|
|||||||
s << "# #{ip}\n"
|
s << "# #{ip}\n"
|
||||||
disk_data[which][ip].keys.sort.each do |k|
|
disk_data[which][ip].keys.sort.each do |k|
|
||||||
v = disk_data[which][ip][k]
|
v = disk_data[which][ip][k]
|
||||||
s << '# ' + v.keys.sort.select { |x| ['ip', 'device', 'uuid'].include?(x) }.map { |x| v[x] }.join(', ')
|
s << '# ' + v.keys.sort.select { |x| ['ip', 'device', 'uuid'].include?(x) }.map { |x| v[x] }.join(', ')
|
||||||
if new_disks[which].key?(v['mountpoint'])
|
if new_disks[which].key?(v['mountpoint'])
|
||||||
s << ' (NEW!)'
|
s << ' (NEW!)'
|
||||||
new_servers << ip unless new_servers.include?(ip)
|
new_servers << ip unless new_servers.include?(ip)
|
||||||
|
|||||||
Reference in New Issue
Block a user