fixing bug #26398
authorMiloš Mulač <mulac@civ.zcu.cz>
Tue, 22 Jul 2008 14:54:04 +0000 (14:54 +0000)
committerMiloš Mulač <mulac@civ.zcu.cz>
Tue, 22 Jul 2008 14:54:04 +0000 (14:54 +0000)
- added flag sandbox_retrieved to job status

org.glite.lb.client/src/StatusAttrNames.pl
org.glite.lb.server/src/jobstat_supp.c
org.glite.lb.state-machine/interface/intjobstat.h
org.glite.lb.state-machine/src/process_event.c
org.glite.lb.types/status.T

index 6d2ecf0..7798b97 100644 (file)
@@ -70,4 +70,5 @@
        REMOVE_FROM_PROXY
        UI_HOST
        USER_FQANS
+       SANDBOX_RETRIEVED
 /;
index bb4217b..993e802 100644 (file)
@@ -508,6 +508,7 @@ static char *enc_JobStat(char *old, edg_wll_JobStat* stat)
        if (ret) ret = enc_int_array(ret, stat->children_hist, EDG_WLL_NUMBER_OF_STATCODES);
        if (ret) ret = enc_string(ret, stat->failure_reasons);
        if (ret) ret = enc_int(ret, stat->remove_from_proxy);
+       if (ret) ret = enc_int(ret, stat->sandbox_retrieved);
        if (ret) ret = enc_string(ret, stat->pbs_state);
        if (ret) ret = enc_string(ret, stat->pbs_queue);
        if (ret) ret = enc_string(ret, stat->pbs_owner);
@@ -589,6 +590,7 @@ static edg_wll_JobStat* dec_JobStat(char *in, char **rest)
        }
         if (tmp_in != NULL) stat->failure_reasons = dec_string(tmp_in, &tmp_in);
         if (tmp_in != NULL) stat->remove_from_proxy = dec_int(tmp_in, &tmp_in);
+        if (tmp_in != NULL) stat->sandbox_retrieved = dec_int(tmp_in, &tmp_in);
         if (tmp_in != NULL) stat->pbs_state = dec_string(tmp_in, &tmp_in);
         if (tmp_in != NULL) stat->pbs_queue = dec_string(tmp_in, &tmp_in);
         if (tmp_in != NULL) stat->pbs_owner = dec_string(tmp_in, &tmp_in);
index db9a752..db4c0f9 100644 (file)
@@ -14,7 +14,7 @@
 /* where Z.XX is version from indent + 1 (version after commit), Y = Z+1 */
 /* and DESCRIPTION is short hit why version changed            */
 
-#define INTSTAT_VERSION "revision 2.2 - proxy merge"
+#define INTSTAT_VERSION "revision 2.3 - sandbox_retrieved"
 
 
 // Internal error codes 
index 5b2600c..2e78aa0 100644 (file)
@@ -786,6 +786,23 @@ static int processEvent_glite(intJobStat *js, edg_wll_Event *e, int ev_seq, int
 
                                }
                        }
+                       if (USABLE_DATA(res, strict)) {
+                               switch (e->clear.reason) {
+                                       case EDG_WLL_CLEAR_USER:
+                                               js->pub.sandbox_retrieved = EDG_WLL_STAT_USER;
+                                               break;
+                                       case EDG_WLL_CLEAR_TIMEOUT:
+                                               js->pub.sandbox_retrieved = EDG_WLL_STAT_TIMEOUT;
+                                               break;
+                                       case EDG_WLL_CLEAR_NOOUTPUT:
+                                               js->pub.sandbox_retrieved = EDG_WLL_STAT_NOOUTPUT;
+                                               break;
+                                       default:
+                                               goto bad_event; break;
+
+                               }
+
+                       }
                        break;
                case EDG_WLL_EVENT_PURGE:
                        /* ignore, meta-information only */
index a0caf15..0b1723b 100644 (file)
@@ -86,6 +86,11 @@ bool remove_from_proxy       Job reached final status and may be removed from proxy
 string ui_host         Hostname or address of UI used to submit the job
 strlist        user_fqans      FQAN used to register the job
        _special_       XMLstructured
+int    sandbox_retrieved       Flag is set on incomming Clear event
+       _code_  NOTYET          Sandbox was not retrieved yet.
+       _code_  USER            User retrieved output sandbox.
+       _code_  TIMEOUT         Timed out, resource forced purge of the sandbox.
+       _code_  NOOUTPUT        No output was generated.
 
 _pad_  55