Fix for ensurability of ceph

* Update for swift/radosgw haproxy backend, give possibility
  to switch between them
* Add supposrt for dropping ephemeral backend if needed

Change-Id: I8f49223ed5432e95c3d3cf2e169dc63d750ebfc9
Related-Blueprint: granular-task-idempotency
This commit is contained in:
Oleksiy Molchanov 2016-03-03 11:52:24 +02:00
parent 6ca916acd9
commit 038ab3861e
8 changed files with 32 additions and 20 deletions

View File

@ -52,7 +52,7 @@ class openstack::ha::radosgw (
},
}
openstack::ha::haproxy_service { 'radosgw':
openstack::ha::haproxy_service { 'object-storage':
order => '130',
public => true,
public_ssl => $public_ssl,
@ -60,7 +60,7 @@ class openstack::ha::radosgw (
}
if $baremetal_virtual_ip {
openstack::ha::haproxy_service { 'radosgw-baremetal':
openstack::ha::haproxy_service { 'object-storage-baremetal':
order => '135',
public_virtual_ip => false,
internal_virtual_ip => $baremetal_virtual_ip,

View File

@ -88,8 +88,8 @@ class openstack::ha::swift (
balancermember_options => $balancermember_options,
}
openstack::ha::haproxy_service { 'swift':
order => '120',
openstack::ha::haproxy_service { 'object-storage':
order => '130',
public => true,
public_ssl => $public_ssl,
public_ssl_path => $public_ssl_path,
@ -98,8 +98,8 @@ class openstack::ha::swift (
}
if $baremetal_virtual_ip {
openstack::ha::haproxy_service { 'swift-baremetal':
order => '125',
openstack::ha::haproxy_service { 'object-storage-baremetal':
order => '135',
public_virtual_ip => false,
internal_virtual_ip => $baremetal_virtual_ip,
}

View File

@ -29,7 +29,7 @@ require 'spec_helper'
end
it "should properly configure radosgw haproxy based on ssl" do
should contain_openstack__ha__haproxy_service('radosgw').with(
should contain_openstack__ha__haproxy_service('object-storage').with(
'order' => '130',
'listen_port' => 8080,
'balancermember_port' => 6780,
@ -41,7 +41,7 @@ require 'spec_helper'
end
it "should properly configure radosgw haproxy on baremetal VIP" do
should contain_openstack__ha__haproxy_service('radosgw-baremetal').with(
should contain_openstack__ha__haproxy_service('object-storage-baremetal').with(
'order' => '135',
'listen_port' => 8080,
'balancermember_port' => 6780,

View File

@ -43,8 +43,8 @@ require 'spec_helper'
end
it "should properly configure swift haproxy based on ssl" do
should contain_openstack__ha__haproxy_service('swift').with(
'order' => '120',
should contain_openstack__ha__haproxy_service('object-storage').with(
'order' => '130',
'listen_port' => 8080,
'public' => true,
'public_ssl' => true,
@ -55,8 +55,8 @@ require 'spec_helper'
end
it "should properly configure swift haproxy on baremetal VIP" do
should contain_openstack__ha__haproxy_service('swift-baremetal').with(
'order' => '125',
should contain_openstack__ha__haproxy_service('object-storage-baremetal').with(
'order' => '135',
'listen_port' => 8080,
'public_ssl' => false,
'internal_virtual_ip' => '192.168.0.2',
@ -76,8 +76,8 @@ require 'spec_helper'
end
it "should properly configure swift haproxy" do
should contain_openstack__ha__haproxy_service('swift').with(
'order' => '120',
should contain_openstack__ha__haproxy_service('object-storage').with(
'order' => '130',
'listen_port' => 8080,
'public' => true,
'public_ssl' => false,

View File

@ -96,4 +96,11 @@ if $use_ceph {
cwd => '/root',
}
}
if !($storage_hash['ephemeral_ceph']) {
class { 'ceph::ephemeral':
libvirt_images_type => 'absent',
}
}

View File

@ -36,6 +36,11 @@ describe manifest do
it { should_not contain_class('ceph') }
end
if !(storage_hash['ephemeral_ceph'])
it { should contain_class('ceph::ephemeral').with(
'libvirt_images_type' => 'absent',)
}
end
end
test_ubuntu_and_centos manifest
end

View File

@ -38,7 +38,7 @@ describe manifest do
it "should properly configure radosgw haproxy based on ssl" do
public_ssl_radosgw = Noop.hiera_structure('public_ssl/services', false)
should contain_openstack__ha__haproxy_service('radosgw').with(
should contain_openstack__ha__haproxy_service('object-storage').with(
'order' => '130',
'ipaddresses' => ipaddresses,
'server_names' => server_names,
@ -55,7 +55,7 @@ describe manifest do
end
it 'should declare openstack::ha::haproxy_service with name radosgw-baremetal' do
should contain_openstack__ha__haproxy_service('radosgw-baremetal').with(
should contain_openstack__ha__haproxy_service('object-storage-baremetal').with(
'order' => '135',
'ipaddresses' => ipaddresses,
'server_names' => server_names,

View File

@ -50,8 +50,8 @@ describe manifest do
it "should properly configure swift haproxy based on ssl" do
public_ssl_swift = Noop.hiera_structure('public_ssl/services', false)
should contain_openstack__ha__haproxy_service('swift').with(
'order' => '120',
should contain_openstack__ha__haproxy_service('object-storage').with(
'order' => '130',
'listen_port' => 8080,
'public' => true,
'public_ssl' => public_ssl_swift,
@ -71,8 +71,8 @@ describe manifest do
end
it 'should declare openstack::ha::haproxy_service with name swift-baremetal' do
should contain_openstack__ha__haproxy_service('swift-baremetal').with(
'order' => '125',
should contain_openstack__ha__haproxy_service('object-storage-baremetal').with(
'order' => '135',
'listen_port' => 8080,
'public_virtual_ip' => false,
'internal_virtual_ip' => baremetal_virtual_ip,