[ClusterLabs] podman containers as resources - ? - with a twist
Reid Wahl
nwahl at redhat.com
Wed Dec 28 15:53:42 EST 2022
On Wed, Dec 28, 2022 at 6:08 AM lejeczek via Users
<users at clusterlabs.org> wrote:
>
> Hi guys.
>
> I have a situation which begins to look like quite the pickle and I'm in it, with no possible or no elegant at least, way out.
> I'm hoping you guys can share your thoughts.
> My cluster mounts a path, in two steps
> 1) runs systemd luks service
> 2) mount that unlocked luks device under a certain path
> now...
> that certain path is where user(s) home dir resides and... as the result of all that 'systemd' does not pick up user's systemd units. (must be way too late for 'systemd')
>
> How would you fix that?
> Right now I manually poke systemd with, as that given user:
> -> $ systemctl --user daemon-reload
> only then 'systemd' picks up user units - until then 'systemd' says "Unit ... could not be found"
> Naturally, I do not want 'manually'.
>
> I'm thinking...
> somehow have cluster make OS's 'systemd' redo that user systemd bits, after the resource successful start, or...
> have cluster somehow manage that user's systemd units directly, on its own.
>
> In case it might make it bit more clear - those units are 'podman' containers, non-root containers.
You might be able to manage these containers via the
ocf:heartbeat:podman resource agent, with `--user=<your_user>` in the
`run_opts` resource option along with any other relevant options.
If something like that doesn't work, then you could write a simple
lsb-class or systemd-class cluster resource to do what you're
currently doing manually.
There may be other options; those are the two that come to mind.
>
> All thoughts shared are much appreciated.
> many thanks, L.
>
>
> _______________________________________________
> Manage your subscription:
> https://lists.clusterlabs.org/mailman/listinfo/users
>
> ClusterLabs home: https://www.clusterlabs.org/
--
Regards,
Reid Wahl (He/Him)
Senior Software Engineer, Red Hat
RHEL High Availability - Pacemaker
More information about the Users
mailing list