Skip to content

Commit

Permalink
It is better to check for the existence of minimum diskGB variable in…
Browse files Browse the repository at this point in the history
… exit provisioning in pre check.

Closes-Bug: 1460757

Change-Id: I43d2014a1fdd7466cf29f34315f4398ceb15b831
  • Loading branch information
cijohnson committed Jun 1, 2015
1 parent b38a6f2 commit c82e470
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
9 changes: 8 additions & 1 deletion fabfile/tasks/helpers.py
Expand Up @@ -1110,11 +1110,18 @@ def delete_cassandra_db_files():
@task
@roles('build')
def pre_check():
db = getattr(testbed, 'minimum_diskGB', None)
if not db:
print "\nERROR: Minimum disk space for analytics db is not set in testbed.py"
print "\tPlease set 'minimum_diskGB' in testbed.py and continue."
print "\tSpecifiy the avalilable disk space of database node in GB"
print "\tRecommended to use a database node with 256GB disk."
exit(1)
database_nodes = deepcopy(env.roledefs['database'])
if (len(database_nodes) % 2) != 1:
print "\nERROR: \n\tRecommended to deploy odd number of zookeeper(database) nodes."
print "\tAdd/remove a node to/from the existing clusters testbed.py and continue."
exit(0)
exit(1)
execute('verify_time_all')
if len(env.roledefs['openstack']) > 1 and not get_openstack_internal_vip():
print "\nERROR: \n\tkeystone_ip(VIP) needs to be set in testbed.py for HA, when more than one openstack node is defined."
Expand Down
1 change: 1 addition & 0 deletions fabfile/tasks/upgrade.py
Expand Up @@ -198,6 +198,7 @@ def upgrade_vcenter():
def upgrade_contrail(from_rel, pkg, orch='yes'):
"""Upgrades all the contrail pkgs in all nodes.
"""
execute('pre_check')
execute('install_pkg_all', pkg)
execute('stop_cfgm')
execute('stop_rabbitmq')
Expand Down

0 comments on commit c82e470

Please sign in to comment.