The online racing simulator
Server bans not withstanding
(16 posts, started )
#1 - SamH
Server bans not withstanding
I don't know WHY this is happening, but people I've banned from our server, in S2, are returning after a few days. My bans are supposed to be big bans. I don't ban for a laugh, I ban because I don't WANT wreckers on our servers. If I ban for a month, that's me being really nice to a wrecker. I ONLY ban LONG LONG term for deliberate, persistent, repeat-offence wrecking, and when I do it, I bloody well mean it.

Something - I don't know what - is not working right with the ban list. Help!
Is the ban file being saved correctly?

Note that the file only gets rewritten back to the hd when the server has been shutdown - safely. Killing the process will probably cause this.
#3 - SamH
Quote from the_angry_angel :Is the ban file being saved correctly?

Note that the file only gets rewritten back to the hd when the server has been shutdown - safely. Killing the process will probably cause this.

It's possible that the server was closed by a restart. I'm not sure. We did restart recently (and it has spent most of the day today offline too).

So do I consider the fact that the banlist is dependent on the server being properly shut down as a bug, or should I propose it as an improvement? Either way, I think the ban should be written to file as soon as it's made. Whether the LFS server crashes or not shouldn't be the deciding factor in whether a ban sticks. N'est pas?
#4 - bal00
Quote from Scawen :
The bans are loaded into memory when :
- the program starts up.
The bans are saved to disk when :
- bans are cleared
- a new ban is added
- the program exits

http://forum.rscnet.org/showpo ... p=2426455&postcount=9

Did you check the expiry date of the bans in the bans.ban file with a ban editor?
Well roger me sideways and call me sally. I must've missed that post. Thanks for correcting me bal00 :up:

The only other obvious things to check would be the expiry date, as bal00 says, and whether LFS has write access to the file, and also whether the local time on the server is correct.
#6 - SamH
I too missed that one from Scawen.

It's looking like a bug, then, unless it's already a year since I banned one certain nasty wrecking little...

LFS should have write access. I can't think why not. I'll check and make sure. I do think a ban should hit the disk ASAP though. It doesn't make much sense, to me at least, that LFS should write the PREVIOUS ban to disk but not the PRESENT one. Some ban list interface would also be very useful. At the moment, unbanning someone gives no server response.. even if you mis-type the LFS username.

Since I'm posting, would someone let me know if a ban is per hardware server or LFS server? Because there's one banlist file, I've been assuming that it's per hardware server. If this is not the case, it may well explain my entire problem - banned from our South City server, but free to destroy on our Beginners, Aston and Westhill servers? Eeek!

[EDIT] I grabbed one of our team and did some laboratory testing on him. It seems that bans are per LFS instance, rather than per hardware server. At least.. it seems so. Also, the version we've got on the server DOES seem to be writing immediately to file.

I think there should at least be the difference between a "/ban username 28" and, I propose, a "/globan username 28". Obviously a globan bans not just on the one instance, but on ALL instances running on a server.
I think we've got the problem. Since LFS doesnt appear to reload the bans file, when you add from one server, the file gets changed. If you then shutdown the other server, it writes back its own copy (assuming I'm understanding it right), an is thus overwriting your change. I'm hoping that I'm totally wrong, but if my understanding of the implementation is correct, then it would explain this. If not, please correct me (scawen/bal00/anyone)

Edit:
Let me just expand a bit, to make myself clearer.
Server #1 starts up - loads bans files
Server #2 starts up - loads bans files
Server #1 gets a ban - writes bans file
Server #2 shutsdown - writes bans file, unaware of server #1's change
Server #1 restarts - its bans are gone

The quickest way to fix this, would be just to beable to specify a location to a ban file, in the server config, this way they wouldnt overlap.
#8 - SamH
The scenario you're presenting does seem to fit our experience recently.

We have a total 14 LFS server instances running. We start them one after the other, after a restart. This means that, for 13 of them, the bans are temporary. The only one that will have its bans recorded in the tome that is the bans.ban file, AFTER a restart, is.. our heavily under-used Aston config. (First in the list of .bat files, thus last one in the stack of server UIs to have its little "x" in the corner clicked on exit/restart).

Bugger.
My only suggestion, for the moment, would be to make 14 copies of LFS dedi directories, and edit your batch file slightly
#10 - SamH
Quote from the_angry_angel :My only suggestion, for the moment, would be to make 14 copies of LFS dedi directories, and edit your batch file slightly

Agreed. It's definitely the short-term solution. I'll get that sorted this afternoon.

I just knew that our new 300Gb HD would come in handy!
Hm, so basically you have a correct bans.ban file while the servers are running and it gets overwritten when the individual LFS instances shut down.

I'd try using a batch file to kill them:

copy bans.ban bans.bak
kill 1-14
copy bans.bak bans.ban

I don't know if you can kill tasks from the command line, but I'm sure there are tools for that, if not.

Apparently a ban file can only hold 44 bans (or so I heard), so that'd be something to watch out for, too.
#12 - SamH
It basically boils down to a situation worse even than that, I think.

Each server loads the ban list from file when it starts up. That becomes the ban list it believes exists. When it exits, it writes those bans back, plus any new bans it has. However in the intervening time, other servers running from the same application may also have additional bans to add.

However, our server is blissfully unaware of those new bans. It only knows about the ones it has in memory (loaded at startup), plus the new ones that have happened on itself since it was launched (but not the new ones that have happened on any other servers running). When it's time to close, it writes all of those (new and old) that IT knows about to the bans.ban file. In so doing, though, it overwrites the ones that were saved from the OTHER servers that have been closed and have written their version of the bans.ban file.

The only actual solution to the problem is for that particular aspect of the LFS server application to be redesigned, to accomodate more the existence of other servers running in parallel. It needs to check for new bans written to file periodically, to integrate those with the ones it has in memory, and to write new bans immediately to file.
The problem is, since we dont have an equivilent of iFolder for windows, theres no *good* solution to do this. Other than checking the file every X minutes/seconds.
#14 - SamH
Quote from the_angry_angel :The problem is, since we dont have an equivilent of iFolder for windows, theres no *good* solution to do this. Other than checking the file every X minutes/seconds.

Like when a new player connects? That'd do it, wouldn't it?
What if a new player never connects and it just blindly overwrites missing all the bans?
#16 - SamH
Assuming there haven't been any new bans, there shouldn't be any reason to write to the file on exit. If there HAVE been bans, they should already be IN the file (having been written as soon as the ban occurs) and so the same applies.

If the process of banning involves retrieving the file, inserting a new name, and re-writing it immediately, this should be "bagged".

Argh.. I keep missing bits. I need more coffee/sleep. Now I'm not sure if every angle is covered. If a new player never connects, then there's no reason to look in the file to see if there are any bans to be implemented, since everyone in the connection list is present and correct at the time they connected.

Posthumous bans on another server are the only situation I can think of where someone might be connected to a server while also being present in the bans.ban file. They get banned from one server, but have already attained a seat on another. This scenario is going to be pretty scarce, and will right itself once they disconnect and try to rejoin.

Server bans not withstanding
(16 posts, started )
FGED GREDG RDFGDR GSFDG