-
Notifications
You must be signed in to change notification settings - Fork 32
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
Putting a user in the group "systemd-journal" or "kvm" does not work anymore from Ignition #799
Comments
I hit this again with the kvm group, this is a regression, maybe we can work around it by creating the group from ignition using the same ID but it means to have a duplicate entry in /etc/groups |
Adding the group in Ignition doesn't work because it already exists… I think we should prioritize this if there is no easy workaround. Original error Error after trying to add the group via Ignition: |
As @tormath1 found out, |
As workaround we could add more special groups: |
Talked with @tormath1 and realized that this is not really something upstream could do as we want it to happen because of possible library compatibility problems and our nss plugin would also not know that it should look up under |
It's apparently not working (anymore?) to modify an nss-provided group. A workaround could be to check if defining a systemd-userdbd user json works with a |
gave a try with systemd-userdb, no more luck. To summarize, EDIT: I tried with lts-3033.3.9 which still has ignition-0.36, this is the config: passwd:
users:
- name: tormath1
groups:
- systemd-journal
- kvm Indeed there is not error during the boot, but the user
I think the error has always been there but silently ignored. |
There is probably a bug in systemd-userdb when trying to create a new user with it, we can't add it to a group nor does it work to define a group and add members to it. First,
Then there are the user and group files in
You also need the symlinks: Then the problem was that kvm wasn't added:
|
@tormath1 found systemd/systemd#24381 Can confirm that the .membership file works. It also works for regular users like
So, as a workaround to add users to a group, Ignition could create this membership file. (coreos/ignition#1593) |
The |
Or rather use wrappers for |
I have fixed the userdb issue in systemd/systemd#32871, pending review. |
Apparently, systemd is actually working as designed (but not documented). 😞 |
Description
I have an old config where a new user gets created and added to the systemd-journal group from Ignition and another one with the kvm group. This fails to boot because Ignition does not find the group.
Impact
Regression, instance fails to boot (initrd emergency console)
Environment and steps to reproduce
The 2.2.0 config has an entry
passwd → users → "name": "myuser", "groups": ["sudo", "docker", "systemd-journal", "kvm"]
Expected behavior
It works again
Additional information
Maybe we need to add the group in the initramfs, at least I see it in
/usr/share/baselayout/group
already and we could concatenate these entries to the initramfs passwd if that helpsThe text was updated successfully, but these errors were encountered: