View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0005219||unreal||ircd||public||2019-03-03 11:50||2019-10-26 19:01|
|Fixed in Version||5.0.0-beta1|
|Summary||0005219: ./unrealircd configtest|
|Description||It would be nice if UnrealIRCd could do something similar to apache, like "./unrealircd configtest".|
With that, we can also reject an "./unrealircd restart" if configtest fails (preventing a restart that is going to fail anyway).
Also document this and incorporate it in some kind of recommended upgrade procedure.
Coding-wise this would require several changes. In particular temp file cleaning and modules come to mind... calling TEST and POSTCONFTEST should be good. However, we should not call LOAD nor UNLOAD since modules may write some kind of state file which would be inappropriate at this point.
|Additional Information||When upgrading I've always been doing "./unrealircd start" before I kill the old running ircd, but... the bind errors are a bit confusing to users, and... well... this way would be nicer :)|
|Tags||No tags attached.|
|3rd party modules|
||New target: 4.2.4|
commit fb8055c6ef02532b7238638ecf77c52e6203f8b1 (HEAD -> unreal50, origin/unreal50)
Author: Bram Matthys <firstname.lastname@example.org>
Date: Sat Oct 26 18:55:26 2019 +0200
Add './unrealircd configtest' which tests the configuration but does
not actually start the server. Any warnings and errors are printed
only to the console.
Suggested in https://bugs.unrealircd.org/view.php?id=5219
Also, we do call MOD_TEST, MOD_INIT *AND* MOD_LOAD. Otherwise some errors would go undetected, eg the SSL/TLS loading takes place after complete config load.
We set ircd.config_test to 1 in case of './unrealircd configtest' and do some interventions if this is the case.
In particular: 1) we do not copy module .so's to tmp/ but load them directly - since we won't ever rehash this is fine, 2) we don't delete temporary files, 3) we don't open or write to log files, only to stderr.
Also, unrelated, but I changed the wording from "Configuration loaded without any problems." to "Configuration loaded", since the former is kinda misleading if you have X warnings :D
|2019-03-03 11:50||syzop||New Issue|
|2019-03-03 11:50||syzop||Status||new => confirmed|
|2019-03-03 11:51||syzop||Additional Information Updated||View Revisions|
|2019-04-22 20:54||syzop||Target Version||4.2.3-rc1 => 4.2.4|
|2019-04-22 20:54||syzop||Note Added: 0020593|
|2019-10-26 19:01||syzop||Assigned To||=> syzop|
|2019-10-26 19:01||syzop||Status||confirmed => resolved|
|2019-10-26 19:01||syzop||Resolution||open => fixed|
|2019-10-26 19:01||syzop||Fixed in Version||=> 5.0.0-beta1|
|2019-10-26 19:01||syzop||Note Added: 0021049|
|2019-10-26 19:01||syzop||Target Version||4.2.4 =>|