Create ResourceGroup with volumes only if it is required

If volumes_per_node or volumes_size is 0, there is no sense
in creating empty ResourceGroup.

Also remove volumes from one node group in gate to be sure
that sahara correctly handle such case.

Closes-bug: 1494650
Change-Id: Ic592710773b9338f5857e431b0567bc5c87af2bd
This commit is contained in:
Vitaly Gridnev 2015-09-04 17:46:55 +03:00
parent ea993f12c2
commit 2b25dfa07f
2 changed files with 2 additions and 3 deletions

View File

@ -18,8 +18,6 @@ clusters:
node_processes:
- datanode
- jobtracker
volumes_per_node: 2
volumes_size: 1
auto_security_group: true
cluster_template:
name: fake01

View File

@ -310,6 +310,7 @@ class ClusterStack(object):
}
})
if ng.volumes_per_node > 0 and ng.volumes_size > 0:
resources.update(self._serialize_volume(ng))
return resources