summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSwann Croiset <scroiset@mirantis.com>2017-01-20 17:50:59 +0100
committerSwann Croiset <scroiset@mirantis.com>2017-01-23 10:19:58 +0100
commit973c62b04b95bce31fa441bd77477940eb134466 (patch)
tree3f65cab10c9e2a220402d24ee0b918d36d10d639
parente0eb164cf319b6179dc51da93474a00ee920199f (diff)
Fix Cinder local endpoint check
Since Mitaka, Cinder returns 300 instead of 200 in previous releases Change-Id: Ia1e35da330754d5dc21573d3b469cb708ca28d28
Notes
Notes (review): Code-Review+2: Simon Pasquier <spasquier@mirantis.com> Workflow+1: Swann Croiset <scroiset@mirantis.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Mon, 23 Jan 2017 09:22:33 +0000 Reviewed-on: https://review.openstack.org/423372 Project: openstack/fuel-plugin-lma-collector Branch: refs/heads/master
-rw-r--r--deployment_scripts/puppet/manifests/collectd.pp10
1 files changed, 8 insertions, 2 deletions
diff --git a/deployment_scripts/puppet/manifests/collectd.pp b/deployment_scripts/puppet/manifests/collectd.pp
index f1646cb..ae9d0d4 100644
--- a/deployment_scripts/puppet/manifests/collectd.pp
+++ b/deployment_scripts/puppet/manifests/collectd.pp
@@ -17,6 +17,7 @@ notice('fuel-plugin-lma-collector: collectd.pp')
17if hiera('lma::collector::influxdb::server', false) { 17if hiera('lma::collector::influxdb::server', false) {
18 prepare_network_config(hiera_hash('network_scheme', {})) 18 prepare_network_config(hiera_hash('network_scheme', {}))
19 19
20 $fuel_version = 0 + hiera('fuel_version')
20 $management_vip = hiera('management_vip') 21 $management_vip = hiera('management_vip')
21 $mgmt_address = get_network_role_property('management', 'ipaddr') 22 $mgmt_address = get_network_role_property('management', 'ipaddr')
22 $lma_collector = hiera_hash('lma_collector') 23 $lma_collector = hiera_hash('lma_collector')
@@ -119,7 +120,6 @@ if hiera('lma::collector::influxdb::server', false) {
119 } 120 }
120 # Deal with detach-* plugins 121 # Deal with detach-* plugins
121 if $is_mysql_server { 122 if $is_mysql_server {
122 $fuel_version = 0 + hiera('fuel_version')
123 if $fuel_version < 9.0 { 123 if $fuel_version < 9.0 {
124 $mysql_resource_name = 'p_mysql' 124 $mysql_resource_name = 'p_mysql'
125 } else { 125 } else {
@@ -251,6 +251,12 @@ if hiera('lma::collector::influxdb::server', false) {
251 $neutron_api = get_network_role_property('neutron/api', 'ipaddr') 251 $neutron_api = get_network_role_property('neutron/api', 'ipaddr')
252 $nova_api = get_network_role_property('nova/api', 'ipaddr') 252 $nova_api = get_network_role_property('nova/api', 'ipaddr')
253 $swift_api = get_network_role_property('swift/api', 'ipaddr') 253 $swift_api = get_network_role_property('swift/api', 'ipaddr')
254 if $fuel_version < 9.0 {
255 $cinder_expected_code = 200
256 } else {
257 # Since Mitaka, Cinder returns 300 instead of 200 in previous releases
258 $cinder_expected_code = 300
259 }
254 class { 'lma_collector::collectd::check_local_endpoint': 260 class { 'lma_collector::collectd::check_local_endpoint':
255 urls => { 261 urls => {
256 'cinder-api' => "http://${cinder_api}:8776", 262 'cinder-api' => "http://${cinder_api}:8776",
@@ -263,7 +269,7 @@ if hiera('lma::collector::influxdb::server', false) {
263 'swift-api' => "http://${swift_api}:8080/info", 269 'swift-api' => "http://${swift_api}:8080/info",
264 }, 270 },
265 expected_codes => { 271 expected_codes => {
266 'cinder-api' => 300, 272 'cinder-api' => $cinder_expected_code,
267 'glance-api' => 300, 273 'glance-api' => 300,
268 'heat-api' => 300, 274 'heat-api' => 300,
269 'heat-cfn-api' => 300, 275 'heat-cfn-api' => 300,