Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The old groupID changed when install a new package #3707

Closed
fushanqing opened this issue May 30, 2022 · 5 comments
Closed

The old groupID changed when install a new package #3707

fushanqing opened this issue May 30, 2022 · 5 comments

Comments

@fushanqing
Copy link

fushanqing commented May 30, 2022

Host system details
When I use the version of coreos 35.20220424.3.0, I use rpm ostree install rabbitmq-server. After successful installation and restart, the /usr/lib/group file is as follows:
rabbitmq:x:976:
When I execute rpm ostree memcached python3-memcached, its /usr/lib/group file is as follows:
memcached:x:976: rabbitmq:x:975:
rabbitmq's groupid changed from 976 to 975
How did this problem happen? How to solve it?Thank you!
Reproduction steps
Steps to reproduce the behavior:

  1. rpm-ostree install rabbitmq-server
  2. reboot
  3. cat /usr/lib/group
  4. rpm-ostree install memcached python3-memcached
  5. reboot
  6. cat /usr/lib/group
@fushanqing
Copy link
Author

I found relevant problems in #1843
@lucab

@travier
Copy link
Member

travier commented May 30, 2022

This one needs to be converted to a sysusers config too: https://src.fedoraproject.org/rpms/rabbitmq-server/blob/rawhide/f/rabbitmq-server.spec#_121

@travier
Copy link
Member

travier commented May 30, 2022

I'd also recommend running that in a container if possible.

@fushanqing
Copy link
Author

This one needs to be converted to a sysusers config too: https://src.fedoraproject.org/rpms/rabbitmq-server/blob/rawhide/f/rabbitmq-server.spec#_121

When I use the latest version of coreos 36.20220505.3.2, this problem does not appear. How is this problem solved?

@lucab
Copy link
Contributor

lucab commented May 30, 2022

The ID allocation depends on the ordering of %pre runs, so it may be observed non-deterministically in some cases.

A workaround could be to pre-create system users before layering the packages, for example via Ignition and systemd-sysusers:

$ cat /etc/sysusers.d/local_ids.conf
#Type  Name       ID  GECOS                        Home directory     Shell
u      rabbitmq   -   "RabbitMQ messaging server"  /var/lib/rabbitmq  /sbin/nologin
u      memcached  -   "Memcached daemon"           /run/memcached     /sbin/nologin

This is indeed a duplicate of #1843, let's keep that one and close this instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants