" -B | --bootstrap Also send past events matching conditions\n"
" -T | --terminal Notify only when a job reaches terminal state\n"
" -H | --history Same as -T plus attach a history of all job's Events\n"
+ " -N | --aNonymize Anonymize all owner data in all messages under this registration\n"
, me);
if ( !cmd || !strcmp(cmd, "bind") )
fprintf(stderr,"\n'bind' command usage: %s bind [ { -s socket_fd | -a fake_addr } -t requested_validity ] notifids \n"
{"bootstrap", no_argument, 0, 'B'},
{"terminal", no_argument, 0, 'T'},
{"history", no_argument, 0, 'H'},
+ {"anonymize", no_argument, 0, 'N'},
{0, 0, 0, 0}};
int option_index = 0;
char *single, *statelist, *notif_server;
conditions = (edg_wll_QueryRec **)calloc(MAX_NEW_CONDS + 1,sizeof(edg_wll_QueryRec *));
conditions[0] = (edg_wll_QueryRec *)calloc(2,sizeof(edg_wll_QueryRec));
- while ((c = getopt_long(argc-1,argv+1,"j:o:v:n:s:a:t:f:cOS:JBTH",long_options,&option_index)) > 0) { switch (c) {
+ while ((c = getopt_long(argc-1,argv+1,"j:o:v:n:s:a:t:f:cOS:JBTHN",long_options,&option_index)) > 0) { switch (c) {
case 'j':
conditions[i] = (edg_wll_QueryRec *)calloc(2,sizeof(edg_wll_QueryRec));
conditions[i][0].attr = EDG_WLL_QUERY_ATTR_JOBID;
flags |= EDG_WLL_NOTIF_TERMINAL_STATES; break;
case 'H':
flags |= EDG_WLL_NOTIF_TERMINAL_STATES | EDG_WLL_NOTIF_HISTORY; break;
+ case 'N':
+ flags |= EDG_WLL_NOTIF_ANONYMIZE; break;
case 'c':
conditions[i] = (edg_wll_QueryRec *)calloc(2,sizeof(edg_wll_QueryRec));
conditions[i][0].attr = EDG_WLL_QUERY_ATTR_STATUS;
#define EDG_WLL_STAT_CHILDSTAT 4 /**< apply the flags recursively to subjobs */
#define EDG_WLL_STAT_CHILDHIST_FAST 8 /**< partially complete histogram of child job states */
#define EDG_WLL_STAT_CHILDHIST_THOROUGH 16 /**< full and up-to date histogram of child job states */
+#define EDG_WLL_NOTIF_ANONYMIZE 32 /**< Always return user identity anonymized */
#define EDG_WLL_NOTIF_TERMINAL_STATES 64 /**< Generate notifications on terminal states */
#define EDG_WLL_NOTIF_HISTORY 128 /**< Attach all job's events to the notification */
#define EDG_WLL_NOTIF_BOOTSTRAP 256 /**< send the state of the all already existing jobs too */
if (flags & EDG_WLL_STAT_NO_STATES) append_flag(&cflags, "no_states");
if (flags & EDG_WLL_STAT_CHILDHIST_FAST) append_flag(&cflags, "childhist_fast");
if (flags & EDG_WLL_STAT_CHILDHIST_THOROUGH) append_flag(&cflags, "childhist_thorough");
+ if (flags & EDG_WLL_NOTIF_ANONYMIZE) append_flag(&cflags, "anonymized");
if (flags & EDG_WLL_NOTIF_TERMINAL_STATES) append_flag(&cflags, "terminal_states");
if (flags & EDG_WLL_NOTIF_HISTORY) append_flag(&cflags, "history");
if (flags & EDG_WLL_NOTIF_BOOTSTRAP) append_flag(&cflags, "bootstrap");
if (!strcmp(sflag,"no_states")) flags = flags | EDG_WLL_STAT_NO_STATES;
if (!strcmp(sflag,"childhist_fast")) flags = flags | EDG_WLL_STAT_CHILDHIST_FAST;
if (!strcmp(sflag,"childhist_thorough")) flags = flags | EDG_WLL_STAT_CHILDHIST_THOROUGH;
+ if (!strcmp(sflag,"anonymized")) flags = flags | EDG_WLL_NOTIF_ANONYMIZE;
if (!strcmp(sflag,"terminal_states")) flags = flags | EDG_WLL_NOTIF_TERMINAL_STATES;
if (!strcmp(sflag,"history")) flags = flags | EDG_WLL_NOTIF_HISTORY;
if (!strcmp(sflag,"bootstrap")) flags = flags | EDG_WLL_NOTIF_BOOTSTRAP;
--- /dev/null
+#Site-wide notification registration. This file is read by glite-lb-notif-keeper.sh, initiated by cron
+
+#Uncomment the following line if you wish to submit anonymous data to the Grid Observatory experiment
+#go --history --anonymize -a x-msg://grid.emi.gridobservatory
+
--- /dev/null
+0 */4 * * * glite ( test -f /etc/profile.d/grid-env.sh || exit 0; . /etc/profile.d/grid-env.sh; printf "`date "+\%b \%e \%T"` `hostname -s` glite-lb-notif-keeper: "; @glite_prefix@/sbin/glite-lb-notif-keeper )
if (stat->payload_owner && edg_wll_gss_equal_subj(peer->name, stat->payload_owner))
return 1;
- if (job_flags & EDG_WLL_NOTIF_HISTORY ||
+ if (job_flags & EDG_WLL_NOTIF_ANONYMIZE ||
check_authz_policy(&ctx->authz_policy, peer, READ_ANONYMIZED))
*authz_flags |= READ_ANONYMIZED;
cleanline=`echo $line | sed -r 's/^\s*//'`
echo "$line" | grep -E "^#" > /dev/null
if [ $? -ne 0 ]; then
- HANDLES[$TOTALNOTIFS]=`echo $cleanline | sed -r 's/\s+.*$//'`
- OPTIONS[$TOTALNOTIFS]=`echo $cleanline | sed -r 's/^\w+\s+//'`
- TOPICS[$TOTALNOTIFS]=`echo ${OPTIONS[${TOTALNOTIFS}]} | grep -E -o '\-a[ ]+x-msg://[^ ]+' | sed -r 's/^.*msg:\/\///'`
- TOTALNOTIFS=$(($TOTALNOTIFS+1))
+ if [ "$cleanline" != "" ]; then
+ HANDLES[$TOTALNOTIFS]=`echo $cleanline | sed -r 's/\s+.*$//'`
+ OPTIONS[$TOTALNOTIFS]=`echo $cleanline | sed -r 's/^\w+\s+//'`
+ TOPICS[$TOTALNOTIFS]=`echo ${OPTIONS[${TOTALNOTIFS}]} | grep -E -o '\-a[ ]+x-msg://[^ ]+' | sed -r 's/^.*msg:\/\///'`
+ TOTALNOTIFS=$(($TOTALNOTIFS+1))
+ fi
fi
done < $infile