Skip to content

User's group failed to create on some systems #361

@arm4b

Description

@arm4b

Sometimes it happens that st2 group or mistral group is not created with packages.
Inexistent group results that all services fail to start (except of st2actionrunner which is launched from the root:root).

So both:

(groups $ST2_USER 2>/dev/null | grep -q "\b${PACKS_GROUP}\b") ||
usermod -a -G $PACKS_GROUP $ST2_USER

and
adduser --no-create-home --system %{svc_user} 2>/dev/null

needs better control.


Clean machine (working):

sudo adduser --no-create-home --system st2test1
$ groups st2test1
st2test1 : st2test1

Here is a disconnect on affected machine:

sudo adduser --no-create-home --system st2test1
$ groups st2test1
st2test1 : users

(probably because of custom /etc/default/useradd config)

Also TODO: Add additional tests where possible.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions