Skip to content

Commit

Permalink
Updating context and adding Payloads
Browse files Browse the repository at this point in the history
  • Loading branch information
esilvaju authored and bari12 committed Sep 13, 2023
1 parent 0c2ea32 commit 1692d3c
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions docs/operator/notifications.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ These notifications are primarily useful to other systems for synchronisation pu

The events generated by Rucio are categorized into different event types. Each event type has a different payload.

| Context | Event Type | Payload |
|--------------------------------------------------------------------------------------------|-----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| While adding a DID, if the DID type is a Container | CREATE_CNT | message = {'account': account.external, 'scope': did['scope'].external,'name': did['name'],'expired_at': str(expired_at) if expired_at is not None else None} |
| While adding a DID, if the DID type is a DataSet | CREATE_DTS | message = {'account': account.external, 'scope': did['scope'].external,'name': did['name'],'expired_at': str(expired_at) if expired_at is not None else None} |
| Submit transfer requests on destination RSEs for data identifiers. | transfer_status | payload = {'request-id': new_request['id'], 'request-type': request['request_type'].name.lower(), 'scope': request['scope'].external, 'name': request['name'], 'dst-rse-id': request['dest_rse_id'], 'dst-rse': dest_rse_name, 'state': request['state'].name.lower(), 'retry-count': request['retry_count'], 'rule-id': str(request['rule_id']), 'activity': request['attributes']['activity'], 'file-size': request['attributes']['bytes'], 'bytes': request['attributes']['bytes'], 'checksum-md5': request['attributes']['md5'], 'checksum-adler': request['attributes']['adler32'], 'queued_at': str(datetime.datetime.utcnow())} |
| Schedule removal of the entry from the DIDs table | INCOMPLETE | - |
| Delete empty DIDs where the DIDType is DATASET | ERASE | payload': dumps({'scope': scope.external, 'name': name, 'account': 'root'})}) |
| When the replication rule transitioning into OK_STATE for DIDs which are closed | RULE_OK | if not did['open']: payload = {'scope': rule.scope.external, 'name': rule.name, 'rule_id': rule.id} if rule.scope.vo != 'def': payload['vo'] = rule.scope.vo |
| For replication replication rule, for each 10% of progress | RULE_PROGRESS | if rule.notification == RuleNotification.PROGRESS: payload = {'scope': rule.scope.external, 'name': rule.name, 'rule_id': rule.id, 'progress': \_\_progress_class(rule.locks_replicating_cnt, total_locks)} if rule.scope.vo != 'def': payload['vo'] = rule.scope.vo |
| When the replication rule transitioning into OK_STATE for each DATASET covered by the rule | DATASETLOCK_OK | for dataset_lock in dataset_locks: payload = {'scope': dataset_lock.scope.external, 'name': dataset_lock.name, 'rse': get_rse_name(rse_id=dataset_lock.rse_id, session=session), 'rse_id': dataset_lock.rse_id, 'rule_id': rule.id} if dataset_lock.scope.vo != 'def': payload['vo'] = dataset_lock.scope.vo |
| When the transfer is done | transfer-done | |
| When the transfer fail | transfer-failed | |
| When the deletion is done | deletion-done | |
| When the deletion fail | deletion-failed | |
| Context | Event Type | Payload example |
|--------------------------------------------------------------------------------------------|-----------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| While adding a DID, if the DID type is a Container | CREATE_CNT | ```{'account': 'ruciouser', 'scope': 'data', 'name': 'this.is.a.dataset', 'expired_at': '2023-07-05 14:51:55.378549' or None}``` |
| While adding a DID, if the DID type is a DataSet | CREATE_DTS | ```{'account': 'ruciouser', 'scope': 'data', 'name': 'this.is.a.dataset', 'expired_at': '2023-07-05 14:51:55.378549' or None}``` |
| Submit transfer requests on destination RSEs for data identifiers. | transfer_status | ```{'request-id': '414ac0cd34844a03a184ce4b0f640dd1', 'request-type': 'transfer', 'scope': 'data', 'name': 'this.is.a.test.file', 'dst-rse-id': '207228dfe3b246ab9d8b199c8358e864', 'dst-rse': 'TESTRSE', 'state': 'QUEUED', 'retry-count': 2, 'rule-id': '8f06b8ede5024e9fb8c1aa4d761627f0', 'activity': 'User Subscription', 'file-size': 1000000, 'bytes': 1000000,'checksum-md5': '9e107d9d372bb6826bd81d3542a419d6', 'checksum-adler': '08880271', 'queued_at': '2023-07-05 14:51:55.378549'}``` |
| Schedule removal of the entry from the DIDs table | INCOMPLETE | - |
| Delete empty DIDs where the DIDType is DATASET | ERASE | ```{'scope': 'data', 'name': 'this.is.a.dataset','account': 'root'}``` |
| When the replication rule transitioning into OK_STATE for DIDs which are closed | RULE_OK | ```{'scope': 'data','name': 'this.is.a.dataset','rule_id': '18432d3c5aad43e3a4ed10ff61e5d1ce','progress': 30,'vo': 'testvo'}``` |
| For replication replication rule, for each 10% of progress | RULE_PROGRESS | ```{'scope': 'data','name': 'this.is.a.dataset','rule_id': '18432d3c5aad43e3a4ed10ff61e5d1ce','progress': 30,'vo': 'testvo'}``` |
| When the replication rule transitioning into OK_STATE for each DATASET covered by the rule | DATASETLOCK_OK | ```{'scope': 'data','name': 'this.is.a.dataset','rse': 'TESTRSE','rse_id': '3ddb29c028574f7288595711bc83f3e6''vo': 'testvo'}``` |
| When a transfer has been completed | transfer-done | |
| When a transfer has been fail | transfer-failed | |
| When a deletion has been successful | deletion-done | |
| When a deletion has been fail | deletion-failed | |

0 comments on commit 1692d3c

Please sign in to comment.