Difference: BLAH_guide (7 vs. 8)

Revision 82008-07-08 - MassimoMezzadri

Line: 1 to 1
 

BLAH Introduction

BLAHPD is a light component accepting commands according to the BLAH (Batch Local Ascii Helper) protocol to manage jobs on different Local Resources Management Systems (LRMS).
Line: 529 to 529
  S: RESULTS R: S 2 R: 00001 0
Changed:
<
<
R: 00002 0 R: 00002 0 R: 00002 0 R: 00002 0Note that you are NOT guaranteed that the 'R' will not appear between the dispatching of a command and the return line(s) of that command; the GAHP server only guarantees that the 'R' will not interrupt an in-progress return. The following is also a legal example:
S: ASYNC_MODE_ON
>
>
R: 00002 0 R: 00002 0 R: 00002 0 R: 00002 0 R: 00002 0 R: 00002 0 R: 00002 0 R: 00002 0 R: 00002 0 R: 00002 0 R: 00002 0 R: 00002 0 R: 00002 0 R: 00002 0 R: 00002 0 R: 00002 0Note that you are NOT guaranteed that the 'R' will not appear between the dispatching of a command and the return line(s) of that command; the GAHP server only guarantees that the 'R' will not interrupt an in-progress return. The following is also a legal example:
S: ASYNC_MODE_ON
  R: S S: BLAH_JOB_CANCEL 00001 123.bbq.mi.infn.it R: S
Line: 555 to 555
 
Changed:
<
<
  • BLAH_JOB_SUBMIT: Submit a job request to a specified queue (specified in the submit classad). This will cause the job to be submitted to the batch system.
    + Request Line: BLAH_JOB_SUBMIT
>
>
  • BLAH_JOB_SUBMIT: Submit a job request to a specified queue (specified in the submit classad). This will cause the job to be submitted to the batch system.
    + Request Line: BLAH_JOB_SUBMIT
 
    • reqid = non-zero integer Request ID
    • submit classad = valid submit description for the job, in string representation. See paragraph 3.0 for a description of the format. Here's a list of supported attributes with a brief description.
      "Cmd"
      Full path of the executable in the local filesystem
Line: 576 to 576
  system (currently "pbs" and "lsf" supported).
+ Return Line:
Changed:
<
<
    • result = the character "S" (no quotes) for successful submission of the request (meaning that the request is now pending), or an "E" for error on the parse of the request or its arguments (e.g. an unrecognized or unsupported command, or for missing or malformed arguments).
      + Result Lines: <result-code _moz-userdefined=""> <error-string _moz-userdefined=""> </error-string></result-code>
>
>
    • result = the character "S" (no quotes) for successful submission of the request (meaning that the request is now pending), or an "E" for error on the parse of the request or its arguments (e.g. an unrecognized or unsupported command, or for missing or malformed arguments).
      + Result Lines: <result-code _moz-userdefined=""> <error-string _moz-userdefined=""> </error-string></result-code>
 
    • reqid = integer Request ID, set to the value specified in the corresponding Request Line.
    • result-code = integer equal to 0 on success, or an error code
Line: 597 to 597
  R: 2 0 No\ error pbs/20051012/2957
Changed:
<
<
  • BLAH_JOB_CANCEL: This function removes an IDLE job request, or kill all processes associated with a RUNNING job, releasing any associated resources.
    + Request Line: BLAH_JOB_CANCEL
>
>
  • BLAH_JOB_CANCEL: This function removes an IDLE job request, or kill all processes associated with a RUNNING job, releasing any associated resources.
    + Request Line: BLAH_JOB_CANCEL
 
    • reqid = non-zero integer Request ID
Changed:
<
<
    • job_local_id = job_local_id (as returned from BLAH_JOB_SUBMIT) of the job to be canceled.
      + Return Line:
    • result = the character "S" (no quotes) for successful submission of the request (meaning that the request is now pending), or an "E" for error on the parse of the request or its arguments (e.g. an unrecognized or unsupported command, or for missing or malformed arguments).
      + Result Line: <result-code _moz-userdefined=""> <error-string _moz-userdefined=""> </error-string></result-code>
>
>
    • job_local_id = job_local_id (as returned from BLAH_JOB_SUBMIT) of the job to be canceled.
      + Return Line:
    • result = the character "S" (no quotes) for successful submission of the request (meaning that the request is now pending), or an "E" for error on the parse of the request or its arguments (e.g. an unrecognized or unsupported command, or for missing or malformed arguments).
      + Result Line: <result-code _moz-userdefined=""> <error-string _moz-userdefined=""> </error-string></result-code>
 
    • reqid = integer Request ID, set to the value specified in the corresponding Request Line.
Line: 621 to 621
 
Changed:
<
<
  • BLAH_JOB_STATUS: Query and report the current status of a submitted job.
    + Request Line: BLAH_JOB_STATUS
>
>
  • BLAH_JOB_STATUS: Query and report the current status of a submitted job.
    + Request Line: BLAH_JOB_STATUS
 
    • reqid = non-zero integer Request ID
Changed:
<
<
    • job_local_id = job_local_id (as returned from BLAH_JOB_SUBMIT) of the job whose status is desired.
      + Return Line:
    • result = the character "S" (no quotes) for successful submission of the request (meaning that the request is now pending), or an "E" for error on the parse of the request or its arguments (e.g. an unrecognized or unsupported command, or for missing or malformed arguments).
      + Result Line: <result-code _moz-userdefined=""> <error-string _moz-userdefined=""> <result-classad _moz-userdefined=""> </result-classad></error-string></result-code>
>
>
    • job_local_id = job_local_id (as returned from BLAH_JOB_SUBMIT) of the job whose status is desired.
      + Return Line:
    • result = the character "S" (no quotes) for successful submission of the request (meaning that the request is now pending), or an "E" for error on the parse of the request or its arguments (e.g. an unrecognized or unsupported command, or for missing or malformed arguments).
      + Result Line: <result-code _moz-userdefined=""> <error-string _moz-userdefined=""> <result-classad _moz-userdefined=""> </result-classad></error-string></result-code>
 
    • reqid = integer Request ID, set to the value specified in the corresponding Request Line.
    • result-code = integer equal to 0 on success, or an error code
    • error-string = description of error
Line: 662 to 662
  \ JobStatus\ =\ 2;\ WorkerNode\ =\ "\ grid001.mi.infn.it"\ ]
Changed:
<
<
  • BLAH_JOB_STATUS_ALL: This command is only available if the BLAH local job registry file is configured in the BLAH config file (job_registry attribute) and supported by the active batch system. Query and report the current status of all jobs managed by the BLAH server.
    + Request Line: BLAH_JOB_STATUS_ALL
    reqid = non-zero integer Request ID
    + Return Line:
    result = the character "S" (no quotes) for successful submission of the request (meaning that the request is now pending), or an "E" for error on the parse of the request or its arguments (e.g. an unrecognized or unsupported command, or for missing or malformed arguments).
    + Result Line: <result-code _moz-userdefined=""> <error-string _moz-userdefined=""> <result-classad _moz-userdefined=""> </result-classad></error-string></result-code>
>
>
  • BLAH_JOB_STATUS_ALL: This command is only available if the BLAH local job registry file is configured in the BLAH config file (job_registry attribute) and supported by the active batch system. Query and report the current status of all jobs managed by the BLAH server.
    + Request Line: BLAH_JOB_STATUS_ALL
    reqid = non-zero integer Request ID
    + Return Line:
    result = the character "S" (no quotes) for successful submission of the request (meaning that the request is now pending), or an "E" for error on the parse of the request or its arguments (e.g. an unrecognized or unsupported command, or for missing or malformed arguments).
    + Result Line: <result-code _moz-userdefined=""> <error-string _moz-userdefined=""> <result-classad _moz-userdefined=""> </result-classad></error-string></result-code>
 
    • reqid = integer Request ID, set to the value specified in the corresponding Request Line.
    • result-code = integer equal to 0 on success, or an error code
    • error-string = description of error
Line: 671 to 671
 
      • CreateTime: Seconds since the Unix epoch at the time the first job info was inserted into the cache.
      • ModifiedTime: Seconds since the Unix epoch when the most recent modification of the job info occurred.
Changed:
<
<
  • BLAH_JOB_STATUS_SELECT: This command is only available if the BLAH local job registry file is configured in the BLAH config file (job_registry attribute) and supported by the active batch system. Query and report the current status of all jobs managed by the BLAH server.
    + Request Line: BLAH_JOB_STATUS_SELECT
    reqid = non-zero integer Request ID
    selection expression = Classad expression defining select requirements on the returned job ads (e.g.: JobStatus ==2).
    + Return Line:
    result = the character "S" (no quotes) for successful submission of the request (meaning that the request is now pending), or an "E" for error on the parse of the request or its arguments (e.g. an unrecognized or unsupported command, or for missing or malformed arguments).
    + Result Line: <result-code _moz-userdefined=""> <error-string _moz-userdefined=""> <result-classad _moz-userdefined=""> </result-classad></error-string></result-code>
>
>
  • BLAH_JOB_STATUS_SELECT: This command is only available if the BLAH local job registry file is configured in the BLAH config file (job_registry attribute) and supported by the active batch system. Query and report the current status of all jobs managed by the BLAH server.
    + Request Line: BLAH_JOB_STATUS_SELECT
    reqid = non-zero integer Request ID
    selection expression = Classad expression defining select requirements on the returned job ads (e.g.: JobStatus ==2).
    + Return Line:
    result = the character "S" (no quotes) for successful submission of the request (meaning that the request is now pending), or an "E" for error on the parse of the request or its arguments (e.g. an unrecognized or unsupported command, or for missing or malformed arguments).
    + Result Line: <result-code _moz-userdefined=""> <error-string _moz-userdefined=""> <result-classad _moz-userdefined=""> </result-classad></error-string></result-code>
 
    • reqid = integer Request ID, set to the value specified in the corresponding Request Line.
    • result-code = integer equal to 0 on success, or an error code
    • error-string = description of error
    • result-classad = List of classads containing aggregate information about the status of the jobs that satisfy the selection requirement. The format is the same as for the BLAH_JOB_STATUS_ALL command.
Changed:
<
<
  • BLAH_JOB_SIGNAL: Send a signal (if possible) to a specified job. This has to be in the RUNNING status.
    + Request Line: BLAH_JOB_SIGNAL
    reqid = non-zero integer Request ID
    job_local_id = job_local_id (as returned from BLAH_JOB_SUBMIT) of the job whose status is desired.
    signal = an integer with the signal to send
    + Return Line:
    result = the character "S" (no quotes) for successful submission of the request (meaning that the request is now pending), or an "E" for error on the parse of the request or its arguments (e.g. an unrecognized or unsupported command, or for missing or malformed arguments).
    + Result Line: <result-code _moz-userdefined=""> <error-string _moz-userdefined=""> </error-string></result-code>
>
>
  • BLAH_JOB_SIGNAL: Send a signal (if possible) to a specified job. This has to be in the RUNNING status.
    + Request Line: BLAH_JOB_SIGNAL
    reqid = non-zero integer Request ID
    job_local_id = job_local_id (as returned from BLAH_JOB_SUBMIT) of the job whose status is desired.
    signal = an integer with the signal to send
    + Return Line:
    result = the character "S" (no quotes) for successful submission of the request (meaning that the request is now pending), or an "E" for error on the parse of the request or its arguments (e.g. an unrecognized or unsupported command, or for missing or malformed arguments).
    + Result Line: <result-code _moz-userdefined=""> <error-string _moz-userdefined=""> </error-string></result-code>
 
    • reqid = integer Request ID, set to the value specified in the corresponding Request Line.
    • result-code = integer equal to 0 on success, or an error code
    • error-string = description of error
Line: 688 to 688
 
      • 4. COMPLETED
      • 5. HELD
Changed:
<
<
  • BLAH_JOB_REFRESH_PROXY: Renew the proxy of an already submitted job. The job has to be in IDLE, RUNNING or HELD status.
    + Request Line: BLAH_JOB_REFRESH_PROXY
    reqid = non-zero integer Request ID
    job_local_id = job_local_id (as returned from BLAH_JOB_SUBMIT) of the job whose proxy has to be renewed.
    proxy_file = path to the fresh proxy file.
    + Return Line:
    result = the character "S" (no quotes) for successful submission of the request (meaning that the request is now pending), or an "E" for error on the parse of the request or its arguments (e.g. an unrecognized or unsupported command, or for missing or malformed arguments).
    + Result Line: <result-code _moz-userdefined=""> <error-string _moz-userdefined=""> </error-string></result-code>
>
>
  • BLAH_JOB_REFRESH_PROXY: Renew the proxy of an already submitted job. The job has to be in IDLE, RUNNING or HELD status.
    + Request Line: BLAH_JOB_REFRESH_PROXY
    reqid = non-zero integer Request ID
    job_local_id = job_local_id (as returned from BLAH_JOB_SUBMIT) of the job whose proxy has to be renewed.
    proxy_file = path to the fresh proxy file.
    + Return Line:
    result = the character "S" (no quotes) for successful submission of the request (meaning that the request is now pending), or an "E" for error on the parse of the request or its arguments (e.g. an unrecognized or unsupported command, or for missing or malformed arguments).
    + Result Line: <result-code _moz-userdefined=""> <error-string _moz-userdefined=""> </error-string></result-code>
 
    • reqid = integer Request ID, set to the value specified in the corresponding Request Line.
    • result-code = integer equal to 0 on success, or an error code
    • error-string = description of error
Line: 752 to 752
 
Changed:
<
<
  • BLAH_SET_GLEXEC_DN: This function enables local user mapping via GLEXEC for all subsequent actions. The call is synchronous and the effect is immediate.
    + Request Line: BLAH_SET_GLEXEC_DN
>
>
  • BLAH_SET_GLEXEC_DN: This function enables local user mapping via GLEXEC for all subsequent actions. The call is synchronous and the effect is immediate.
    + Request Line: BLAH_SET_GLEXEC_DN
 
    • user_proxy Path to a valid GSI proxy file. This will be optionally (when not_limited == 0) turned into a limited (delegated) proxy and be made available via GLEXEC to the user job. (The delegated proxy path is set in the GLEXEC_SOURCE_PROXY enviroment variable prior to the GLEXEC call).
    • ssl_client_certificate Path to a valid GSI proxy file. Can be the same as user_proxy. This is the client certificate that is used for access to GLEXEC and local user mapping (it is set in the GLEXEC_CLIENT_CERT environment variable prior to the GLEXEC call).
    • not_limited If this argument is set to a numeric value not equal to zero, the supplied proxy will not be limited (delegated).
      + Return Line:
      One of the following: S - in case of success F - in case of failure
      + Result Line: None.
      + Example:
Line: 778 to 778
 
Changed:
<
<
  • CACHE_PROXY_FROM_FILE: This command is only available if enable_glexec_from_condor is set to 'yes' in the BLAHPD config file. Read a GSI proxy from a specified file, and store it under the specified symbolic name.
    Unlike other GAHPs, and because this function is only used to trigger GLEXEC access which requires access to a proxy file, BLAH does not read and cache the proxy contents but only the file name. Changes to the file will affect the use of the stored proxy. The proxy name caching is lost when the BLAHP server terminates.
    The intent of this command is to allow the BLAHP server to capture and use different proxy files for different jobs.
    Other commands (e.g. by USE_CACHED_PROXY) may later be reference the given cached proxy file by its symbolic name. USE_CACHED_PROXY has the side effect of enabling GLEXEC.
    + Request Line:CACHE_PROXY_FROM_FILE <path-to-local-proxy-file _moz-userdefined=""> </path-to-local-proxy-file>
>
>
  • CACHE_PROXY_FROM_FILE: This command is only available if enable_glexec_from_condor is set to 'yes' in the BLAHPD config file. Read a GSI proxy from a specified file, and store it under the specified symbolic name.
    Unlike other GAHPs, and because this function is only used to trigger GLEXEC access which requires access to a proxy file, BLAH does not read and cache the proxy contents but only the file name. Changes to the file will affect the use of the stored proxy. The proxy name caching is lost when the BLAHP server terminates.
    The intent of this command is to allow the BLAHP server to capture and use different proxy files for different jobs.
    Other commands (e.g. by USE_CACHED_PROXY) may later be reference the given cached proxy file by its symbolic name. USE_CACHED_PROXY has the side effect of enabling GLEXEC.
    + Request Line:CACHE_PROXY_FROM_FILE <path-to-local-proxy-file _moz-userdefined=""> </path-to-local-proxy-file>
 
    • = a symbolic name which will be used to reference the given proxy.
    • <path-to-local-proxy-file _moz-userdefined=""> = a fully-qualified pathname to a file local to the BLAHP server which contains a valid GSI proxied certificate.
      + Return Line: One of the following:
      S <action-description _moz-userdefined="">
      F <error-string _moz-userdefined=""> Upon success, use the "S" version; if not recognized, use the "F" version. </error-string>
      </action-description>
      </path-to-local-proxy-file>
    • error-string = brief string description of the error, appropriate for reporting to a human end-user.
      + Result Line:None.
      + Example:
Line: 904 to 904
 
These informations are asincronously notified to CREAM by BNotifier daemon.

It is possible to configure some parameter in the blah.config file:

Changed:
<
<
  • bupdater_path and bnotifier_path: if this is set to the bupdater (or bnotifier) complete path (e.g. /opt/glite/bin/BUpdaterLSF) blahpd takescare of starting and periodically check the status of the daemon. If it is not set the daemons should be started by hand.
  • bupdater_pidfile and bnotifier_pidfile : this are used to check the daemons status by blahpd (e.g. /var/tmp/bupdater.pid).
  • job_registry: is the complete path to the job registry location (/var/tmp/job_registry.db).
  • bupdater_debug_level: set the debug level (1,2,3)
  • bupdater_debug_logfile: set the location of the debug log file
  • async_notification_host: hostname where the notification should be sent
  • async_notification_port: port where to send notifications
  • purge_interval: how old (in seconds) a job registry entry has to be before it ias purged.
  • finalstate_query_interval: the query that search for finished jobs is executed every finalstate_query_interval seconds (default:30)
  • alldone_interval: after that interval an unseen job is set as done (status = 4) and exitstatus = -1 (default:600)
  • bupdater_loop_interval: the updater main lop is executed every bupdater_loop_interval seconds (default:5)
>
>
  • bupdater_path and bnotifier_path: if this is set to the bupdater (or bnotifier) complete path (e.g. /opt/glite/bin/BUpdaterLSF) blahpd takes care of starting and periodically check the status of the daemon. If it is not set the daemons should be started by hand.
  • bupdater_pidfile and bnotifier_pidfile: this are used to check the daemons status by blahpd (e.g. /var/tmp/bupdater.pid).
  • job_registry: is the complete path to the job registry location (/var/tmp/job_registry.db).
  • bupdater_debug_level: set the debug level (1,2,3)
  • bupdater_debug_logfile: set the location of the debug log file
  • async_notification_host: hostname where the notification should be sent
  • async_notification_port: port where to send notifications
  • purge_interval: how old (in seconds) a job registry entry has to be before it is purged.
  • finalstate_query_interval: the query that search for finished jobs is executed every finalstate_query_interval seconds (default:30)
  • alldone_interval: after that interval an unseen job is set as done (status = 4) and exitstatus = -1 (default:600)
  • bupdater_loop_interval: the updater main lop is executed every bupdater_loop_interval seconds (default:5)
  -- ElisabettaMolinari - 24 Jun 2008
 
This site is powered by the TWiki collaboration platformCopyright © 2008-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback