View Issue Details

IDProjectCategoryView StatusLast Update
0003164unrealircdpublic2007-01-27 09:53
ReporterdjGrrr Assigned ToTrocotronic  
PrioritynormalSeverityfeatureReproducibilityN/A
Status resolvedResolutionfixed 
OS*OS Version* 
Product Version3.2.6 
Fixed in Version3.3-alpha0 
Summary0003164: A way to test the config file (from the command line or without having to actually rehash)
DescriptionI think it would be very nice (and relatively easy to implement based on how it already does a syntax check first) a way to test the config file for errors without actually having to start/rehash the server to find out. it would be nice to be able to do this via the unreal script from the command line, like "./unreal testconf", and from IRC (/rehash -test maybe?)

this would be extremely useful to make sure that the conf file has the correct syntax, but not actually require that any changes take place :)
TagsNo tags attached.
3rd party modules

Activities

Bricker

2006-12-26 23:58

reporter   ~0012909

Actually, this would be totally bad! ;P
a few reasons:

1) we shouldnt have to test a users config file, if they read the docs and edited the config properly they wouldnt have trouble
2) it would take the same time for it to read the config file and show errors the same way it does when you currently do ./unreal start so, basically you're doing the same thing, just with a different command
3) if it doesnt show you the errors, it will paste them in your logs, if you dont have that enabled, its not our problem.

maybe its just me, but I think this is a bad idea and a useless one, sorry

djGrrr

2006-12-27 06:55

reporter   ~0012910

Last edited: 2006-12-27 06:57

all your 3 statements really make no sense to me, and you must not have read my reasoning behind why its extremely useful.

1) we shouldnt have to test a users config file, if they read the docs and edited the config properly they wouldnt have trouble <--- what kind of logic is that? no matter how much you read the docs you can always make mistakes, like leaveing out a ; for example, or misspelling something.

2) it would take the same time for it to read the config file and show errors the same way it does when you currently do ./unreal start so, basically you're doing the same thing, just with a different command <--- as i already stated, the point would be so that you don't have to start the ircd in order to test if its config file has the correct syntax.

3) if it doesnt show you the errors, it will paste them in your logs, if you dont have that enabled, its not our problem. <--- again, you did not read anything that i said, the whole point would be so that you DON'T have to rehash to find any errors, sometimes you don't want the changes you did to take effect immediately but want to make sure that when you do rehash that you won't run into any problems

next time read the whole report

Bricker

2006-12-27 13:06

reporter   ~0012916

True about making mistakes, but as I said, .unreal start will tell you that.

and the point in not having to start the ircd doesnt make much sense. I'm sure you could write a 3rd party program for this by yourself without unreal coming with one.

3) the part of the effects not taking immediate effect is a good point, a point i like. Sort of like adding someone to the team but not quite letting him in until all servers have it in their configs, then you can rehash at once. But im still not sure if I like it. I dunno...if i had it i would probably use it ;P but not sure

and i did read the whole report

syzop

2006-12-28 10:15

administrator   ~0012931

Last edited: 2006-12-28 10:15

Note that, while 'testing' might seem quite "light", it actually means you'll have to load modules, initialize, etc. Just to say, it's not some simple syntax checking or anything :P. Then again, you know, it's just that I would have to code it... grin.

Anyway, when I upgrade and the current ("old") ircd is running, I always run "./unreal start" to see any errors. And indeed, often I do find errors (missing certs, missing modules, permissions bad, etc). So I'm quite in favor of some ./unreal configtest (like apache and other daemons).

'/REHASH -test' is a similar story. Though in that case, I didn't see the use at first, but as explained in previous comments it can be very useful (when you need to be sure a rehash succeeds, due to mass-rehash/time/whatever).

Whether this is for 3.3* or 3.2.6, I don't know. Depends on the impact.

EDIT: just to avoid some confusion, other coders may code this as well of course, it's not assigned to me.

Trocotronic

2007-01-27 09:53

reporter   ~0013120

Made ./unreal configtest to test config file.
/rehash -test is not necessary and it's too hard (very very hard).

Issue History

Date Modified Username Field Change
2006-12-25 23:14 djGrrr New Issue
2006-12-26 23:58 Bricker Note Added: 0012909
2006-12-27 06:55 djGrrr Note Added: 0012910
2006-12-27 06:57 djGrrr Note Edited: 0012910
2006-12-27 13:06 Bricker Note Added: 0012916
2006-12-28 10:15 syzop Note Added: 0012931
2006-12-28 10:15 syzop Status new => acknowledged
2006-12-28 10:15 syzop Note Edited: 0012931
2007-01-23 06:55 Trocotronic Status acknowledged => assigned
2007-01-23 06:55 Trocotronic Assigned To => Trocotronic
2007-01-27 09:53 Trocotronic Status assigned => resolved
2007-01-27 09:53 Trocotronic Fixed in Version => 3.3-alpha0
2007-01-27 09:53 Trocotronic Resolution open => fixed
2007-01-27 09:53 Trocotronic Note Added: 0013120