Projects tigase _server server-core Issues #879
Settings conversion and --properties/config-file handling (#879)
Won't Fix
wojciech.kapcia@tigase.net opened 7 years ago

(followup from https://projects.tigase.org/issues/6006#note-8)

Andrzej Wójcik wrote:

And as for:

IMHO if we set --config-file old configuration detection and conversion shouldn't be run (which could override the config?)

I think that we should not treat it in any different way, as %kobit suggested, people are not familiar with DSL and may want to modify properties file and want Tigase to convert it to DSL once again.

If we would disable conversion of config file when --config-file is passed, then it would not be possible to force converter to read from one place and write the result in the other. So converter would be forced to write the same directory as init.properties file was locate, which could be marked as read-only on some installations.

Maybe a middle way?

Currently we have following options:

  • --properties-file= - will trigger conversion and write config.tdsl

  • --config-file= - will still check for init.properties file and if found try to convert it (if I understand it correctly, log entry OldConfigHolder.detectPathAndFormat() FINEST: No property file not specified would suggest it)?

My suggestion was, that if we have only --config-file (then someone is aware of the new config, migrated to it, etc) we don't detect properties file. However - we could support both --config-file and --properties-file so if the latter is present it would convert it to --config-file defined in the configuration option (and without it it would use default path).

In principle I think that simply sticking with using --properties-file would fulfil %kobit requirement (and if someone has odd installation with locked write then… this is no installation to experiment with configuration IMHO, and secondly - you could specify --config-file in writeable location to achieve same result).

Andrzej Wójcik (Tigase) commented 7 years ago

I think that you try to solve the issue which does not exist and you are over-complicating code.

If someone started Tigase XMPP Server at least once, then there will be no etc/init.properties file anymore as Tigase will rename it after conversion to @DSL@.

If someone will manually place init.properties once again, then he knows what to expect (conversion once again). And even if he does it by mistake then the previous version of config.tdsl is backed up during conversion.

Also, I do not get why do you assume that conversion was only done when --config-file is set? It could be done also when --config-file was not passed. I would not like to make a distinction between those cases as it creates another use case to consider.

If I would suggest anything to "solve this issue", I would suggest to make conversion if and only if --property-file is set. During an upgrade from the old installation, it would be set as tigase.conf had this setting on older versions.

wojciech.kapcia@tigase.net commented 7 years ago

Thank you for explanation. Rejecting then.

issue 1 of 1
Type
New Feature
Priority
Normal
Assignee
RedmineID
6068
Version
tigase-server-8.0.0
Spent time
1h 15m
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#879
Please wait...
Page is in error, reload to recover