Redesign RabbitMQ
Ohpc account (uid resolver):
- subscribe pattern
request.*
- send out message,
uid
andgid
attached, with routing_keycreate.<username>
to other agents ifuid
andgid
create/resolve successfully message body:
{
"username": "user1010",
"fullname": "User 1010",
"reason": "Reason1, 2 and 3",
"uid": "1234",
"gid": "1234"
}
- send out confirmation with routing_key
confirm.<username>
message body:
{
"task": "ohpc_account",
"success": true // false if task failed
}
Ood account:
- subscribe pattern
create.*
- send out confirmation with routing_key
confirm.<username>
message body:
{
"task": "ood_account",
"success": true // false if task failed
}
Slurm account:
- subscribe pattern
create.*
- send out confirmation with routing_key
confirm.<username>
message body:
{
"task": "slurm_account",
"success": true // false if task failed
}
Celery Task could be using add_account
and consume
function defined in rc_util
add_account
sent out request message with routint_key request.<username>
consume
will subscribe to confirm.<username>
to keep tracking status of all tasks.