-
Notifications
You must be signed in to change notification settings - Fork 247
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
SYSTEMD: replace 'sssd_check_socket_activated_responders' #7607
SYSTEMD: replace 'sssd_check_socket_activated_responders' #7607
Conversation
024c9b8
to
679d308
Compare
|
@sumit-bose noted, that this approach might fail in case multiple SSSD instances are running on the same host (for example, in containers). |
The solution could be to compare I'm yet to come up with not too-overly-ugly command line to convey this. |
679d308
to
fd6530e
Compare
It's not too trivial...
First part stays the same - Second part is to check if any of found PIDs have the same mount namespace id as a current:
Simplification suggestions are welcome... |
|
And to take the look under the hood, one can add
Tricky part is escaping of This is because of systemd preprocessing of a string even within |
Well, |
with a schell script. All sockets already have ``` After=sssd.service BindsTo=sssd.service ``` - this ensures SSSD was started and running before socket activation. New 'ExecStartPre' condition checks if a responder with the same name is running and, if so, if it runs in the same mnt namespace. The latter is to ignore processes run in a container on the same host. Resolves: SSSD#4333 Resolves: SSSD#5013
fd6530e
to
cceb66a
Compare
Done. |
Maybe it would be possible to look at process cgroup? This would be way easier and more readable. But I don't know if this is documented anywhere.
Another solution, probably good for us in long term would be to stop managing our processes on systemd systems and just run |
Your code works nicely, but it just fails silently if the condition is not met. The original code produced a nice error message. Why do you want to remove it anyway? |
I can add a comment before this
There are issues (like #5013) |
Should be possible. Is this what you meant? |
Not really.
But journal does not have any information on why it failed:
So you really have to call systemctl status to get any information, but who's going to understand what the command does?
Any comment won't be visible unless one calls Maybe we can put this in a script file and print message to syslog? |
I meant more something like Either way, you need to add It might be also safer to use abs path instead of just the binary name. |
Maybe 'system.slice'? And is it going to be the same if everything already happens in the container? |
Taking into account the need to:
I'm no more sure that is so good idea. Maybe fixing existing C-program would be better. @pbrezina, @sumit-bose, @aplopez, |
Hi, I agree that improving the existing program would be better. bye, |
I agree in that improving the C program would be better. However, in my ignorance of the subject, I don't see how this could be achieved. If the program is launched by Do you have in mind a different solution? |
That's not an issue. If |
Ok, it's a pity, but I'll re-do this. |
So the C-program you want to fix is I agree with this proposition. |
Well, this doesn't work either: monitor's |
with a schell script.
All sockets already have
-- this ensures SSSD was started and running before socket
activation.
New 'ExecStartPre' condition checks if a responder with the
same name is running and, if so, if it runs in the same
mnt namespace. The latter is to ignore processes run in
a container on the same host.
Resolves: #4333
Resolves: #5013