Ticket [#1453] added support for autoscaling, which allows scale-out from an
initial cluster containing at least one node. This commit adds support for
scaling out from a cluster containing zero nodes, or alternatively, a cluster
where the active node is not a configured node. The use cases are as follows:

* Support loading a backup that was created on a different cluster where none of
  the new nodes have the same name as any of the nodes in the old cluster.
* Support cluster restart on a system where nodes don't have persistent local
  storage (or persistent host names / node names) - i.e. a system where a node
  reboot will always result in a scale-in followed by a scale-out
* Make scaling more robust, e.g. imagine a case when a one-node cluster is
  scaled out by adding a second node, but then the original node is removed
  before scale-out of the new node has completed.
---
 src/clm/clmd/clms_main.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/clm/clmd/clms_main.c b/src/clm/clmd/clms_main.c
index 9a46bd845..c21e89bab 100644
--- a/src/clm/clmd/clms_main.c
+++ b/src/clm/clmd/clms_main.c
@@ -163,8 +163,16 @@ static uint32_t clms_self_node_info(void)
        node = clms_node_get_by_name(&node_name_dn);
 
        if (node == NULL) {
-               LOG_ER("%s not found in the database. Please verify %s",
-                      node_name_dn.value, node_name_file);
+               if (clms_cb->scale_out_script != NULL) {
+                       LOG_NO("Own node %s not found in the database. It will "
+                              "be scaled out since autoscaling is enabled.",
+                              node_name_dn.value);
+                       rc = NCSCC_RC_SUCCESS;
+               } else {
+                       LOG_ER("Own node %s not found in the database. Please "
+                              "update %s or enable autoscaling",
+                              node_name_dn.value, node_name_file);
+               }
                goto done;
        }
 
-- 
2.13.1


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to