-
Notifications
You must be signed in to change notification settings - Fork 7
Conversation
I was looking at `/etc/passwd` on FCOS and noticed a user allocated for this service. With modern systemd, I think `DynamicUser=yes` is exactly what we want for this type of service. We don't need to allocate a uid/gid persistently on the system. It's just a lot cleaner this way. Drop the `tmpfiles.d` snippet too; this means the admin would need to `mkdir` that directory. Which is probably better actually, because we don't want the directory to actually be *owned* by the service user since then it'd be mutable by the service. The admin just needs to make the directories world executable and the files world-readable.
LGTM! |
I agree with dropping the |
@bgilbert And that state is related to the timer mechanism mentioned in coreos/fedora-coreos-tracker#86 (comment)? |
@zonggen Yup. |
Hm, does it do that currently? Anyways persistent state is fully supported, see |
It doesn't do that currently, no. And I didn't know about persistent data support; that's really neat! Let's add a |
Hmm; not opposed, but why not do it when we actually start writing state? |
Sure, fine with me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
(Offhand it seems like we should be able to do the same thing for Zincati too?) |
Ah yes, see I came here because I saw Zincati first but I'm not 100% sure it will play nicely with the polkit rule. |
Just want to make a note that
However,
|
Isn't that more because systemd (by default) creates a separate unit for each
IOW it should work to do this for "static" units like |
@cgwalters The second run didn't echo the 'hello world'.. |
Hmm you're right but it should have worked...digging in slightly, this looks like a Fedora SELinux policy bug. From `dmesg | grep avc.*denied':
And indeed This is definitely just a pure policy bug. |
I was looking at
/etc/passwd
on FCOS and noticed a user allocatedfor this service.
With modern systemd, I think
DynamicUser=yes
is exactly whatwe want for this type of service. We don't need to allocate
a uid/gid persistently on the system. It's just a lot cleaner
this way.
Drop the
tmpfiles.d
snippet too; this means the admin would needto
mkdir
that directory. Which is probably better actually,because we don't want the directory to actually be owned by the
service user since then it'd be mutable by the service. The
admin just needs to make the directories world executable and
the files world-readable.