From c605d6ca2605010ec64987b76989229ee0db1af6 Mon Sep 17 00:00:00 2001 From: Serguei Bezverkhi Date: Thu, 31 Mar 2016 10:40:55 -0400 Subject: [PATCH] Add iscsid/tgtd specific parameters to Kolla infrastructure This partially implements iscsi and lvm2 support for cinder in Kolla. Add integration with Kolla infrastructure. Change-Id: I5b7d59163518080f38aec0c00617440de0763f1d Implements: blueprint iscsi-lvm2-docker --- ansible/group_vars/all.yml | 3 +++ ansible/inventory/all-in-one | 7 +++++++ ansible/roles/prechecks/tasks/port_checks.yml | 16 ++++++++-------- ansible/site.yml | 10 ++++++++++ kolla/common/config.py | 2 +- 5 files changed, 29 insertions(+), 9 deletions(-) diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml index a0ab95a8a9..77855c9d91 100644 --- a/ansible/group_vars/all.yml +++ b/ansible/group_vars/all.yml @@ -79,6 +79,8 @@ tunnel_interface: "{{ network_interface }}" neutron_plugin_agent: "openvswitch" # The default ports used by each service. +iscsi_port: "3260" + mariadb_port: "3306" mariadb_wsrep_port: "4567" mariadb_ist_port: "4568" @@ -182,6 +184,7 @@ enable_horizon: "yes" enable_swift: "no" enable_murano: "no" enable_ironic: "no" +enable_iscsi: "no" enable_magnum: "no" enable_mistral: "no" enable_central_logging: "no" diff --git a/ansible/inventory/all-in-one b/ansible/inventory/all-in-one index 3bf301583f..d8fa29d7af 100644 --- a/ansible/inventory/all-in-one +++ b/ansible/inventory/all-in-one @@ -146,6 +146,13 @@ cinder [cinder-volume:children] storage +# iSCSI +[iscsd:children] +storage + +[tgtd:children] +storage + # Manila [manila-api:children] manila diff --git a/ansible/roles/prechecks/tasks/port_checks.yml b/ansible/roles/prechecks/tasks/port_checks.yml index 6c2ce7cc54..23091df581 100644 --- a/ansible/roles/prechecks/tasks/port_checks.yml +++ b/ansible/roles/prechecks/tasks/port_checks.yml @@ -119,14 +119,6 @@ state: stopped when: inventory_hostname in groups['haproxy'] -- name: Checking free port for iSCSI Target - wait_for: - host: "{{ hostvars[inventory_hostname]['ansible_' + storage_interface]['ipv4']['address'] }}" - port: "3260" - connect_timeout: 1 - state: stopped - when: inventory_hostname in groups['cinder-volume'] - - name: Checking free port for Keystone Admin wait_for: host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}" @@ -159,6 +151,14 @@ state: stopped when: inventory_hostname in groups['haproxy'] +- name: Checking free port for iscsi + wait_for: + host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}" + port: "{{ iscsi_port }}" + connect_timeout: 1 + state: stopped + when: inventory_hostname in groups['tgtd'] + - name: Checking free port for MariaDB wait_for: host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}" diff --git a/ansible/site.yml b/ansible/site.yml index ed66ece4ae..ba28e461d7 100644 --- a/ansible/site.yml +++ b/ansible/site.yml @@ -20,6 +20,8 @@ - haproxy - keystone - mariadb + - iscsid + - tgtd - murano-api - neutron-server - nova-api @@ -50,6 +52,14 @@ tags: mariadb, when: enable_mariadb | bool } +- hosts: + - iscsid + - tgtd + roles: + - { role: iscsi, + tags: iscsi, + when: enable_iscsi | bool } + - hosts: rabbitmq roles: - { role: rabbitmq, diff --git a/kolla/common/config.py b/kolla/common/config.py index b9ab56b3ed..33c0a1b31e 100644 --- a/kolla/common/config.py +++ b/kolla/common/config.py @@ -31,7 +31,7 @@ _PROFILE_OPTS = [ help='Infra images'), cfg.ListOpt('main', default=['cinder', 'ceilometer', 'glance', 'heat', - 'horizon', 'keystone', 'neutron', 'nova', + 'horizon', 'iscsi', 'keystone', 'neutron', 'nova', 'swift'], help='Main images'), cfg.ListOpt('aux',