Robot to be run periodically from cron and handle RT user creation tickets that come from the website. This semi-automates the steps of creating the account including checking with the PI, adding the user to various systems, emailing the new user, and updating the ticket.

Account creation is run as a pipeline repurposing the ticket priority number to indicate the stage of each new account request. The stages are given in the pipeline description below:

  • Priority 0 : New ticket

  • Priority 1 : VUNetID verified and cluster account does not exist

  • Priotity 2 : Sent PI verification message, awaiting response from PI

  • Priority 3 : Ready to be added to the database

  • Priority 4 : Username added to database, ready for cluster account creation

  • Priority 5 : Account created in POSIX. Ready for secondary group addition and slurm associations

  • Priority 6 : Account fully created, ready to be updated in RT

  • Priority 7 : Username updated in RT, ticket is ready to be closed

  • Priority -1 : An error has occurred and manual intervention is required. After fixing the priority can be set back to a positive integer and the automated process may resume.

Note that ACCRE staff must manually change ticket priority to 3 after verification for account creation to begin.

For priority 0 the ticket status should be ‘new’, for all others ‘open’, otherwise the account creation bot will ignore a ticket.

class accre.bots.account_creator.NewUser(name, vunetid, email, group, ticket)[source]

Bases: object

Stores information about the new user and performs each step of the user creation pipeline


Adds a comment to the ticket with a description of the creation pipeline and instructions to the administrator.


Add the new user to the database along with any secondary groups specified.

close_ticket(stage, threshold=1.0)[source]

Close the new user ticket if threshold days have passed with no ticket activity


Initial creation of the POSIX account


Log failure messge, add to ticket, set ticket priority to -1 to stop pipeline


Perform initial account repairs, i.e. add secondary groups and required slurm associations.


Remind the PI to decide on approving the user if the ticket has not been updated in two days


Dispatch method for each pipeline stage


Change new user’s RT name from their email to their vunetid


Verify that this user is not already in the database and has an active VUNetID or robot equivalent and that the email matches


Request approval from the PI


Search all tickets for the given stage, and return a list of NewUser objects from the ticket data matching the given pipeline stage.


stage (int) – Pipeline stage to check


list of new user requests

Return type



Function or CLI endpoint to run the account creator, searching through all RT tickets and performing appropriate steps in the account creation pipeline.

To simply and rapidly process account requests, each pipeline stage is executed as a separate task in sequence and tickets are re-read each time.