def action_status(cluster, arguments):
    """Display a message about the state of the cluster.

    The return code is also set: 0 indicates that the cluster is running; 1
    indicates that it exists, but is not running; 2 indicates that it does not
    exist.
    """
    if cluster.exists:
        if cluster.running:
            print('%s: running' % cluster.datadir)
            raise SystemExit(0)
        else:
            print('%s: not running' % cluster.datadir)
            raise SystemExit(1)
    else:
        print('%s: not created' % cluster.datadir)
        raise SystemExit(2)
