Browse Source

Merge pull request #7163 from chinacoolhacker/master

Fix for support multi-cluster heketi's topology
Michael Gugino 7 years ago
parent
commit
5b21e30c32

+ 1 - 1
roles/openshift_storage_glusterfs/templates/v1.5/topology.json.j2

@@ -2,7 +2,7 @@
   "clusters": [
 {%- set clusters = {} -%}
 {%- for node in glusterfs_nodes -%}
-  {%- set cluster = hostvars[node].glusterfs_cluster if 'glusterfs_cluster' in node else '1' -%}
+  {%- set cluster = hostvars[node].glusterfs_cluster if 'glusterfs_cluster' in hostvars[node] else '1' -%}
   {%- if cluster in clusters -%}
     {%- set _dummy = clusters[cluster].append(node) -%}
   {%- else -%}

+ 1 - 1
roles/openshift_storage_glusterfs/templates/v3.10/topology.json.j2

@@ -2,7 +2,7 @@
   "clusters": [
 {%- set clusters = {} -%}
 {%- for node in glusterfs_nodes -%}
-  {%- set cluster = hostvars[node].glusterfs_cluster if 'glusterfs_cluster' in node else '1' -%}
+  {%- set cluster = hostvars[node].glusterfs_cluster if 'glusterfs_cluster' in hostvars[node] else '1' -%}
   {%- if cluster in clusters -%}
     {%- set _dummy = clusters[cluster].append(node) -%}
   {%- else -%}

+ 1 - 1
roles/openshift_storage_glusterfs/templates/v3.6/topology.json.j2

@@ -2,7 +2,7 @@
   "clusters": [
 {%- set clusters = {} -%}
 {%- for node in glusterfs_nodes -%}
-  {%- set cluster = hostvars[node].glusterfs_cluster if 'glusterfs_cluster' in node else '1' -%}
+  {%- set cluster = hostvars[node].glusterfs_cluster if 'glusterfs_cluster' in hostvars[node] else '1' -%}
   {%- if cluster in clusters -%}
     {%- set _dummy = clusters[cluster].append(node) -%}
   {%- else -%}

+ 1 - 1
roles/openshift_storage_glusterfs/templates/v3.7/topology.json.j2

@@ -2,7 +2,7 @@
   "clusters": [
 {%- set clusters = {} -%}
 {%- for node in glusterfs_nodes -%}
-  {%- set cluster = hostvars[node].glusterfs_cluster if 'glusterfs_cluster' in node else '1' -%}
+  {%- set cluster = hostvars[node].glusterfs_cluster if 'glusterfs_cluster' in hostvars[node] else '1' -%}
   {%- if cluster in clusters -%}
     {%- set _dummy = clusters[cluster].append(node) -%}
   {%- else -%}

+ 1 - 1
roles/openshift_storage_glusterfs/templates/v3.8/topology.json.j2

@@ -2,7 +2,7 @@
   "clusters": [
 {%- set clusters = {} -%}
 {%- for node in glusterfs_nodes -%}
-  {%- set cluster = hostvars[node].glusterfs_cluster if 'glusterfs_cluster' in node else '1' -%}
+  {%- set cluster = hostvars[node].glusterfs_cluster if 'glusterfs_cluster' in hostvars[node] else '1' -%}
   {%- if cluster in clusters -%}
     {%- set _dummy = clusters[cluster].append(node) -%}
   {%- else -%}

+ 1 - 1
roles/openshift_storage_glusterfs/templates/v3.9/topology.json.j2

@@ -2,7 +2,7 @@
   "clusters": [
 {%- set clusters = {} -%}
 {%- for node in glusterfs_nodes -%}
-  {%- set cluster = hostvars[node].glusterfs_cluster if 'glusterfs_cluster' in node else '1' -%}
+  {%- set cluster = hostvars[node].glusterfs_cluster if 'glusterfs_cluster' in hostvars[node] else '1' -%}
   {%- if cluster in clusters -%}
     {%- set _dummy = clusters[cluster].append(node) -%}
   {%- else -%}