'Create cluster user on all StarCluster nodes
This command takes care to examine existing folders in /home
and set the new cluster_user\'s uid/gid accordingly. This is necessary
for the case of EBS volumes containing /home with large amounts of data
in them. It\'s much less expensive in this case to set the uid/gid of
the new user to be the existing uid/gid of the dir in EBS rather than
chowning potentially terabytes of data.'

def _setup_cluster_user(self, user=None):

    user = (user or self._user)
    (uid, gid) = self._get_new_user_id(user)
    if ((uid == 0) or (gid == 0)):
        raise exception.BaseException("Cannot    create    user:    {0:s}    (uid:    {1:1d},    gid:    {2:1d}).    This    is    caused    by    /home/{0:s}    directory    being    owned    by    root.    To    fix    this    you'll    need    to    create    a    new    AMI.    Note    that    the    instance    is    still    up.".format(user, uid, gid))
    log.info(('Creating    cluster    user:    %s    (uid:    %d,    gid:    %d)' % (user, uid, gid)))
    self._add_user_to_nodes(uid, gid, self._nodes)
