<div dir="ltr">Hey Sanne!<div><br></div><div>I would treat both those things (upgrading Infinispan from version X to Y and changing configuration) separate. </div><div><br></div><div>Thanks</div><div>Sebastian</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 19, 2016 at 1:06 PM, Sanne Grinovero <span dir="ltr">&lt;<a href="mailto:sanne@infinispan.org" target="_blank">sanne@infinispan.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Just wondering, we&#39;re looking into how to compare configuration<br>
settings just to try validate the user isn&#39;t attempting an insane<br>
upgrade right?<br>
<br>
Or is there an actual need to want to change Infinispan version AND<br>
switch the essential grid configuration settings at the same time?<br>
(that seems quite insane to me, and unnecessary as one could do it in<br>
two steps..)<br>
<br>
Thanks<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
On 19 July 2016 at 10:06, Sebastian Laskawiec &lt;<a href="mailto:slaskawi@redhat.com">slaskawi@redhat.com</a>&gt; wrote:<br>
&gt; Hey Tristan, Emmanuel!<br>
&gt;<br>
&gt; Comments inlined.<br>
&gt;<br>
&gt; Thanks<br>
&gt; Sebastian<br>
&gt;<br>
&gt; On Tue, Jul 19, 2016 at 10:08 AM, Emmanuel Bernard &lt;<a href="mailto:emmanuel@hibernate.org">emmanuel@hibernate.org</a>&gt;<br>
&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; Considering very few options can be changed at runtime safely, should we<br>
&gt;&gt; rather focus of a strategy where we start a new grid and populate it<br>
&gt;&gt; with the old grid before flipping the proxy to the new one?<br>
&gt;<br>
&gt;<br>
&gt; +1, that&#39;s exactly what the Infinispan Rolling Upgrade does.<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; On Mon 2016-07-18 17:12, Tristan Tarrant wrote:<br>
&gt;&gt; &gt; On 14/07/16 12:17, Sebastian Laskawiec wrote:<br>
&gt;&gt; &gt; &gt; Hey!<br>
&gt;&gt; &gt; &gt;<br>
&gt;&gt; &gt; &gt; I&#39;ve been thinking about potential use of Kubernetes/OpenShift<br>
&gt;&gt; &gt; &gt; (OpenShift = Kubernetes + additional features) Rolling Update<br>
&gt;&gt; &gt; &gt; mechanism for updating configuration of Hot Rod servers. You might<br>
&gt;&gt; &gt; &gt; find some more information about the rolling updates here [1][2] but<br>
&gt;&gt; &gt; &gt; putting it simply, Kubernetes replaces nodes in the cluster one at a<br>
&gt;&gt; &gt; &gt; time. What&#39;s worth mentioning, Kubernetes ensures that the newly<br>
&gt;&gt; &gt; &gt; created replica is fully operational before taking down another one.<br>
&gt;&gt; &gt; &gt;<br>
&gt;&gt; &gt; &gt; There are two things that make me scratching my head...<br>
&gt;&gt; &gt; &gt;<br>
&gt;&gt; &gt; &gt; #1 - What type of configuration changes can we introduce using rolling<br>
&gt;&gt; &gt; &gt; updates?<br>
&gt;&gt; &gt; &gt;<br>
&gt;&gt; &gt; &gt; I&#39;m pretty sure introducing a new cache definition won&#39;t do any harm.<br>
&gt;&gt; &gt; &gt; But what if we change a cache type from Distributed to Replicated? Do<br>
&gt;&gt; &gt; &gt; you have any idea which configuration changes are safe and which are<br>
&gt;&gt; &gt; &gt; not? Could come up with such list?<br>
&gt;&gt; &gt; Very few changes are safe, but obviously this would need to be verified<br>
&gt;&gt; &gt; on a per-attribute basis. All of the attributes which can be changed at<br>
&gt;&gt; &gt; runtime (timeouts, eviction size) are safe.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; &gt;<br>
&gt;&gt; &gt; &gt; #2 - How to prevent loosing data during the rolling update process?<br>
&gt;&gt; &gt; I believe you want to write losing :)<br>
&gt;<br>
&gt;<br>
&gt; Good one :)<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; &gt; &gt; In Kubernetes we have a mechanism called lifecycle hooks [3] (we can<br>
&gt;&gt; &gt; &gt; invoke a script during container startup/shutdown). The problem with<br>
&gt;&gt; &gt; &gt; shutdown script is that it&#39;s time constrained (if it won&#39;t end up<br>
&gt;&gt; &gt; &gt; within certain amount of time, Kubernetes will simply kill the<br>
&gt;&gt; &gt; &gt; container). Fortunately this time is configurable.<br>
&gt;&gt; &gt; &gt;<br>
&gt;&gt; &gt; &gt; The idea to prevent from loosing data would be to invoke (enquque and<br>
&gt;&gt; &gt; &gt; wait for finish) state transfer process triggered by the shutdown hook<br>
&gt;&gt; &gt; &gt; (with timeout set to maximum value). If for some reason this won&#39;t<br>
&gt;&gt; &gt; &gt; work (e.g. a user has so much data that migrating it this way would<br>
&gt;&gt; &gt; &gt; take ages), there is a backup plan - Infinispan Rolling Upgrades [4].<br>
&gt;&gt; &gt; The thing that concerns me here is the amount of churn involved: the<br>
&gt;&gt; &gt; safest bet for us is that the net topology doesn&#39;t change, i.e. you end<br>
&gt;&gt; &gt; up with the exact number of nodes you started with<br>
&gt;<br>
&gt;<br>
&gt; Yes, Kubernetes Rolling Update works this way. The number of nodes at the<br>
&gt; end of the process is equal to the number you started with.<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; and they are replaced<br>
&gt;&gt; &gt; one by one in a way that the replacement assumes the identity of the<br>
&gt;&gt; &gt; replaced (both as persistent uuid, owned segments and data in a<br>
&gt;&gt; &gt; persistent store).<br>
&gt;&gt;<br>
&gt;&gt; Other types could be supported but they will<br>
&gt;&gt; &gt; definitely have a level of risk.<br>
&gt;&gt; &gt; Also we don&#39;t have any guarantees that a newer version will be able to<br>
&gt;&gt; &gt; cluster with an older one...<br>
&gt;<br>
&gt;<br>
&gt; I&#39;m not sure we can ensure the same identity of the replaced node. If we<br>
&gt; consider configuration changes, a user can change anything...<br>
&gt;<br>
&gt; I think I&#39;m convinced that the Infinispan Rolling Upgrade procedure is the<br>
&gt; only proper solution at this stage. Other ways (although much simpler) must<br>
&gt; be treated as - &#39;do it at your own risk&#39;.<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Tristan<br>
&gt;&gt; &gt; _______________________________________________<br>
&gt;&gt; &gt; infinispan-dev mailing list<br>
&gt;&gt; &gt; <a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
&gt;&gt; &gt; <a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; infinispan-dev mailing list<br>
&gt;&gt; <a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; infinispan-dev mailing list<br>
&gt; <a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
_______________________________________________<br>
infinispan-dev mailing list<br>
<a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
</div></div></blockquote></div><br></div>