Skip to content

Commit

Permalink
Closes-Bug: #1476792
Browse files Browse the repository at this point in the history
Contrail HA SM : Provisioning of single openstack node and 3 config node
is failing

Issue:
For contrail-ha alone,keepalived was not getting executed,
as sequencing logic did not consider it.

Fix:
Added a separate sequence steps for contral-ha

Change-Id: Iea725bb2d6e2407e72a8dbd19a6afcffcdd0fd1e
  • Loading branch information
thilakrajs committed Dec 14, 2015
1 parent 40cc11c commit f4eb180
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/role_sequence.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,17 @@
[["webui"], "p"],
[["compute"], "p"]]
},
"default_contrail_ha": {
"role_sequence": [[["keepalived"], "p"],
[["haproxy"], "p"],
[["database"], "p"],
[["openstack"], "p"],
[["config"], "p"],
[["control"], "p"],
[["collector"], "p"],
[["webui"], "p"],
[["compute"], "p"]]
},
"cluster": [
{
"id": "scale3",
Expand Down
12 changes: 12 additions & 0 deletions src/server_mgr_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,12 @@ class VncServerManager():
(['post_exec_vnc_galera'], 's'),
(['config'], 'p'), (['control'], 'p'),
(['collector'], 'p'), (['webui'], 'p')]

_role_step_sequence_contrail_ha = [(['keepalived'], 'p'), (['haproxy'], 'p'),
(['database'], 'p'), (['openstack'], 'p'),
(['config'], 'p'), (['control'], 'p'),
(['collector'], 'p'), (['webui'], 'p')]

#_role_sequence = [(['database', 'openstack', 'config', 'control', 'collector', 'webui'], 'p')]
#_role_sequence = [(['database', 'openstack', 'config', 'control', 'collector', 'webui'], 's')]
_compute_roles = ['compute', 'tsn', 'toragent','storage-compute', 'storage-master']
Expand Down Expand Up @@ -3295,8 +3301,12 @@ def get_role_sequence(self, cluster):
return []
cluster_id = cluster['id']
ha = self.is_cluster_ha(cluster)

contrail_ha = self.is_cluster_contrail_ha(cluster)
if ha:
default_role_sequence = self._role_step_sequence_ha
elif contrail_ha:
default_role_sequence = self._role_step_sequence_contrail_ha
else:
default_role_sequence = self._role_sequence
try:
Expand All @@ -3320,6 +3330,8 @@ def get_role_sequence(self, cluster):
if not cluster_role_sequence:
if ha:
default_sequence = role_sequence_data.get('default_ha', {})
elif contrail_ha:
default_sequence = role_sequence_data.get('default_contrail_ha', {})
else:
default_sequence = role_sequence_data.get('default', {})
cluster_role_sequence = default_sequence.get('role_sequence', [])
Expand Down

0 comments on commit f4eb180

Please sign in to comment.