Project:Infrastructure/Developer retirement process

This guide Article description::describes how to retire a developer properly from all Gentoo hosted services.

Introduction
Our developers use several different services that we need to ensure get taken care of when they retire.

This process officially starts when Retirement team CCs infra-bugs@gentoo.org on the retirement bug and tells us to retire the developer. is the present infra retirement processor, but this document is intended to allow other infra developers with suitable access to retire as needed.

You should have access to the following services in case something goes wrong.

How to retire a dev

 * 1) Login to ldap1 as your user.
 * 2) Run  If there is no dev bug set in LDAP, the script will ask for it.

Dev-facing bits
In :


 * auto-retire: A shell script called from cron every interval. The 'Driver' for all retirements.
 * find_retired_devs.py: A python script that scans LDAP for developers marked for retirement.
 * Eligible developers have 'gentooStatus=Retired' and 'gentooAutoRetire=..' is in the start-end window.
 * You cannot retire developers who have gentooAccess: infra-ldapadmin.group.
 * Eligible developers need to have a gentooDevBug attribute.
 * find_retired_devs_test.py: A test for the above module.
 * retire-dev-ldap: Takes a username and bugno, will 'retire' the user.

Background bits
The auto-retire script will search for developers who need to be retired. For each dev, it will call run-parts on /etc/retire.d on all infra-managed machines. For most machines, this is a no-op as that directory is empty. On machines that have services, each service will have a service-specific script in there. All messages are logged to a machine local file, and some of the messages are logged to bugzila. See https://bugs.gentoo.org/show_bug.cgi?id=70723 as an example.

These scripts are all managed in cfengine/cfengine/inputs, just grep for 'retire.d' to find each service specific script.

antarus@a01 ~/code/checkouts/cfengine/cfengine/inputs $ grep retire.d -R ./ - ./cf.smtp_lists:       /etc/retire.d/retire-dev-list ->! /usr/local/sbin/lists/retire-dev-list - ./hosts/cf.yellowhammer:       /etc/retire.d/bugzilla-retire ->! /usr/local/sbin/bugzilla-retire - ./cf.vcs:       /etc/retire.d/retire-dev ->! /usr/local/sbin/retire-dev

These scripts all take a simple dev name (eg: 'antarus') as an argument. If you want to add another service (planet needs some automation for example) you can simple work on a service-specific retirement script. Test it out by hand first. All stdout that matches '^LOG:' will be sent to bugzilla, so do not write sensitive information in there (all bugs are public.)

Update forums account
Contact any forums administrator, or CC their Bugzilla account on the bug.

Retire from Planet/Universe and blogs
CC their bugzilla account on the retirement bug. They will remove the planet/universe configs which are in g.o.g.o/proj/planet-gentoo git repo, and reset the password for blogs. Final step is to disable comments from all posts, for which they will ping infra on IRC to run the following command:

Update git.gentoo.org
Inside the gitolite-admin repository:


 * 1) move all keys for the developer to exdevs, i.e.:
 * 2) run scripts/clean.pl to update groups:
 * 3) remove developer from @ldap__repo__gentoo, manually or via script:
 * 4) commit and push ;-).

Retire from dev.gentoo.org
The first step is to remove a developer from our shell box. Infrastructure has created a shell script that should take care of all the tasks. Login as root to dev.gentoo.org and run the following:

This script will do the following:


 * Remove the user from all local groups
 * Remove the user from all mail aliases
 * If they have a mail forward, copy it to the alias directory
 * If they don't have a mail forward, create a mbox that their mail will go to for 30 days in case they need something.
 * Move their home directory to
 * Index the contents of their home directory with permission details
 * Change the ownership of their homedir to root
 * Tar up their homedir
 * Remove the homedir while leaving the tarball of homedir

Here's what it will look like:

Since our shell box uses LDAP, actual user deletion will happen on the LDAP server. We cannot just lock the user in LDAP, as OpenSSH may still consult the authorized_keys file, hence the retiring of the home directory as well.

Retire from cvs.gentoo.org
Retiring a developer from the CVS server works the same way as the shell retirement process (stopping proceses, and removing from groups). The only difference is that the script only moves the developer's home directory to the folder. Log into cvs.gentoo.org and run the following:

Retire in LDAP
In order to remove the user totally from our system, you need to login to our primary LDAP server (ldap1.gentoo.org). You cannot retire a developer from any other box. created a script that does the following:


 * Removes any attribute with
 * Sets the developer's  to
 * Setting the gentooRetire attribute.

This script lives in /usr/local/sbin/retire-dev-ldap.

Special cases: other machine access
Now you need to check every other Gentoo machine that the developer previously had local-account access to, such as any other *.gentoo.org boxes, or the various arch team machines like *.amd64.gentoo.org. You need to disable any local accounts that still exist. If the box is connected to LDAP, cleaning up the home directory is nice, but not required.

Retire from mailing lists
Now we need to remove the developer from all our mailing lists so that we don't have to deal with extra mail and the bounce to timeout. The following script on our mailserver will comb through the lists and remove the email address from that list properly. It will check for regular subscribers, digest subscribers and nomail subscribers.

Retire Bugzilla account
Now we need to retire and disable their Bugzilla account. Please SSH to, sudo up, and run: ./retire.sh $USERNAME. This automated script performs the following tasks:


 * Add the disabled text to say: "Retired on 12-08-2005 as per retirement bug #12345." Retiring developers are responsible for creating a new bugzilla account, and configuring watches for all bugzilla accounts that they are interested in.
 * Append (RETIRED) to the real name field
 * Remove them from any Bugzilla groups they may have been added to