[OpenAFS] Re: Afsd and connection timeout
Mon, 6 Jan 2014 12:21:15 -0600
On Thu, 26 Dec 2013 23:15:02 +0100
nicolas prochazka <email@example.com> wrote:
> I need some help to understand how afsd works with openafs server
Sorry that you haven't gotten a lot of response; some people (like
myself) were probably distracted during the holidays.
> 3 - I can use data on my client without problem but after a random
> period, I get :
> Connection timed out. ( it's readonly acces )
> I do not understand what is this random period, and if i can set it .
> I do similary test with discon mode off, without success
I'm not sure if it's clear yet to you from the other emails, but "fs
discon" is a little broken. There are no setting for this, since it's
supposed to just generally work. Getting this to work adequately for you
is going to involve fixing it; disconnected mode is not a
"production-ready" feature. But from your other thread I gather you're
just asking if there's a constant in the code you can tweak, so...
Some others in the other thread guessed that the problem you may be
hitting is that we're evicting volume metadata from the cache. _IF_ that
is the problem you're hitting, that should happen after 2 hours. If you
have indeed seen it happen after 3 hours (that is, it still worked after
2 hours had passed) then I don't know, maybe something else is
happening. But to hack the code to work around it:
In src/afs/afs_cbqueue.c, function afs_QueueCallback, you can set
avp->expireTime to some constant time in the future, instead of the
actual assignment. This is an absolute Unix timestamp, not a relative
time like "2 hours from now" or something. Don't set it close to 2^31 or
some calculations will probably overflow. Maybe set it to 2000000000,
which is some time in 2033.
You could also try to modify afs_ResetVolumeInfo in src/afs/afs_volume.c
to do nothing. Just comment out the contents of the function, or
"return;" right at the beginning or something.
Of course, doing either of those things will cause the client to never
detect volume location changes by itself, even if disconnected mode is
off. Doing that is not recommended for any production use and voids your
warranty :) I'm not really sure if it will help you either, but it's
something to try.