Support matching user and group
Bug #1965150 reported by
Facundo Ciccioli
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
charm-local-users |
In Progress
|
Undecided
|
Aliaksandr Vasiuk |
Bug Description
If the group is the exact same as any of the users being created, the units will go into an error state. This is due to the fact that the group is created beforehand, and then the users are added.
There is no explicit --group flag to the adduser command, hence a group matching the username will be implicitly created, but it will fail if a group with such a name was already created by the charm.
Given that the charm allows to create only a single group and all users are put inside it, I am not sure what's the best course of action is. It could be just a matter of catching the issue and blocking instead of erroring, plus improving the docs. mentioning the restriction.
Related branches
~valexby/charm-local-users:bug/1965150-user-match-group-name
- Erhan Sunar (community): Needs Fixing
- 🤖 prod-jenkaas-bootstack (community): Approve (continuous-integration)
- Mert Kirpici: Pending requested
- BootStack Reviewers: Pending requested
-
Diff: 107 lines (+58/-4)3 files modifiedsrc/charm.py (+17/-4)
tests/functional/tests/test_local_users.py (+40/-0)
tox.ini (+1/-0)
Changed in charm-local-users: | |
assignee: | nobody → Aliaksandr Vasiuk (valexby) |
status: | New → In Progress |
To post a comment you must log in.