Open okt-denispr opened 7 months ago
In principle, we do already have a solution for this called substitutions (enabled by declaring subtitution: true
on an object). See for the example /agent/env
. The idea is that Configurator tries to split the current value of a substitutable instance into a fixed part and a variable part and then replace the variable part with the right value upon reboot. The mechanism is, however, a bit fragile, so it may need some tweaking for the particular task.
I am strongly opposed to having a yet another module tree, this will result in nothing but a confusion,
Rebooting the TA doesn't work properly when custom modules are used. Typically, custom modules are built using
builder.conf
, installed in the agent'slib/modules
directory, and loaded via Configurator.The issue arises because the filename subtree of the
module
tree has a volatile attribute. This is understandable, as rebooting the TA results in a change to the agent's directory name. However, this makes it impossible to reload the modules properly during recovery.A possible solution could be to add a new node to the
module
tree, designed to search for modules in the agent directory. This node would function as an alternative tofilename
, but without specifying the path to a module. Implementing this solution would require only a minor modification to the code that processes themodule
tree.Additionally, it is necessary to ensure that the system module is unloaded before custom ones are inserted, if this step was included in the initial configuration.