Hello JB,
thank you for the prompt reply!
you can perform cluster:bundle-update / cluster:bundle-install, the
event will trigger an update on the nodes.
You mean cluster:bundle-uninstall and then bundle-install here
(bundle-update does not exist)?
The synchronizer (during pull) can do: if the bundle is on the cluster,
and the cluster is also present locally on the node, then we trigger
bundle update (systematically).
Yes, sounds good. In order to avoid synchronizer from triggering unneeded
updates, we could perhaps additional check that:
new URL(state.getLocation()).openConnection().getLastModified() >
localBundle.getLastModified()
What do you think?
Kind regards
Sergiy
On Thu, 15 Sep 2016 13:40:12 +0200, Jean-Baptiste Onofré <j...@nanthrax.net>
wrote:
Hi Sergiy,
It depends at which level.
When the cluster is "live", you can perform cluster:bundle-update /
cluster:bundle-install, the event will trigger an update on the nodes.
The question is more when a node joins the cluster (and so the
Synchronizer is called). IMHO, it's not a good idea to introduce a
timestamp. The synchronizer (during pull) can do: if the bundle is on
the cluster, and the cluster is also present locally on the node, then
we trigger bundle update (systematically).
Regards
JB
On 09/15/2016 01:34 PM, Sergiy Shyrkov wrote:
Hello guys,
I would like to ask you about the recommended way of implementing a
"bundle update" in cluster with Karaf Cellar.
Basically, Cellar has no notion of an "update" for existing bundle. As
we are working also with SNAPSHOTs of bundles we are missing the
possibility to "update" a bundle in cluster.
What would be possible solutions for this?
We were looking at adjusting org.apache.karaf.cellar.bundle.BundleState
to introduce lastUpdated timestamp there and in the BundleSynchronizer
check it and perform bundle.update() for those bundles, where "cluster"
lastUpdated is after the local one.
Thank you in advance!
Kind regards
Sergiy
--
Sergiy Shyrkov
Software Architect
Jahia Solutions Group SA
http://www.jahia.com