From e1c5bbd9987d0fdefc918b563339791e71550316 Mon Sep 17 00:00:00 2001 From: Murali Annamneni Date: Tue, 12 Jun 2018 16:57:39 +0100 Subject: [PATCH] Include default_docker_volume_type for magnum.conf To create a magnum cluster, its required to specify 'default_docker_volume_type' with some default value (default cinder volume type). And, it also enables users to select diffferent cinder volume types for their volumes. Change-Id: I50b4c436875e4daac48a14fc1e119136eb5fd844 --- ansible/roles/magnum/defaults/main.yml | 3 +++ ansible/roles/magnum/templates/magnum.conf.j2 | 5 +++++ .../notes/default_docker_volume_type-251636f92cb73aee.yaml | 7 +++++++ 3 files changed, 15 insertions(+) create mode 100644 releasenotes/notes/default_docker_volume_type-251636f92cb73aee.yaml diff --git a/ansible/roles/magnum/defaults/main.yml b/ansible/roles/magnum/defaults/main.yml index ed5e720520..f800b0f373 100644 --- a/ansible/roles/magnum/defaults/main.yml +++ b/ansible/roles/magnum/defaults/main.yml @@ -42,6 +42,9 @@ magnum_database_address: "{{ database_address }}:{{ database_port }}" # Magnum #################### enable_cluster_user_trust: False +# The default cinder volume type to be used for container storage volume in clusters +# that specify the docker-volume-size option. For example gp1, io1 etc +default_docker_volume_type: "" #################### diff --git a/ansible/roles/magnum/templates/magnum.conf.j2 b/ansible/roles/magnum/templates/magnum.conf.j2 index b30ca401bb..699237acb6 100644 --- a/ansible/roles/magnum/templates/magnum.conf.j2 +++ b/ansible/roles/magnum/templates/magnum.conf.j2 @@ -18,6 +18,11 @@ workers = {{ openstack_service_workers }} connection = mysql+pymysql://{{ magnum_database_user }}:{{ magnum_database_password }}@{{ magnum_database_address }}/{{ magnum_database_name }} max_retries = -1 +{% if enable_cinder | bool %} +[cinder] +default_docker_volume_type = {{ default_docker_volume_type }} +{% endif %} + [heat_client] region_name = {{ openstack_region_name }} endpoint_type = internalURL diff --git a/releasenotes/notes/default_docker_volume_type-251636f92cb73aee.yaml b/releasenotes/notes/default_docker_volume_type-251636f92cb73aee.yaml new file mode 100644 index 0000000000..7ee58c7024 --- /dev/null +++ b/releasenotes/notes/default_docker_volume_type-251636f92cb73aee.yaml @@ -0,0 +1,7 @@ +--- +upgrade: + - | + Added default_docker_volume_type for magnum which is required to + specify the default cinder volume type to be used for container + storage volume in clusters that specify the docker-volume-size + option. For example gp1, io1 etc.