-
Notifications
You must be signed in to change notification settings - Fork 30
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
[gssproxy] retry writing to /proc/net/rpc/use-gss-proxy #85
Conversation
With this patch applied (note the last line):
This is an alternative to PR #84 |
/* failure, but the auth_rpcgss module might not be loaded yet */ | ||
if (!gpctx->retry_proc_ev) { | ||
gpctx->retry_proc_ev = verto_add_timeout(gpctx->vctx, | ||
VERTO_EV_FLAG_PERSIST, |
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.
This means there will be cases where this may fire over and over forever if init_proc_nfsd_once() always fail ... is this intentional?
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.
Yes, it'll fire every 10 seconds forever....but it will only do so if:
a) the user has a nfs-server configuration for gssproxy; and
b) /proc/net/rpc/use-gss-proxy doesn't exist (i.e. the auth_rpcgss module isn't loaded)
I do realize that the default gssproxy
installation includes /etc/gssproxy/24-nfs-server.conf
though....I still think a wakeup every 10s is acceptable?
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.
I would think maybe we should have a very simple backoff.
Store the delay in another static variable, start with one second delay and double it each time we call the function until it reaches 1024 seconds (slightly more than 15 minutes), and then keep it there?
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.
I think that has the potential of being quite confusing. The admin installs gssproxy
...starts it, then installs nfs-utils
a couple of minutes later....it doesn't work straight away but 15 minutes later it magically starts working?
libverto
already has a 60s wakeup interval even when gssproxy isn't doing anything....maybe use that as the upper limit?
root@qtest1:~# ps ax | grep gssproxy
961 ? Ssl 0:00 /usr/sbin/gssproxy -D
root@qtest1:~# strace -t -p 961 (that's gssproxy)
strace: Process 961 attached
19:08:09 epoll_wait(8, [], 64, 59743) = 0
19:09:09 epoll_wait(8, [], 64, 59743) = 0
19:10:09 epoll_wait(8, [], 64, 59743) = 0
19:11:09 epoll_wait(8, [], 64, 59743) = 0
19:12:09 epoll_wait(8, [], 64, 59743) = 0
19:13:08 epoll_wait(8, [], 64, 59743) = 0
19:14:08 epoll_wait(8, [], 64, 59743) = 0
Though I really don't think a 10s interval is a real problem either....it's basically 1-2 system calls per 10s....won't even show up in top
on the original Raspberry Pi :)
6f474c9
to
fd2c372
Compare
I just pushed an updated version |
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.
One nit.
I do not insist on the back off, but if we do not back off I think we need to find another way to limit wakeups. We can also simply give up after a certain number of attempts.
This improves the handling of cases where the auth_rpcgss module has not yet been loaded when gssproxy is started. Signed-off-by: David Härdeman <david@hardeman.nu>
fd2c372
to
5d45fcb
Compare
I understand your concerns about wakeups....but simply giving up means the very gotcha that the patch is meant to solve will still be there. Admin installs |
Ok let's compromise on an upper limit of 60 seconds. |
So after some thinking I decided the good is good enough, if I get reports that 10 seconds wakeups are a problem and there is a legitimate reason for them beyond "I did not care to properly configure it", we'll deal with it. |
Aaaand coverity complains that we are closing fd=-1 ... |
Excellent, thank you for the quick feedback loop and handling of the PR. Now, can we have a 0.9.2 release as well? 😃 |
Somehow I knew this question was coming :) |
I owe you a beer :) |
This improves the handling of cases where the auth_rpcgss module has not yet been loaded when gssproxy is started.