diff --git a/CHANGELOG.md b/CHANGELOG.md index c994176..ea9d0b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ This file is used to list changes made in each version of cookbook-openstack-object-storage. +## 8.0.1 +* Bugfix ring_script.rb to handle recent swift-ring-builder + output with replication information + ## 8.0.0 ### New version * Upgrade to upstream Havana release diff --git a/metadata.rb b/metadata.rb index 317b6d5..53f4b72 100644 --- a/metadata.rb +++ b/metadata.rb @@ -3,7 +3,7 @@ maintainer 'ATT, Inc.' license 'Apache 2.0' description 'Installs and configures Openstack Swift' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) -version '8.0.0' +version '8.0.1' recipe 'openstack-object-storage::setup', 'Does initial setup of a swift cluster' recipe 'openstack-object-storage::account-server', 'Installs the swift account server' recipe 'openstack-object-storage::object-server', 'Installs the swift object server' diff --git a/providers/ring_script.rb b/providers/ring_script.rb index 31810e6..05e9251 100644 --- a/providers/ring_script.rb +++ b/providers/ring_script.rb @@ -194,6 +194,23 @@ def parse_ring_output(ring_data) next elsif line =~ /^Devices:\s+id\s+zone\s+/ next + elsif line =~ /^\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+\.\d+\.\d+\.\d+)\s+(\d+)\s+(\d+\.\d+\.\d+\.\d+)\s+(\d+)\s+(\S+)\s+([0-9.]+)\s+(\d+)\s+([-0-9.]+)\s*$/ + output[:hosts] ||= {} + output[:hosts][$4] ||= {} + + output[:hosts][$4][$8] ||= {} + + output[:hosts][$4][$8][:id] = $1 + output[:hosts][$4][$8][:region] = $2 + output[:hosts][$4][$8][:zone] = $3 + output[:hosts][$4][$8][:ip] = $4 + output[:hosts][$4][$8][:port] = $5 + output[:hosts][$4][$8][:replication_ip] = $6 + output[:hosts][$4][$8][:replication_port] = $7 + output[:hosts][$4][$8][:device] = $8 + output[:hosts][$4][$8][:weight] = $9 + output[:hosts][$4][$8][:partitions] = $10 + output[:hosts][$4][$8][:balance] = $11 elsif line =~ /^\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+\.\d+\.\d+\.\d+)\s+(\d+)\s+(\S+)\s+([0-9.]+)\s+(\d+)\s+([-0-9.]+)\s*$/ output[:hosts] ||= {} output[:hosts][$4] ||= {}