Greg Fitzgerald
- gregf
- gregf
- America/Havana
- Yes
- No
ggI manage a chef cookbook for deploying minecraft servers. Minecraft currently edits servers.properties, banned-ips.txt, banned-players.txt on each startup. This causes problems for people using configuration management tools to deploy their minecraft server.
The way these tools work generally is if you have changes to your templates, in this case the configuration files named above, the server will restart. If you do not have any changes the server has no reason to restart.
Since minecraft rewrites the files managed (possibly others as well) each startup, my cookbook readjusts the files each time to match the templates I have defined, so every run requires a restart to the server.
Is there a reason why minecraft has to edit these configuration files each startup, adding timestamps and adjusting the order of the settings?
ggI manage a chef cookbook for deploying minecraft servers. Minecraft currently edits servers.properties, banned-ips.txt, banned-players.txt on each startup. This causes problems for people using configuration management tools to deploy their minecraft server.The way these tools work generally is if you have changes to your templates, in this case the configuration files named above, the server will restart. If you do not have any changes the server has no reason to restart.
Since minecraft rewrites the files managed (possibly others as well) each startup, my cookbook readjusts the files each time to match the templates I have defined, so every run requires a restart to the server.
Is there a reason why minecraft has to edit these configuration files each startup, adding timestamps and adjusting the order of the settings?
@Zarquod The latest stable (2.8.5), not the latest nightly build.
To make things worse, even with a stock server.properties file after a few restarts of the server, the order changes. So even if I could work around the timestamp issue with a partial template, I can't count on the order of the settings, so the server will off and on make changes to my partial template as well.
I would really like to server the server stop modifying any configuration files that already exist in the future. Let the server admin worry about updating their configuration files on there own. Please
This seems to be a bit of a hack. I don't understand why it needs to adjust the config file in the first place. Don't take this the wrong way, but can you name another server that modifies it's configuration on startup? What if apache and nginx started to modify config files on startup? Lets assume the administrators know what they are doing, so we don't have to implement hacks like this.
Chef is writing in ruby and has a certain way of doing things. In this case it monitors template files for any changes using a checksum and restarts if they change. So in order to do something like you are suggesting, I would have to write another library to handle configuration files just for minecraft.
Thanks for taking the time to do what you did, I just don't feel its a proper fix.
*EDIT* I would also have to write code to read in and monitor banned-ips.txt and banned-players.txt as well, the server modifies the headers in those files as well.
Sorry to spam this ticket so much. You said above though it only adjusts the files in two cases. I have found this to not be the case either. While trying to match the order of the file in my template last night, I realized while restarting the daemon a bunch of times the order of server.properties changes. If you start up a vanilla server and restart the server a handful of times, the order that was first generated is changed eventually if you make any changes of your own.
Nope.
I have no idea what happened but, restarting the server a hand full of time testing different versions appears to have resolved the issue. I am no longer getting the error when I start the latest snapshot. Since I can't reproduce it anymore, feel free to close this
Thanks.
This is still not working in the 1.7 pre-release.
This is still a issue.
Sure is. It's rather annoying one from a sysadmin perspective. I hope it gets looked at soon.
Still an issue, all updated.
Updated.