Difference: UserGuideEMI2 (7 vs. 8)

Revision 82012-03-20 - AlviseDorigo

Line: 1 to 1
 
META TOPICPARENT name="UserDocumentation"

CREAM User's Guide for EMI-2

Line: 890 to 890
 
  • glite-es-activity-resume --endpoint <hostname>[:tcpport] [OPTIONS] <Activity_Identifier_1> ... <Activity_Identifier_N>
  • glite-es-activity-restart --endpoint <hostname>[:tcpport] [OPTIONS] <Activity_Identifier_1> ... <Activity_Identifier_N>
  • glite-es-notify-service --endpoint <hostname>[:tcpport] [OPTIONS] <NotificationMessages>
Changed:
<
<
  • glite-es-delegate-proxy --endpoint <hostname>[:tcpport] [OPTIONS]
>
>
  • glite-es-delegate-proxy <hostname>[:tcpport] [OPTIONS]
 
  • glite-es-delegation-info --endpoint <hostname>[:tcpport] [OPTIONS] <Delegation_Identifier>
  • glite-es-delegation-renew --endpoint <hostname>[:tcpport] [OPTIONS] <Delegation_Identifier>
Added:
>
>
Please note that <hostname>[:TCPPORT] is a "pure" host's address optionally followed by ":" char and a number, and must not contain any leading protocol or trailing path.

GOOD endpoints are for example:


lxgrid05.pd.infn.it
lxgrid05.pd.infn.it:443
lxgrid05.pd.infn.it:8080
devel08.cnaf.infn.it:2845

When [:TCPPORT] is not specified, the default 8443 is automatically added.

BAD endpoints are:


http://devel15.cnaf.infn.it/
http://devel15.cnaf.infn.it:8443/anything
https://devel15.cnaf.infn.it
myprotocol://lxgrid05.pd.infn.it

 Immediate help can be printed on the console by issuing
Line: 902 to 926
  glite-es-activity-create creates activities on the remote ES server specified as endpoint; multiple activities can be specified together in the same ADL_FILE (mandatory argument)
Changed:
<
<
glite-es-activity-status obtains from the server specified as endpoint, the status information about one or more activities; can take activities to query and endpoint from an input file
>
>
glite-es-activity-status obtains from the server, specified as endpoint, the status information about one or more activities; can take activities to query and endpoint from an input file
 
Changed:
<
<
glite-es-activity-info obtains from the server specified as endpoint, extended information about one or more activities; can take activities to query and endpoint from an input file
>
>
glite-es-activity-info obtains from the server, specified as endpoint, extended information about one or more activities; can take activities to query and endpoint from an input file
  glite-es-activity-list obtains all the activity identifiers that have been created on the server specified as (mandatory) argument
Changed:
<
<
glite-es-activty-pause tells to the server specified as endpoint to pause the activity identifiers; can take activities to pause and endpoint from an input file
>
>
glite-es-activty-pause tells the server, specified as endpoint, to pause the activity identifiers; can take activities to pause and endpoint from an input file

glite-es-activty-resume tells the server, specified as endpoint, to resume the activity identifiers; can take activities to resume and endpoint from an input file

glite-es-activty-restart tells the server, specified as endpoint, to restart the activity identifiers; can take activities to restart and endpoint from an input file

glite-es-activty-wipe tells the server, specified as endpoint, to wipe the activity identifiers; can take activities to wipe and endpoint from an input file

glite-es-activty-cancel tells the server, specified as endpoint, to cancel the activity identifiers; can take activities to cancel and endpoint from an input file

glite-es-notify-service sends to the server, specified as endpoint, a notification message (see below for the kind of messages available)

0.1 Creating simple activities on ES based CEs (no Input/Output sandboxes)

The command glite-es-activity-create creates an activity on an ES based CE; it needs the specification of and endpoint where the creation request must be sent, and an XML file containing the activity description (described in ADL language: https://twiki.cern.ch/twiki/bin/view/EMI/EmiExecutionService). The XML must not contain any xml namespace. A simple example (sleeping job) for content of ADL_FILE is:


$ cat ~/JDLs/simple_activity.adl
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<CreateActivities>
    <ActivityDescription>

        <ActivityIdentification>
            <Name>Sleeping job</Name>
            <Description>A sleep for 120 seconds</Description>
            <Type>single</Type>
        </ActivityIdentification>

        <Application>
            <Executable>
                <Path>/bin/sleep</Path>
                <Argument>120</Argument>
                <FailIfExitCodeNotEqualTo>0</FailIfExitCodeNotEqualTo>
            </Executable>
        </Application>
        <Resources>
            <QueueName>creamtest2</QueueName>
        </Resources>

    </ActivityDescription>
</CreateActivities>

To submit this ADL file simple_activity.adl just issue the command (also command's output is shown):


$ glite-es-activity-create -e cream-05.pd.infn.it ~/JDLs/simple_activity.adl
*****************************************
ActivityID     = CR_ES146448265
ActivityMgrURI = https://cream-05.pd.infn.it:8443/ce-cream-es/services/ActivityManagementService
Status         = PREPROCESSING
Status Attrs   = {}
Timestamp      = Tue Mar 20 11:05:23 2012
Description    = 
ETNSC          = 
STAGEIN Dir    = {gsiftp://cream-05.pd.infn.it/var/cream-es_sandbox/dteam/CN_Alvise_Dorigo_L_Padova_OU_Personal_Certificate_O_INFN_C_IT_dteam_Role_NULL_Capability_NULL_dteam002/14/CR_ES146448265/ISB}
SESSION Dir    = {}
STAGEOUT Dir   = {gsiftp://cream-05.pd.infn.it/var/cream-es_sandbox/dteam/CN_Alvise_Dorigo_L_Padova_OU_Personal_Certificate_O_INFN_C_IT_dteam_Role_NULL_Capability_NULL_dteam002/14/CR_ES146448265/OSB}
 
Changed:
<
<
glite-es-activty-resume tells to the server specified as endpoint to resume the activity identifiers; can take activities to resume and endpoint from an input file
>
>

Please note some useful information returned by the server in addition to the activity's identifier (CR_ES146448265): * Status = PREPROCESSING, saying an obvious thing: just after activity creation, its status is still in a preliminary state waiting to be run somewhere * Timestamp      = Tue Mar 20 10:16:23 2012, information about timestamp of actual activity creation on the server * STAGEIN/STAGEOUT that we can ignore right now; we will see them later

0.0.1 Monitoring activities on ES based CEs

 
Changed:
<
<
glite-es-activty-restart tells to the server specified as endpoint to restart the activity identifiers; can take activities to restart and endpoint from an input file
>
>
Obtaining the status of one or more activities is as simple as issuing this command:
 

$ glite-es-activity-status  -e cream-10.pd.infn.it CR_ES146448265
*****************************************
JobID       = CR_ES853695732
Status      = PROCESSING_RUNNING
Attributes  = {APP_RUNNING}
Timestamp   = Tue Mar 20 11:05:28 2012
Description = 
 
Changed:
<
<
glite-es-activty-wipe tells to the server specified as endpoint to wipe the activity identifiers; can take activities to wipe and endpoint from an input file
>
>
 
Changed:
<
<
glite-es-activty-cancel tells to the server specified as endpoint to cancel the activity identifiers; can take activities to cancel and endpoint from an input file
>
>
After a while the user's activity will be finised:
 
 
Changed:
<
<
glite-es-notify-service sends to the server specified as endpoint a notification message (see below for the kind of messages available)
>
>
$ glite-es-activity-status -e cream-10.pd.infn.it CR_ES146448265 *************************************** JobID = CR_ES853695732 Status = TERMINAL Attributes = {} Timestamp = Tue Mar 20 11:07:28 2012 Description = reason=0
 
Changed:
<
<

0.1 Creating activities on ES based CEs

>
>

0.1 Creating activities on ES based CEs, that need to move Input/Output sandboxes

The previous example was about a simple activity that doesn't involve sandboxes to move around; if the user needs to send one or more files to the CE, or needs that the CE sends files after job execution, then a more complex activity must be written and sent to the CE; before to create the activity a delegation must be created on the CE (or "a proxy must be delegated on the CE"), because moving the sandbox files could imply to contact remote authenticated services, like GridFTP servers. To delegate his/her own proxy on the CE, the user has to issue this command:


$ glite-es-delegate-proxy cream-10.pd.infn.it
DelegationID = 04669318871724504

 
Changed:
<
<
The command glite-es-activity-create creates an activity on an ES based CE; it needs the specification of and endpoint where the creation request must be sent, and an XML file containing the activity description (described in ADL language: https://twiki.cern.ch/twiki/bin/view/EMI/EmiExecutionService). The XML must not contain any xml namespace.
>
>
The returned delegation identifier 04669318871724504 (that is an handle to the real delegated proxy residing on the CE cream-10.pd.infn.it, whose lifetime is equal to the user's proxy lifetime) must be inserted in the proper ADL's section, like in this example:
 
Added:
>
>
$ cat ~/JDLs/activity_files.adl 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<CreateActivities>
    <ActivityDescription>

        <ActivityIdentification>
            <Name>CustomJob</Name>
            <Description>A job that to run needs a file to be sent and writes its elaboration on an output file to be retrieved.</Description>
            <Type>single</Type>
        </ActivityIdentification>

        <Application>
            <Executable>
                <Path>myjob.sh</Path>
                <Argument></Argument>
                <FailIfExitCodeNotEqualTo>0</FailIfExitCodeNotEqualTo>
            </Executable>
            <Environment>
              <Name>MY_ENV</Name>
              <Value>"my env"</Value>
            </Environment>
            <Error>JobError.txt</Error>
            <Output>JobOutput.txt</Output>
        </Application>

        <Resources>
            <QueueName>creamtest2</QueueName>
        </Resources>

        <DataStaging>
          <OutputFile>
            <Name>JobError.txt</Name>
            <Target>
              <URI>gsiftp://cream-23.pd.infn.it//tmp/JobError.txt</URI>
              <DelegationID>04669318871724504</DelegationID>
            </Target>
          </OutputFile>
          <OutputFile>
            <Name>JobOutput.txt</Name>
            <Target>
              <URI>gsiftp://cream-23.pd.infn.it//tmp/JobOutput.txt</URI>
              <DelegationID>04669318871724504</DelegationID>
            </Target>
          </OutputFile>

          <InputFile>
            <IsExecutable>true</IsExecutable>
            <Name>myjob.sh</Name>
            <Source>
              <URI>gsiftp://cream-23.pd.infn.it//tmp/myjob.sh</URI>
              <DelegationID>04669318871724504</DelegationID>
            </Source>
          </InputFile>
          
        </DataStaging>

    </ActivityDescription>
</CreateActivities>

When the proxy is delegated, and the ADL does contain the delegation identifier associated to the files to move, the activity can be created:


$ glite-es-activity-create -e cream-10.pd.infn.it ~/JDLs/activity_files.adl
*****************************************
ActivityID     = CR_ES292405349
ActivityMgrURI = https://cream-10.pd.infn.it:8443/ce-cream-es/services/ActivityManagementService
Status         = PREPROCESSING
Status Attrs   = {}
Timestamp      = Tue Mar 20 10:59:15 2012
Description    = 
ETNSC          = 
STAGEIN Dir    = {gsiftp://cream-10.pd.infn.it/var/cream-es_sandbox/dteam/CN_Alvise_Dorigo_L_Padova_OU_Personal_Certificate_O_INFN_C_IT_dteam_Role_NULL_Capability_NULL_dteam004/29/CR_ES292405349/ISB}
SESSION Dir    = {}
STAGEOUT Dir   = {gsiftp://cream-10.pd.infn.it/var/cream-es_sandbox/dteam/CN_Alvise_Dorigo_L_Padova_OU_Personal_Certificate_O_INFN_C_IT_dteam_Role_NULL_Capability_NULL_dteam004/29/CR_ES292405349/OSB}

 
 
This site is powered by the TWiki collaboration platformCopyright © 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback