From 527e22fc0e0547b3a30bcd63b36c8b4b03df5866 Mon Sep 17 00:00:00 2001 From: "Kyle L. Henderson" Date: Thu, 8 Sep 2016 14:24:01 -0500 Subject: [PATCH] Correct Magnum issues found in AIO testing Move cinder_service_region to group_vars/all.yml since os_magnum relies on it. Remove CRLFs from magnum_all.yml. Set _rabbit_mq_host_group, it's required on the rabbitmq task. Use magnum_galera_database_name for the db_name instead of magnum_galera_database. Change the magnum haproxy config to use GET for httpchk since mangum API doesn't appear to support the HEAD request. Using HEAD results in haproxy NOSRV errors with the backend. Change-Id: I1562f8418e5075720ba8622262f4f13cf2d35fb6 --- playbooks/inventory/group_vars/all.yml | 1 + playbooks/inventory/group_vars/cinder_all.yml | 1 - playbooks/inventory/group_vars/magnum_all.yml | 55 ++++++++++--------- playbooks/os-magnum-install.yml | 5 +- playbooks/vars/configs/haproxy_config.yml | 2 +- 5 files changed, 33 insertions(+), 31 deletions(-) mode change 100755 => 100644 playbooks/inventory/group_vars/magnum_all.yml diff --git a/playbooks/inventory/group_vars/all.yml b/playbooks/inventory/group_vars/all.yml index c7240b1275..cd7cd6b617 100644 --- a/playbooks/inventory/group_vars/all.yml +++ b/playbooks/inventory/group_vars/all.yml @@ -129,6 +129,7 @@ ceilometer_rabbitmq_host_group: "{{ rabbitmq_host_group }}" ## Cinder +cinder_service_region: "{{ service_region }}" # If there are Swift hosts in the environment, then enable cinder backups to it cinder_service_backup_program_enabled: "{{ groups['swift_all'] is defined and groups['swift_all'] | length > 0 }}" # cinder_backend_rbd_inuse: True if current host has an rbd backend diff --git a/playbooks/inventory/group_vars/cinder_all.yml b/playbooks/inventory/group_vars/cinder_all.yml index 2fb8ca7be8..b9e64f1c23 100644 --- a/playbooks/inventory/group_vars/cinder_all.yml +++ b/playbooks/inventory/group_vars/cinder_all.yml @@ -20,7 +20,6 @@ glance_default_store: "{{ ((groups['swift_all'] is defined) and (groups['swift_a # cinder_backend_lvm_inuse: True if current host has an lvm backend cinder_backend_lvm_inuse: '{{ (cinder_backends|default("")|to_json).find("cinder.volume.drivers.lvm.LVMVolumeDriver") != -1 }}' -cinder_service_region: "{{ service_region }}" cinder_service_in_ldap: "{{ service_ldap_backend_enabled }}" cinder_glance_api_servers: "{{ glance_api_servers }}" cinder_glance_api_version: "{{ (cinder_backends_rbd_inuse|bool and glance_default_store == 'rbd') | ternary('2','1') }}" diff --git a/playbooks/inventory/group_vars/magnum_all.yml b/playbooks/inventory/group_vars/magnum_all.yml old mode 100755 new mode 100644 index 5b24e68904..fffa6a758e --- a/playbooks/inventory/group_vars/magnum_all.yml +++ b/playbooks/inventory/group_vars/magnum_all.yml @@ -1,27 +1,28 @@ ---- -# Copyright 2016 Internet Solutions (Pty) Ltd -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -magnum_galera_user: magnum -magnum_galera_database_name: magnum_service -magnum_galera_address: "{{ galera_address }}" - -magnum_rabbitmq_userid: magnum -magnum_rabbitmq_vhost: /magnum -magnum_rabbitmq_port: "{{ rabbitmq_port }}" -magnum_rabbitmq_servers: "{{ rabbitmq_servers }}" -magnum_rabbitmq_use_ssl: "{{ rabbitmq_use_ssl }}" - -# Ensure that the package state matches the global setting -magnum_package_state: "{{ package_state }}" +--- +# Copyright 2016 Internet Solutions (Pty) Ltd +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +magnum_galera_user: magnum +magnum_galera_database_name: magnum_service +magnum_galera_address: "{{ galera_address }}" + +magnum_rabbitmq_userid: magnum +magnum_rabbitmq_vhost: /magnum +magnum_rabbitmq_port: "{{ rabbitmq_port }}" +magnum_rabbitmq_servers: "{{ rabbitmq_servers }}" +magnum_rabbitmq_host_group: "{{ rabbitmq_host_group }}" +magnum_rabbitmq_use_ssl: "{{ rabbitmq_use_ssl }}" + +# Ensure that the package state matches the global setting +magnum_package_state: "{{ package_state }}" diff --git a/playbooks/os-magnum-install.yml b/playbooks/os-magnum-install.yml index ef6cccfddf..f323c4ea90 100644 --- a/playbooks/os-magnum-install.yml +++ b/playbooks/os-magnum-install.yml @@ -35,15 +35,16 @@ user: "{{ magnum_rabbitmq_userid }}" password: "{{ magnum_rabbitmq_password }}" vhost: "{{ magnum_rabbitmq_vhost }}" + _rabbitmq_host_group: "{{ magnum_rabbitmq_host_group }}" when: - inventory_hostname == groups['magnum_all'][0] - - groups['rabbitmq_all'] | length > 0 + - groups[magnum_rabbitmq_host_group] | length > 0 - include: common-tasks/mysql-db-user.yml vars: user_name: "{{ magnum_galera_user }}" password: "{{ magnum_galera_password }}" login_host: "{{ magnum_galera_address }}" - db_name: "{{ magnum_galera_database }}" + db_name: "{{ magnum_galera_database_name }}" when: inventory_hostname == groups['magnum_all'][0] roles: - role: "os_magnum" diff --git a/playbooks/vars/configs/haproxy_config.yml b/playbooks/vars/configs/haproxy_config.yml index 394a03b34b..d52b30af27 100644 --- a/playbooks/vars/configs/haproxy_config.yml +++ b/playbooks/vars/configs/haproxy_config.yml @@ -251,4 +251,4 @@ haproxy_default_services: haproxy_port: 9511 haproxy_balance_type: http haproxy_backend_options: - - "httpchk HEAD /" + - "httpchk GET /"