From f04a68086435c6cbb88a856d51c59409764cc8f4 Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Mon, 18 Mar 2019 11:48:59 +0100 Subject: [PATCH 1/4] =?UTF-8?q?=C3=A9change=20de=20clef=20entre=20tous=20l?= =?UTF-8?q?es=20noeuds=20du=20cluster?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- postservice/99-z-ha | 17 ++++++----------- scripts/onehost_create_all | 15 ++++++++------- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/postservice/99-z-ha b/postservice/99-z-ha index 88b70d4..3519978 100644 --- a/postservice/99-z-ha +++ b/postservice/99-z-ha @@ -1,15 +1,10 @@ #!/bin/bash -ha=$(CreoleGet activer_one_ha non) -if [[ ${ha} == "oui" ]] -then - indx=$(CreoleGet one_ha_server_index) -else - indx="0" -fi - -if [[ ${1} == "instance" ]] && [[ ${indx} == "0" ]] -then - /usr/share/eole/sbin/onehost_create_all +if [[ ${1} == "instance" ]]; then + ha=$(CreoleGet activer_one_ha non) + if [[ ${ha} == "oui" ]] + then + /usr/share/eole/sbin/onehost_create_all + fi fi exit 0 diff --git a/scripts/onehost_create_all b/scripts/onehost_create_all index fe2ec74..994719a 100755 --- a/scripts/onehost_create_all +++ b/scripts/onehost_create_all @@ -163,12 +163,10 @@ HAPY_HA=$(CreoleGet activer_one_ha "non") master=1 if [[ ${HAPY_HA} == "oui" ]]; then idx=$(CreoleGet one_ha_server_index) - if [[ ${idx} != "0" ]]; then - EchoBleu "Mode HA: (on) Index : [${idx}]" - echo -e "\t$(basename ${0}) doit être lancé uniquement sur le leader (index 0)" - exit 0 - else + if [[ ${idx} = "0" ]]; then master=0 + else + master=2 fi fi @@ -179,7 +177,7 @@ DBMODE=$(CreoleGet one_database_type "none") echo -e "\n" EchoBleu "Vous allez inscrire un noeud dans une grappe Hâpy" -EchoBleu "Pour ce faire vous devez vous munir du mot de passe de l'utilisateur 'oneadmin' de chacun des noeuds" +EchoBleu "Pour ce faire vous devez vous munir du mot de passe de l'utilisateur 'root' de chacun des noeuds" Question_ouinon "Voulez-vous commencer ?" 'True' "oui" if [[ $? -ne 0 ]] then @@ -195,6 +193,9 @@ for host in ${HAPY_SLV}; do EchoVert " * Gestion des clés SSH" echo copy_ssh_id ${host} + if [ $master = 2 ]; then + continue + fi if [ $master = 0 ]; then copy_files ${host} fi @@ -211,9 +212,9 @@ for host in ${HAPY_SLV}; do fi fi fi - sync_nodes if [[ ${HAPY_HA} != "oui" ]] then + sync_nodes wait_node_ok ${HAPY_SLV[${i}]} if [[ ${?} -ne 0 ]] then From dfa08819fefcd853c13ac7d331dcdd32d1c47edf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20Cuissinat?= Date: Fri, 29 Mar 2019 16:47:27 +0100 Subject: [PATCH 2/4] * 29_one-master.xml : mySQL => MySQL --- dicos/29_one-master.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dicos/29_one-master.xml b/dicos/29_one-master.xml index 7657de7..7a61fa3 100644 --- a/dicos/29_one-master.xml +++ b/dicos/29_one-master.xml @@ -51,7 +51,7 @@ sqlite - + 3306 From 0d68553e4c27b782bedc141292d560c1dfe38903 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20Cuissinat?= Date: Fri, 29 Mar 2019 17:13:05 +0100 Subject: [PATCH 3/4] * 29_one-master.xml : minimalist correction for template 60-one Ref: #27290 --- dicos/29_one-master.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/dicos/29_one-master.xml b/dicos/29_one-master.xml index 7a61fa3..3fad953 100644 --- a/dicos/29_one-master.xml +++ b/dicos/29_one-master.xml @@ -174,6 +174,7 @@ non onesinglenode + one_ha Modèle one_ds_system_prefix one_ds_iso_name From 17f759bc08351c4d5272a09e44a50136c806a7af Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Tue, 2 Apr 2019 17:11:47 +0200 Subject: [PATCH 4/4] personnalisation des valeurs max connexion et keepalive --- dicos/29_one-master.xml | 15 +++++++++++++++ tmpl/oned.conf | 16 ++++++++-------- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/dicos/29_one-master.xml b/dicos/29_one-master.xml index 3fad953..758fbb4 100644 --- a/dicos/29_one-master.xml +++ b/dicos/29_one-master.xml @@ -113,6 +113,18 @@ + + 15 + + + 15 + + + 30 + + + NO + @@ -157,6 +169,9 @@ ['openvswitch'] + + ['YES', 'NO'] + openvswitch vnet_pilote diff --git a/tmpl/oned.conf b/tmpl/oned.conf index ed0b407..827b3a2 100644 --- a/tmpl/oned.conf +++ b/tmpl/oned.conf @@ -164,12 +164,12 @@ FEDERATION = [ ] RAFT = [ - LIMIT_PURGE = 100000, - LOG_RETENTION = 500000, - LOG_PURGE_TIMEOUT = 600, + LIMIT_PURGE = 1000, + LOG_RETENTION = 5000, + LOG_PURGE_TIMEOUT = 60, ELECTION_TIMEOUT_MS = 2500, BROADCAST_TIMEOUT_MS = 500, - XMLRPC_TIMEOUT_MS = 450 + XMLRPC_TIMEOUT_MS = 5000 ] %if %%activer_one_ha == 'oui' @@ -241,12 +241,12 @@ DEFAULT_COST = [ # %% -- % #******************************************************************************* -#MAX_CONN = 15 -#MAX_CONN_BACKLOG = 15 +MAX_CONN = %%one_max_conn +MAX_CONN_BACKLOG = %%one_max_conn_backlog #KEEPALIVE_TIMEOUT = 15 -#KEEPALIVE_MAX_CONN = 30 +KEEPALIVE_MAX_CONN = %%one_keepalive_timeout #TIMEOUT = 15 -#RPC_LOG = NO +RPC_LOG = %%one_rpc_log #MESSAGE_SIZE = 1073741824 #LOG_CALL_FORMAT = "Req:%i UID:%u %m invoked %l20"