Today I did apt-get update and apr-get upgrade on my VPS. It had some effects and I didn't pay close attention. I had restarted the server as part of the maintenance. I manually start bitcoind and lightningd after a restart, and this time, lightningd reported an error about a sparko-plugin setting in the config file. The author (@fiatjaf) explained that I have to re-copy the plugin into a new plugin folder (that I have to recreate).
I suppose there are competing fixes to this so that updates don't clobber plugins, but none have been chosen as the solution yet. What are the issues? I'd be interested in helping to hash them out so that plugin recopying doesn't keep frustrating newbies like it frustrated me.
The only way to reproduce this is to arrange another server with an older version of c-lightning, add a plugin that lives in the plugin directory, and then try the apt-get commands to update it and see if the plugin disappears again. I don't have time to do this, but I'm assuming the situation is obvious to anyone who knows the project well enough to fix it.
The simple fix I see it so identify the part of the installation that removes existing folders from the existing lightningd folder and have it skip the plugin folder if it's there. If the removal of that folder is intentional, based on avoiding problems that result from running an old plugin with a new lightningd, then renaming the existing plugin folder to "PossiblyObsoletePlugins" would be a helpful solution. A plugin could (perhaps should already) indicate the latest version of lightningd under which it can safely run so that deleting or moving files is no longer necessary. Lightningd would just cut the plugin out after clearing the existence of the config variables that would otherwise generate config line 12: X=Y: unrecognized option as happened to me, and instead report a warning, "Skipping possibly obsolete plugin Z."
Issue and Steps to Reproduce
Today I did apt-get update and apr-get upgrade on my VPS. It had some effects and I didn't pay close attention. I had restarted the server as part of the maintenance. I manually start bitcoind and lightningd after a restart, and this time, lightningd reported an error about a sparko-plugin setting in the config file. The author (@fiatjaf) explained that I have to re-copy the plugin into a new plugin folder (that I have to recreate).
I suppose there are competing fixes to this so that updates don't clobber plugins, but none have been chosen as the solution yet. What are the issues? I'd be interested in helping to hash them out so that plugin recopying doesn't keep frustrating newbies like it frustrated me.
The only way to reproduce this is to arrange another server with an older version of c-lightning, add a plugin that lives in the plugin directory, and then try the apt-get commands to update it and see if the plugin disappears again. I don't have time to do this, but I'm assuming the situation is obvious to anyone who knows the project well enough to fix it.
The simple fix I see it so identify the part of the installation that removes existing folders from the existing lightningd folder and have it skip the plugin folder if it's there. If the removal of that folder is intentional, based on avoiding problems that result from running an old plugin with a new lightningd, then renaming the existing plugin folder to "PossiblyObsoletePlugins" would be a helpful solution. A plugin could (perhaps should already) indicate the latest version of lightningd under which it can safely run so that deleting or moving files is no longer necessary. Lightningd would just cut the plugin out after clearing the existence of the config variables that would otherwise generate
config line 12: X=Y: unrecognized option
as happened to me, and instead report a warning, "Skipping possibly obsolete plugin Z."