diff --git a/fabfile/tasks/helpers.py b/fabfile/tasks/helpers.py index 9d5b9336e..d99696ced 100644 --- a/fabfile/tasks/helpers.py +++ b/fabfile/tasks/helpers.py @@ -1139,11 +1139,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." diff --git a/fabfile/tasks/upgrade.py b/fabfile/tasks/upgrade.py index 4bce35e3d..5e5e7f7e8 100644 --- a/fabfile/tasks/upgrade.py +++ b/fabfile/tasks/upgrade.py @@ -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')