Skip to content

Commit

Permalink
Merge "Skip creating rabbitmq.config for Single node setup in Redhat7…
Browse files Browse the repository at this point in the history
…0 based setups" into R2.0
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Dec 6, 2014
2 parents 0388b1c + da5ac40 commit 40b9f4e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion fabfile/tasks/rabbitmq.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ def rabbitmq_env():
def config_rabbitmq():
rabbit_hosts = []
rabbit_conf = '/etc/rabbitmq/rabbitmq.config'
if len(env.roledefs['rabbit']) <= 1 and detect_ostype() == 'redhat':
print "CONFIG_RABBITMQ: Skip creating rabbitmq.config for Single node setup"
return
for host_string in env.roledefs['rabbit']:
with settings(host_string=host_string, password=env.passwords[host_string]):
host_name = run('hostname -s') + ctrl
Expand Down Expand Up @@ -237,7 +240,9 @@ def verify_cluster_status(retry='yes'):
rabbit_nodes = []
for host_string in env.roledefs['rabbit']:
with settings(host_string=host_string):
if not files.exists("/etc/rabbitmq/rabbitmq.config"):
if len(env.roledefs['rabbit']) <= 1 and detect_ostype() == 'redhat':
print "Skip verifying /etc/rabbitmq/rabbitmq.config for Single node setup for redhat"
elif not files.exists("/etc/rabbitmq/rabbitmq.config"):
return False
host_name = run('hostname -s') + ctrl
rabbit_nodes.append('rabbit@%s' % host_name)
Expand Down

0 comments on commit 40b9f4e

Please sign in to comment.