Skip to content

Commit f30287e

Browse files
authored
Merge pull request #303 from gluster-deploy/2.0.1
Fix the add-node feature in NFS Ganesha
2 parents 043d844 + 26e3e6a commit f30287e

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

gdeployfeatures/nfs_ganesha/nfs_ganesha.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ def nfs_ganesha_destroy_cluster(section_dict):
3232
return section_dict, defaults.GANESHA_DISABLE
3333

3434
def nfs_ganesha_add_node(section_dict):
35-
new_nodes = section_dict.get('nodes')
35+
new_nodes = helpers.listify(section_dict.get('nodes'))
36+
helpers.write_to_inventory('cluster_nodes', new_nodes)
3637
vips, vip_list = get_host_vips(section_dict, new_nodes)
3738
data = []
3839
for node, vip in zip(new_nodes, vips):
@@ -43,7 +44,7 @@ def nfs_ganesha_add_node(section_dict):
4344
section_dict['nodes_list'] = data
4445
section_dict = get_base_dir(section_dict)
4546
return section_dict, [defaults.GANESHA_BOOTSTRAP,
46-
defaults.GANESHA_ADD_NODE]
47+
defaults.GANESHA_ADD_NODE]
4748

4849
def nfs_ganesha_delete_node(section_dict):
4950
section_dict = get_base_dir(section_dict)
@@ -103,7 +104,7 @@ def get_cluster_nodes(section_dict):
103104
return cluster_nodes
104105

105106
def get_host_vips(section_dict, cluster):
106-
VIPs = section_dict.get('vip')
107+
VIPs = helpers.listify(section_dict.get('vip'))
107108
if len(cluster) != len(VIPs):
108109
print "\nError: The number of cluster_nodes provided and VIP "\
109110
"given doesn't match. Exiting!"

playbooks/ganesha-cluster-add.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
- hosts: master_node
2+
- hosts: master
33
remote_user: root
44
gather_facts: no
55

playbooks/ganesha-cluster-delete.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
- hosts: master_node
2+
- hosts: master
33
remote_user: root
44
gather_facts: no
55

0 commit comments

Comments
 (0)