[Thinlinc-technical] Migrate configuration during ThinLinc upgrade

Peter Astrand astrand at cendio.se
Thu Dec 10 14:41:36 CET 2015

Hi. We are thinking about improving the configuration handling during a 
ThinLinc upgrade, and wants to share our thoughts with you, in order to 
get some feedback.

As you probably know, ThinLinc uses the "Hiveconf" configuration system, 
where parameter/value pairs are stored in an abstract folder-like 
namespace. In practice, parameters are stored in text files below 
/opt/thinlinc/etc/conf.d/. These files are marked as configuration files, 
in order to get some special attention by the package managers (RPM/DPKG). 
What happens during upgrade depends on if the file has been changed in the 
updated package and/or on disk. In most cases, the package manager can 
determine what to do. Only one case is problematic: If a particular file 
is changed both in the updated package and on disk (by the admin). When 
this happens, the package manager will install the new file from the 
updated package, and save the edited file in .rpmsave or .dpkg-old. (See 
http://www-uxsup.csx.cam.ac.uk/~jw35/docs/rpm_config.html and 
for details).

Currently, the ThinLinc installer will not allow you to proceed with 
running "tl-setup" directly after an upgrade (regardless of whether any 
.rpmsave or .dpkg-old files were actually created), but instead advise you 
to check for such files and review them to make sure your system is 
correctly configured. You need to review the differences between the old 
and the new files, and add relevant statements from the old files to the 
new files, before proceeding with tl-setup. Depending on how much has 
changed, this task can range from very simple to mindboggling. It is 
possible to simply rename the saved files to .hconf and continue using the 
old files as-is, but there are a few problems with this approach as well 
(see below).

We want to improve this situation, and perhaps provides 2-3 different 
options in tl-setup, but wants to get your feedback about which options to 
include, and perhaps if any of these should be marked as default. There 
are different pros and cons with all options. This includes:

* If the existing configuration is preserved or not. If not, the 
administrator has to change all relevant parameters again, using the Web 
interface, tl-config, or edit the .hconf files manually.

* If the configuration is guaranteed to work good with the new version. 
Although unlikely, it is possible that the old configuration does not 
work with the new version. For example, a certain parameter value is 
perhaps longer be supported.

* If default values are taken from the new or old ThinLinc version. When 
we are changing a default value, you as a customer might either prefer 
the old or new value, depending on many things. Computer code cannot 
determine what is "best".

* If comments and file structure (such as the order of parameters, or even 
the file name) is preserved or not. In some cases, you might want to 
stay as close to the shipped configuration files as possible. This makes 
is easier to use tools such as "diff" to compare changes. In other 
cases, the configuration files might have a custom structure, many 
customer specific comments etc.

* If new parameters are available visible in the configuration files or 

The different options we are discussing now are:

1) Use the "new" files from the updated packages. This is how it works 
today, if you do not do anything between running install-server and 
tl-setup. This option has the following properties:

Preserves existing configuration?: NO
Conf. guaranteed to work with new version? YES
Default values?: NEW
Comments and file structure?: NEW
New parameters visible?: YES

2) Use the "old" files. The .rpmsave/.dpkg-old files are simply renamed 
into place.

Preserves existing configuration?: YES
Conf. guaranteed to work with new version? NO
Default values?: OLD
Comments and file structure?: OLD
New parameters visible?: NO

3) Base the configuration on the new files, but import values from the old 
file. I have written a tool that basically loops over the parameters in 
all .rpmsave/.dpkg-old and "imports" the parameter values into the 
active configuration (which is based on the new files). This means that 
the perceived configuration (say, for end users) is the same as before 
the upgrade.

Preserves existing configuration?: YES
Conf. guaranteed to work with new version? NO
Default values?: OLD
Comments and file structure?: NEW
New parameters visible?: YES

I'm personally quite fond of solution 3 (migrate), so my initial idea was 
to have that as the default option in tl-setup, but also make it possible 
to opt out for such a migration, which means solution 1 (new files) 
instead (since that is what the package manager gives you). It would also 
be possible to get solution 2 (old files) by exiting tl-setup and, say, 
manually renaming files.

However, we are considering other alternatives as well. This includes but 
is not limited to: not having any default, providing an option for 
solution 2 (old files) as well etc. Or perhaps the current implementation 
is sufficient?

Since it's somewhat difficult to describe all this in text, I'm attaching 
a screenshot of what it could look like.

What do you think? Any feedback is appreciated.

Peter Astrand		ThinLinc Chief Developer
Cendio AB		https://cendio.com
Teknikringen 8		https://twitter.com/ThinLinc
583 30 Linkoping	https://facebook.com/ThinLinc
Phone: +46-13-214600	https://google.com/+CendioThinLinc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: b1760.png
Type: image/png
Size: 43363 bytes
URL: <http://lists.cendio.se/pipermail/thinlinc-technical/attachments/20151210/f48083d6/attachment-0002.png>

More information about the Thinlinc-technical mailing list