Skip to content

Commit

Permalink
Fix verify_database on centos7 and redhat
Browse files Browse the repository at this point in the history
On centos7 and redhat, contrail-database is still a SYSV service and
hence its status needs to be checked by looking at the return code of
service contrail-database status rather than the output since the output
does not contain the word running. Pipe-ing head -n 10 changes the return
code to always return 0. The above was broken due to commit for bug #1638670
commit f378fac which made setup_all work
on xenial. Revert the change to verify_service made in that commit.

Change-Id: If38f781713145d28f8725634685f8f98661bc056
Closes-Bug: #1657934
  • Loading branch information
Megh Bhatt committed Feb 4, 2017
1 parent 8699619 commit fc35a37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fabfile/tasks/verify.py
Expand Up @@ -13,7 +13,7 @@ class OpenStackSetupError(Exception):
def verify_service(service, initd_service=False):
for x in xrange(10):
with settings(warn_only=True):
output = sudo("service %s status | head -10" % service)
output = sudo("service %s status" % service)
if initd_service:
if output.succeeded or re.search('Active:.*active', output):
return
Expand Down

0 comments on commit fc35a37

Please sign in to comment.