diff options
author | William R. Otte <wotte@dre.vanderbilt.edu> | 2011-10-13 22:39:18 +0000 |
---|---|---|
committer | William R. Otte <wotte@dre.vanderbilt.edu> | 2011-10-13 22:39:18 +0000 |
commit | d460ed12a7f9e6fbb75d994781f8a1313adc6256 (patch) | |
tree | 6a98c5e9151e0186caac6dab1ae69aa3c2c8b4a4 | |
parent | 0690d20010c3b20b90adbe8953337c99a6aa9663 (diff) | |
download | ATCD-d460ed12a7f9e6fbb75d994781f8a1313adc6256.tar.gz |
Thu Oct 13 22:38:44 UTC 2011 William R. Otte <wotte@dre.vanderbilt.edu>
* dance/Plan_Launcher/Plan_Launcher.cpp:
* tests/Plan_Launcher/NM-Delay/NodeMap.cdd:
* tests/Plan_Launcher/NM-Delay/run_test.pl:
* tools/Domain_Validator/CORBA/CORBA_Domain_Validator_impl.cpp:
Added capability for the domain validator to check the liveness of the
ExecutionManager.
-rw-r--r-- | DAnCE/ChangeLog | 10 | ||||
-rw-r--r-- | DAnCE/dance/Plan_Launcher/Plan_Launcher.cpp | 169 | ||||
-rwxr-xr-x | DAnCE/tests/Plan_Launcher/NM-Delay/NodeMap.cdd | 22 | ||||
-rwxr-xr-x | DAnCE/tests/Plan_Launcher/NM-Delay/run_test.pl | 4 | ||||
-rw-r--r-- | DAnCE/tools/Domain_Validator/CORBA/CORBA_Domain_Validator_impl.cpp | 5 |
5 files changed, 132 insertions, 78 deletions
diff --git a/DAnCE/ChangeLog b/DAnCE/ChangeLog index 6e6fa373f45..bbabdb2b355 100644 --- a/DAnCE/ChangeLog +++ b/DAnCE/ChangeLog @@ -1,3 +1,13 @@ +Thu Oct 13 22:38:44 UTC 2011 William R. Otte <wotte@dre.vanderbilt.edu> + + * dance/Plan_Launcher/Plan_Launcher.cpp: + * tests/Plan_Launcher/NM-Delay/NodeMap.cdd: + * tests/Plan_Launcher/NM-Delay/run_test.pl: + * tools/Domain_Validator/CORBA/CORBA_Domain_Validator_impl.cpp: + + Added capability for the domain validator to check the liveness of the + ExecutionManager. + Thu Oct 13 22:25:39 UTC 2011 William R. Otte <wotte@dre.vanderbilt.edu> * tests/Plan_Launcher/NM-Delay: diff --git a/DAnCE/dance/Plan_Launcher/Plan_Launcher.cpp b/DAnCE/dance/Plan_Launcher/Plan_Launcher.cpp index 533ad371dad..d4ab078fb63 100644 --- a/DAnCE/dance/Plan_Launcher/Plan_Launcher.cpp +++ b/DAnCE/dance/Plan_Launcher/Plan_Launcher.cpp @@ -49,7 +49,8 @@ namespace mode_ (LAUNCH), force_ (false), quiet_ (false), - em_timeout_ (1) + em_timeout_ (1), + domain_timeout_ (0) {} const ACE_TCHAR *em_ior_; @@ -67,6 +68,7 @@ namespace bool force_; bool quiet_; int em_timeout_; + int domain_timeout_; }; } @@ -314,9 +316,7 @@ parse_args(int argc, ACE_TCHAR *argv[], Options &options) break; } if ((ACE_OS::strcmp (get_opt.long_option (), - ACE_TEXT ("manager-timeout")) == 0) || - (ACE_OS::strcmp (get_opt.long_option (), - ACE_TEXT ("domain-timeout")) == 0)) + ACE_TEXT ("manager-timeout")) == 0)) { DANCE_DEBUG (DANCE_LOG_MAJOR_DEBUG_INFO, (LM_DEBUG, DLINFO @@ -326,6 +326,17 @@ parse_args(int argc, ACE_TCHAR *argv[], Options &options) options.em_timeout_ = ACE_OS::atoi (get_opt.opt_arg ()); break; } + if ((ACE_OS::strcmp (get_opt.long_option (), + ACE_TEXT ("domain-timeout")) == 0)) + { + DANCE_DEBUG (DANCE_LOG_MAJOR_DEBUG_INFO, + (LM_DEBUG, DLINFO + ACE_TEXT ("Plan_Launcher::parse_args - ") + ACE_TEXT ("Got Manager Timeout value: %C\n"), + get_opt.opt_arg ())); + options.domain_timeout_ = ACE_OS::atoi (get_opt.opt_arg ()); + break; + } default: usage (argv[0]); @@ -802,6 +813,84 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) auto_ptr<DAnCE::Plan_Launcher_Base> pl_base (0); + + Deployment::DeploymentPlan_var dp; + + DANCE_DEBUG (DANCE_LOG_MAJOR_EVENT, + (LM_DEBUG, DLINFO ACE_TEXT ("Plan_Launcher - ") + ACE_TEXT ("Parsing deployment plan\n"))); + if (options.cdr_plan_) + { + dp = DAnCE::Convert_Plan::read_cdr_plan (options.cdr_plan_); + if (!dp.ptr ()) + { + if (!options.quiet_) + { + DANCE_ERROR (DANCE_LOG_EMERGENCY, (LM_ERROR, DLINFO + ACE_TEXT ("PlanLauncher - ") + ACE_TEXT ("Error: Unable to read ") + ACE_TEXT ("in CDR plan\n"))); + } + return 1; + } + } + else if (options.xml_plan_) + { + dp = DAnCE::Convert_Plan::read_xml_plan (options.xml_plan_); + + if (!dp.ptr ()) + { + if (!options.quiet_) + { + DANCE_ERROR (DANCE_LOG_EMERGENCY, (LM_ERROR, DLINFO + ACE_TEXT ("PlanLauncher - Error: ") + ACE_TEXT ("Unable to read in XML plan\n"))); + } + return 1; + } + } + + if (options.domain_file_) + { + ::DAnCE::Config_Handlers::XML_File_Intf file (options.domain_file_); + file.add_search_path (ACE_TEXT ("DANCE_ROOT"), ACE_TEXT ("/docs/schema/")); + ::Deployment::Domain *plan = file.release_domain (); + + if (!plan) + { + DANCE_ERROR (DANCE_LOG_ERROR, + (LM_ERROR, DLINFO + ACE_TEXT("PlanLauncher - Error - ") + ACE_TEXT("Error: Processing file <%C>\n"), options.domain_file_)); + return false; + } + + DAnCE_Domain_Validator_i validator (orb); + validator.load_domain (*plan); + + ::DAnCE::Time_Value tv; + tv.seconds (options.domain_timeout_); + CORBA::StringSeq_var late_nodes; + + if (!validator.block_for_domain (tv, late_nodes.out ())) + { + DANCE_ERROR (DANCE_LOG_EMERGENCY, + (LM_ERROR, DLINFO + ACE_TEXT ("PlanLauncher - Error: ") + ACE_TEXT ("Not all nodes in domain ready\n"))); + + for (CORBA::ULong i = 0; i < late_nodes->length (); ++i) + { + DANCE_ERROR (DANCE_LOG_EMERGENCY, + (LM_ERROR, DLINFO + ACE_TEXT ("PlanLauncher - Error: ") + ACE_TEXT ("Node <%C> is not started\n"), + late_nodes[i].in ())); + } + return 1; + } + } + ACE_Time_Value timeout (ACE_OS::gettimeofday () + ACE_Time_Value (options.em_timeout_)); if (options.em_ior_) @@ -889,78 +978,6 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[]) } - Deployment::DeploymentPlan_var dp; - - DANCE_DEBUG (DANCE_LOG_MAJOR_EVENT, - (LM_DEBUG, DLINFO ACE_TEXT ("Plan_Launcher - ") - ACE_TEXT ("Parsing deployment plan\n"))); - if (options.cdr_plan_) - { - dp = DAnCE::Convert_Plan::read_cdr_plan (options.cdr_plan_); - if (!dp.ptr ()) - { - if (!options.quiet_) - { - DANCE_ERROR (DANCE_LOG_EMERGENCY, (LM_ERROR, DLINFO - ACE_TEXT ("PlanLauncher - ") - ACE_TEXT ("Error: Unable to read ") - ACE_TEXT ("in CDR plan\n"))); - } - return 1; - } - } - else if (options.xml_plan_) - { - dp = DAnCE::Convert_Plan::read_xml_plan (options.xml_plan_); - - if (!dp.ptr ()) - { - if (!options.quiet_) - { - DANCE_ERROR (DANCE_LOG_EMERGENCY, (LM_ERROR, DLINFO - ACE_TEXT ("PlanLauncher - Error: ") - ACE_TEXT ("Unable to read in XML plan\n"))); - } - return 1; - } - } - - if (options.domain_file_) - { - ::DAnCE::Config_Handlers::XML_File_Intf file (options.domain_file_); - file.add_search_path (ACE_TEXT ("DANCE_ROOT"), ACE_TEXT ("/docs/schema/")); - ::Deployment::Domain *plan = file.release_domain (); - - if (!plan) - { - DANCE_ERROR (DANCE_LOG_ERROR, - (LM_ERROR, DLINFO - ACE_TEXT("PlanLauncher - Error - ") - ACE_TEXT("Error: Processing file <%C>\n"), options.domain_file_)); - return false; - } - - DAnCE_Domain_Validator_i validator (orb); - validator.load_domain (*plan); - - ACE_Time_Value remaining_time (timeout - ACE_OS::gettimeofday ()); - ACE_UINT64 usec; - timeout.to_usec (usec); - - ::DAnCE::Time_Value tv; - tv.seconds (options.em_timeout_); - CORBA::StringSeq_var late_nodes; - - if (!validator.block_for_domain (tv, late_nodes.out ())) - { - DANCE_ERROR (DANCE_LOG_EMERGENCY, - (LM_ERROR, DLINFO - ACE_TEXT ("PlanLauncher - Error: ") - ACE_TEXT ("Not all nodes in domain ready\n"))); - return 1; - } - } - switch (options.mode_) { diff --git a/DAnCE/tests/Plan_Launcher/NM-Delay/NodeMap.cdd b/DAnCE/tests/Plan_Launcher/NM-Delay/NodeMap.cdd index 61d182f8524..399658d524a 100755 --- a/DAnCE/tests/Plan_Launcher/NM-Delay/NodeMap.cdd +++ b/DAnCE/tests/Plan_Launcher/NM-Delay/NodeMap.cdd @@ -6,6 +6,28 @@ <label/> <node> + <name>ExecutionManager</name> + <label/> + <resource> + <name>Node Address</name> + <resourceType>edu.vanderbilt.dre.DAnCE.NodeAddress</resourceType> + <property> + <name>edu.vanderbilt.dre.DAnCE.StringIOR</name> + <kind>Attribute</kind> + <dynamic>false</dynamic> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>corbaloc:iiop:localhost:60006</string> + </value> + </value> + </property> + </resource> + </node> + + <node> <name>LocalityOne</name> <label/> <resource> diff --git a/DAnCE/tests/Plan_Launcher/NM-Delay/run_test.pl b/DAnCE/tests/Plan_Launcher/NM-Delay/run_test.pl index 9de8cf21534..dd430a2923a 100755 --- a/DAnCE/tests/Plan_Launcher/NM-Delay/run_test.pl +++ b/DAnCE/tests/Plan_Launcher/NM-Delay/run_test.pl @@ -168,7 +168,7 @@ print "Invoking executor - launch the application -\n"; print "Start dance_plan_launcher.exe with -x $cdp_file -k file://$ior_emfile\n"; $E = $tg_executor->CreateProcess ("$DANCE_ROOT/bin/dance_plan_launcher", - "-x $cdp_file --em-ior file://$ior_emfile --manager-timeout 20 --domain-file NodeMap.cdd"); + "-x $cdp_file --em-ior file://$ior_emfile --domain-timeout 20 --domain-file NodeMap.cdd"); $pl_status = $E->Spawn (); @@ -185,7 +185,7 @@ sleep 3; # Invoke execution manager. print "Invoking execution manager (dance_execution_manager.exe) with -e$ior_emfile\n"; $EM = $tg_exe_man->CreateProcess ("$DANCE_ROOT/bin/dance_execution_manager", - "-e$ior_emfile --domain-nc corbaloc:rir:/NameService"); + "-e$ior_emfile --domain-nc corbaloc:rir:/NameService -ORBEndpoint iiop://localhost:60006"); $em_status = $EM->Spawn (); print "Sleeping 3 seconds to ensure that PL properly waits on NM reference.\n"; diff --git a/DAnCE/tools/Domain_Validator/CORBA/CORBA_Domain_Validator_impl.cpp b/DAnCE/tools/Domain_Validator/CORBA/CORBA_Domain_Validator_impl.cpp index 240b738a3a5..6edd7e53242 100644 --- a/DAnCE/tools/Domain_Validator/CORBA/CORBA_Domain_Validator_impl.cpp +++ b/DAnCE/tools/Domain_Validator/CORBA/CORBA_Domain_Validator_impl.cpp @@ -100,6 +100,11 @@ DAnCE_Domain_Validator_i::create_node_table (void) ior += domain_->node[i].name; ior += ".NodeManager"; } + else + { + ior += "/"; + ior += "ExecutionManager"; + } DANCE_DEBUG (DANCE_LOG_MAJOR_DEBUG_INFO, (LM_INFO, DLINFO ACE_TEXT("Node_Locator::process_cdd - ") |