# To test the fix configure a CREAM CE with the new blparser. # Don't use it (i.e. do not submit jobs nor issue any other commands). # kill the budater and bnotifier processes. # Wait for 1 minute: you should see that the bupdater and bnotifier have been restarted. import cream_regression, blah_regression, cream_testing import re, time, sys blparser_with_updater_and_notifier = cream_regression.get_yaim_param("BLPARSER_WITH_UPDATER_NOTIFIER") print "blparser_with_updater_and_notifier = " + blparser_with_updater_and_notifier if not blparser_with_updater_and_notifier: print "Changing configuration parameter ... " cream_regression.change_conf_param_in_file("/root/sarab_devel/siteinfo/services/glite-creamce", "BLPARSER_WITH_UPDATER_NOTIFIER", "true") config_file = cream_regression.get_file_from_ce("/etc/blah.config", "/tmp") is_initialized = cream_regression.check_parameter(config_file, "blah_check_children_interval") if is_initialized != "INITIALIZED": print "KO - parameter blah_check_children_interval not initialized in /etc/blah.config" sys.exit() print "Create proxy" cream_testing.create_proxy("sarabINFN","dteam") print "Clear the ce deleting al jobs" cream_testing.cancel_all_jobs("cream-06.pd.infn.it:8443") print "Re-configure the ce" cream_regression.configure_ce_by_yaim("/root/sarab_devel/siteinfo/site-info.def")
cream_regression.exec_remote_command("service tomcat5 stop") now = datetime.datetime.now() suffix = now.strftime("%Y%m%d_%M%S") os.mkdir("/tmp/tmp_" + suffix) local_copy_of_services = cream_regression.get_file_from_ce( "/root/sarab_devel/siteinfo/services/glite-creamce", "/tmp/tmp_" + suffix) print "Saving services file on a local copy _save" cream_regression.exec_local_command("cp " + local_copy_of_services + " " + local_copy_of_services + "_save") # Reconfigure the CE with a different value of CREAM_SANDBOX_PATH print "Changing configuration parameter ... " cream_regression.change_conf_param_in_file( "/root/sarab_devel/siteinfo/services/glite-creamce", "CREAM_SANDBOX_PATH", "/tmp/cream_sanbox_x") print "Reconfiguring cream ce ... " cream_regression.run_yaim_func("/root/sarab_devel/siteinfo/site-info.def", "config_cream_ce") # Get db username and password print "Get db username and password from CE" db_usr_name, db_usr_pass = cream_regression.get_cream_db_user_password_from_config( ) # Try, with the JobDBAdminPurger.sh script, to purge the submitted job print "Running jobDBAdminPurger.sh ... " cream_job_name = cream_regression.get_job_label_from_jid(cream_job_id) print cream_job_name
#cream_concurrency_level_old = 50 Save a local copy of services now = datetime.datetime.now() suffix = now.strftime("%Y%m%d_%M%S") os.mkdir("/tmp/tmp_" + suffix) local_copy_of_services = cream_regression.get_file_from_ce("/root/siteinfo/services/glite-creamce", "/tmp/tmp_" + suffix) print "Saving services file on a local copy _save" cream_regression.exec_local_command("cp " + local_copy_of_services + " " + local_copy_of_services + "_save") # Reconfigure the CE with a different value of CREAM_CONCURRENCY_LEVEL print "Changing configuration parameter ... " cream_concurrency_level_new = int(cream_concurrency_level_old) + 50 cream_regression.change_conf_param_in_file("/root/siteinfo/services/glite-creamce", "CREAM_CONCURRENCY_LEVEL", str(cream_concurrency_level_new)) print "Re-configure running yaim" cream_regression.configure_ce_by_yaim("/root/siteinfo/site-info.def") #cream_concurrency_level_new = 100 print "Check CREAM_CONCURRENCY_LEVEL in configuration file" local_copy_config_file = cream_regression.get_file_from_ce("/etc/glite-ce-cream/cream-config.xml", "/tmp") #local_copy_config_file = "/tmp/local_copy_of_a_cream_file" print "Conf file = " + local_copy_config_file print "Check if parameter " + regression_vars.cream_concurrency_level + " is correctly set in conf file" config_file_name = regression_vars.ce_cream_xml print "Configuration file where search : " + config_file_name
final_job_status = cream_testing.get_final_status(cream_job_id) print "Final job status = " + final_job_status cream_regression.exec_remote_command("service tomcat5 stop") now = datetime.datetime.now() suffix = now.strftime("%Y%m%d_%M%S") os.mkdir("/tmp/tmp_" + suffix) local_copy_of_services = cream_regression.get_file_from_ce("/root/sarab_devel/siteinfo/services/glite-creamce", "/tmp/tmp_" + suffix) print "Saving services file on a local copy _save" cream_regression.exec_local_command("cp " + local_copy_of_services + " " + local_copy_of_services + "_save") # Reconfigure the CE with a different value of CREAM_SANDBOX_PATH print "Changing configuration parameter ... " cream_regression.change_conf_param_in_file("/root/sarab_devel/siteinfo/services/glite-creamce", "CREAM_SANDBOX_PATH", "/tmp/cream_sanbox_x") print "Reconfiguring cream ce ... " cream_regression.run_yaim_func("/root/sarab_devel/siteinfo/site-info.def", "config_cream_ce") # Get db username and password print "Get db username and password from CE" db_usr_name, db_usr_pass = cream_regression.get_cream_db_user_password_from_config() # Try, with the JobDBAdminPurger.sh script, to purge the submitted job print "Running jobDBAdminPurger.sh ... " cream_job_name = cream_regression.get_job_label_from_jid(cream_job_id) print cream_job_name options = " --jobIds " + cream_job_name + " -s " + final_job_status