Explorar o código

Fix for support multi-cluster heketi's topology

chinacoolhacker %!s(int64=7) %!d(string=hai) anos
pai
achega
95bcc815cf

+ 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 -%}