From c86b5f0d4acd24a097de4377b947551eb189106b Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Wed, 17 Jan 2018 11:15:34 +0000 Subject: [PATCH 1/3] Ensure virtualenv parent directory exists for kolla and kolla-ansible --- ansible/roles/kolla-ansible/tasks/install.yml | 9 +++++++++ ansible/roles/kolla/tasks/install.yml | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/ansible/roles/kolla-ansible/tasks/install.yml b/ansible/roles/kolla-ansible/tasks/install.yml index a15704b50..59bdaf2b2 100644 --- a/ansible/roles/kolla-ansible/tasks/install.yml +++ b/ansible/roles/kolla-ansible/tasks/install.yml @@ -32,6 +32,15 @@ version: "{{ kolla_ansible_source_version }}" when: kolla_ansible_ctl_install_type == 'source' +- name: Ensure virtualenv parent directory exists + file: + path: "{{ kolla_ansible_venv | dirname }}" + state: directory + owner: "{{ ansible_user_id }}" + group: "{{ ansible_user_id }}" + become: True + when: kolla_ansible_venv is not none + - name: Ensure the latest version of pip is installed pip: name: "{{ item.name }}" diff --git a/ansible/roles/kolla/tasks/install.yml b/ansible/roles/kolla/tasks/install.yml index 6f2d5eac8..c33836f6d 100644 --- a/ansible/roles/kolla/tasks/install.yml +++ b/ansible/roles/kolla/tasks/install.yml @@ -34,6 +34,15 @@ version: "{{ kolla_source_version }}" when: kolla_ctl_install_type == 'source' +- name: Ensure virtualenv parent directory exists + file: + path: "{{ kolla_venv | dirname }}" + state: directory + owner: "{{ ansible_user_id }}" + group: "{{ ansible_user_id }}" + become: True + when: kolla_venv is not none + - name: Ensure the latest version of pip is installed pip: name: "{{ item.name }}" From 1993301e34d1565e41f4eca350c6e7ccb300a6e3 Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Wed, 17 Jan 2018 11:15:58 +0000 Subject: [PATCH 2/3] Use ansible_user_id instead of ansible_user --- ansible/roles/kolla/tasks/config.yml | 4 ++-- ansible/roles/kolla/tasks/install.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ansible/roles/kolla/tasks/config.yml b/ansible/roles/kolla/tasks/config.yml index 2b5620593..1bb8b2a24 100644 --- a/ansible/roles/kolla/tasks/config.yml +++ b/ansible/roles/kolla/tasks/config.yml @@ -3,8 +3,8 @@ file: path: "{{ item }}" state: directory - owner: "{{ ansible_user }}" - group: "{{ ansible_user }}" + owner: "{{ ansible_user_id }}" + group: "{{ ansible_user_id }}" mode: 0750 become: True with_items: diff --git a/ansible/roles/kolla/tasks/install.yml b/ansible/roles/kolla/tasks/install.yml index c33836f6d..8095c786d 100644 --- a/ansible/roles/kolla/tasks/install.yml +++ b/ansible/roles/kolla/tasks/install.yml @@ -22,8 +22,8 @@ file: path: "{{ kolla_source_path | dirname }}" state: directory - owner: "{{ ansible_user }}" - group: "{{ ansible_user }}" + owner: "{{ ansible_user_id }}" + group: "{{ ansible_user_id }}" become: True when: kolla_ctl_install_type == 'source' From b32d9e404f838df131ed472734eab53169b5cb1c Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Tue, 30 Jan 2018 19:02:17 +0000 Subject: [PATCH 3/3] Add configuration for ironic enable and default rescue interfaces The rescue interface was added in the Queens release. --- ansible/group_vars/all/ironic | 9 +++++++++ ansible/roles/kolla-openstack/defaults/main.yml | 7 +++++++ ansible/roles/kolla-openstack/templates/ironic.conf.j2 | 2 +- etc/kayobe/ironic.yml | 7 +++++++ 4 files changed, 24 insertions(+), 1 deletion(-) diff --git a/ansible/group_vars/all/ironic b/ansible/group_vars/all/ironic index 64f791267..643c85d38 100644 --- a/ansible/group_vars/all/ironic +++ b/ansible/group_vars/all/ironic @@ -82,6 +82,15 @@ kolla_ironic_enabled_raid_interfaces: # raid_interface field set. kolla_ironic_default_raid_interface: no-raid +# Specify the list of rescue interfaces to load during service initialization. +kolla_ironic_enabled_rescue_interfaces: + - agent + - no-rescue + +# Default rescue interface to be used for nodes that do not have +# rescue_interface field set. +kolla_ironic_default_rescue_interface: no-rescue + # Specify the list of storage interfaces to load during # service initialization. #kolla_ironic_enabled_storage_interfaces: diff --git a/ansible/roles/kolla-openstack/defaults/main.yml b/ansible/roles/kolla-openstack/defaults/main.yml index 7989ce4ae..2b3a9909f 100644 --- a/ansible/roles/kolla-openstack/defaults/main.yml +++ b/ansible/roles/kolla-openstack/defaults/main.yml @@ -124,6 +124,13 @@ kolla_ironic_enabled_raid_interfaces: [] # raid_interface field set. kolla_ironic_default_raid_interface: +# Specify the list of rescue interfaces to load during service initialization. +kolla_ironic_enabled_rescue_interfaces: [] + +# Default rescue interface to be used for nodes that do not have +# rescue_interface field set. +kolla_ironic_default_rescue_interface: + # Specify the list of storage interfaces to load during # service initialization. kolla_ironic_enabled_storage_interfaces: [] diff --git a/ansible/roles/kolla-openstack/templates/ironic.conf.j2 b/ansible/roles/kolla-openstack/templates/ironic.conf.j2 index 0994215dd..03e9310e9 100644 --- a/ansible/roles/kolla-openstack/templates/ironic.conf.j2 +++ b/ansible/roles/kolla-openstack/templates/ironic.conf.j2 @@ -9,7 +9,7 @@ enabled_hardware_types: {{ kolla_ironic_enabled_hardware_types | join(',') }} {# Add configuration of enabled and default dynamic driver interfaces. #} {% set interfaces=['boot', 'console', 'deploy', 'inspect', 'management', - 'network', 'power', 'raid', 'storage', 'vendor'] %} + 'network', 'power', 'raid', 'rescue', 'storage', 'vendor'] %} {% for interface in interfaces %} {% if hostvars[inventory_hostname]['kolla_ironic_enabled_' ~ interface ~ '_interfaces'] | default %} {{ 'enabled_' ~ interface ~ '_interfaces' }} = {{ hostvars[inventory_hostname]['kolla_ironic_enabled_' ~ interface ~ '_interfaces'] | join(',') }} diff --git a/etc/kayobe/ironic.yml b/etc/kayobe/ironic.yml index 59f1d3e37..0ee05b6cc 100644 --- a/etc/kayobe/ironic.yml +++ b/etc/kayobe/ironic.yml @@ -65,6 +65,13 @@ # raid_interface field set. #kolla_ironic_default_raid_interface: +# Specify the list of rescue interfaces to load during service initialization. +#kolla_ironic_enabled_rescue_interfaces: + +# Default rescue interface to be used for nodes that do not have +# rescue_interface field set. +#kolla_ironic_default_rescue_interface: + # Specify the list of storage interfaces to load during # service initialization. #kolla_ironic_enabled_storage_interfaces: