AMI: Pin down uid/gid values when creating users/groups - #2412
Conversation
Nothing uses it and its just a drag on the repo, for understanding it and grepping.
Ran into issue with different gids between AMIs that caused suspend/wake to fail due to permission errors. The previous goss tests were only checking for user/group existence which is a very light weight test, uid/gid are the only thing that matter not the user/group name. We now explicitly pin the uid and gid so that we avoid this issue in the future, goss verifies at ami build time.
This adds ansible-lint with a custom lint rule that ensures we explicitly set uid and gid when using the user and group modules. This way we don't end up with unknown/different values between AMI builds.
PostgreSQL Extension Dependency Analysis: PR #2412
SummaryNo extensions had dependencies with MAJOR version updates. Full Analysis ResultsPostgreSQL 15 Extension DependenciesPostgreSQL 17 Extension DependenciesOrioleDB 17 Extension Dependencies |
PostgreSQL Package Dependency Analysis: PR #2412
SummaryNo packages had MAJOR version updates. Full Analysis ResultsPostgreSQL 15 Dependency ChangesExtracting PostgreSQL 15 dependencies...
Runtime Closure Size
Raw Dependency ClosurePostgreSQL 17 Dependency ChangesExtracting PostgreSQL 17 dependencies...
Runtime Closure Size
Raw Dependency Closure |
|
Note that this enforces "bad" UIDs on these users. UIDs over 1000 are for human users, not for system services. System services should have an UID below 1000 (well, on debian, 500 for RH systems as far as I remember). |
What kind of change does this PR introduce?
Bug fix
What is the current behavior?
We create users/groups willy nilly without a worry about uid/gids assigned to them.
What is the new behavior?
We no longer do that. Any user/group created in ansible needs to provide the relevant uid/gid, this is checked by a custom ansible-lint linter. We also check the uid/gid using supascan/goss at ami build time to catch any unexpected change.
Additional context
When I dropped the nginx user/group the other uid/gids changed and caused an issue with resume from suspend due to file perms.Nothing uses it and its just a drag on the repo, for understanding it
and grepping.