Community
Participate
Working Groups
Updating the shell properties file sometimes doesn't work. Enabled is "true" but there is no open port or vice versa. This could be related with ConfigAdmin caches and the way they are updated.
Fixed with commit http://git.eclipse.org/c/virgo/org.eclipse.virgo.nano.git/commit/?h=364571-introduce-nano The problem occurs only when the telnet/ssh gets disabled (from true the enabled property is set to false). Also, if nano is restarted second time, the change is applied. The problem is as follows: When the console bundle starts it registers a ManagedService, which listens for its configurations. When the configuration is updated and nano restarted, the configuration admin keeps the old configuration until the update becomes available (through a call to ConfigAdmin). Meanwhile, before the updated configuration reaches the ConfigAdmin, the console starts and registers its ManagedService. Since the update is not available yet, the ManagedService gets the old configuration. If it says that telnet is enabled, a telnet server is started. Then comes the updated configuration. The console reads the new properties, but since there is already a running telnet server, it does not kill it - it does not know if there are open sessions. That is why it seems that the update is not applied. If nano is restarted again, when the console gets started it gets the updated configuration right from the start and does not start a telnet server. If the update is from false to true this problem does not occur. When the console gets the old configuration first, it just does not start a telnet server. And when comes the updated configuration, it starts one. This happens only in nano, since in it the osgi.clean property is false and caches are not cleared. In the other distributions the property is true, so config admin cache is cleared each time and upon start it has no console configuration until the one from the properties file gets registered. The fix is very small - it just deletes upon stopping of nano the console configurations - the merged one, and the two specific.
(In reply to comment #1) > Fixed with commit > http://git.eclipse.org/c/virgo/org.eclipse.virgo.nano.git/commit/?h=364571-introduce-nano The actual link to the commit is: http://git.eclipse.org/c/virgo/org.eclipse.virgo.nano.git/commit/?h=364571-introduce-nano&id=965b14e360064132a7ff31144efb9cb4dcb0ab49
Made minor re-factoring with commit 41c8b44
Fixed.