Skip to content

Commit

Permalink
Merge "we need to check nova version to decide whether or not to inst…
Browse files Browse the repository at this point in the history
…all mongodb in database node and hence need to use /opt/contrail/contrail_install_repo rpm to check the same.." into R2.20
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed May 22, 2015
2 parents 0cc03a0 + 830b16a commit 5a7617f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion fabfile/utils/fabos.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ def get_release(pkg='contrail-install-packages', use_install_repo=False):
dist = detect_ostype()
print "Dist is %s" % dist
if dist in ['centos', 'fedora', 'redhat', 'centoslinux']:
cmd = "rpm -q --queryformat '%%{VERSION}' %s" %pkg
if use_install_repo:
cmd = "rpm -qp --queryformat '%%{VERSION}' /opt/contrail/contrail_install_repo/%s*.rpm 2> /dev/null" %pkg
else:
cmd = "rpm -q --queryformat '%%{VERSION}' %s" %pkg
elif dist in ['ubuntu']:
if use_install_repo:
cmd = "dpkg --info /opt/contrail/contrail_install_repo/%s*.deb | grep Version: | cut -d' ' -f3 | cut -d'-' -f1" %pkg
Expand Down

0 comments on commit 5a7617f

Please sign in to comment.