[Date Prev] [Date Index] [Date Next] [Thread Prev] [Thread Index] [Thread Next]
Bryan Stansell bryan@conserver.com
Tue, 28 May 2002 10:57:55 -0700 (PDT)
On Tue, May 28, 2002 at 04:09:49PM +1200, Malcolm Gibbs wrote: > RSC card). You notice it automatically retries immediately. The small > delay between each try is the expect script attempting the connection > (intentional problem was failed login into RSC). > > conserver.cf line: 'rschost:|/opt/conserver/bin/rsclogin arg1 arg2::&::' yep, that explains things. the problem here is that, as far as conserver is concerned, everything is ok - for a total of 5 seconds. then the program exits (which means the console is down), and conserver respawns it. the unfortunate part here is that there's no way of knowing if the program exited because it was having trouble, or of it exited because it finished normally. ideally, a "normal exit" would trigger a respawn and an "abnormal exit" would not - well, maybe. i've been thinking that if we look at the exit code of the program and either auto-respawn that it might be a good compromise. but i'm not sure about that either. why? 'cause i would assume that if something bad happened to a console (say the rsc unit resets), the program would exit with an error code reflecting that. and you'd want conserver to respawn the thing, cause, in theory, the rsc unit would be back and available "real soon". with examples like this, you could argue that the return codes of the programs are irrelevant. which brings us back to our original problem - do you respawn these things or not? for tcp connections and local serial ports, the current logic is probably correct (or real close). for programs, i really don't know what to do. i'd think it's safer to error on the side of respawning. but, maybe we just need another flag that says "don't ever automatically reconnect on failure" (the -o/-O flags would still take effect - it would just turn off the initial retry on failure). if anyone has an opinion on this, let me know (send me private email, please - i'd rather not spam the list). if there's a lot of activity, i'll post a summary. but, i'm thinking the flag would be the right thing for the immediate future. probably only useful for folks who are using programs as consoles (and, as i said, respawning is probably a good thing - even for programs) but i can see the need for it not to respawn too. (yeah, a mixed console set - some programs, some tcp or devices - probably won't find this useful as it would turn them all off, but you could use the -O option. hmm...) Bryan