From 577debc2f86dafd6338035b49511247b7627996f Mon Sep 17 00:00:00 2001 From: Peter Varkoly Date: Fri, 11 Aug 2023 13:43:44 +0200 Subject: [PATCH] nstead of csync2.socket csymc2.service will be actiwated which does not exists. After Writing corosync confiugration Write(path, nil) will not be called. This causes that the corosync configuration will not be written inmediately bug only after the module is closed. This is especially a problem if the module is loaded from another module via the import function. /etc/sysconfig/openais does not exists anymore. In code this agent will be called, which causes error logs. The corresponding SCR agent need to be removed. --- package/yast2-cluster.changes | 10 ++++++++++ package/yast2-cluster.spec | 2 +- src/modules/Cluster.rb | 9 +++------ src/scrconf/cfg_openais.scr | 16 ---------------- 4 files changed, 14 insertions(+), 23 deletions(-) delete mode 100644 src/scrconf/cfg_openais.scr diff --git a/package/yast2-cluster.changes b/package/yast2-cluster.changes index e199da9..e8e193d 100644 --- a/package/yast2-cluster.changes +++ b/package/yast2-cluster.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Thu Mar 23 07:55:52 UTC 2023 - Peter Varkoly + +- bsc#1209602 bugs in yast2-cluster Write funcion +- Remove sensless call to sysconfig.openais +- Remove sensless sysconfig.openais agent +- Enable csync2.socket +- Add SCR.Write(PATH,nil) to save the configuration inmediately +- Version 4.3.8 + ------------------------------------------------------------------- Thu Nov 3 06:08:28 UTC 2022 - XinLiang diff --git a/package/yast2-cluster.spec b/package/yast2-cluster.spec index 121328a..9b3608a 100644 --- a/package/yast2-cluster.spec +++ b/package/yast2-cluster.spec @@ -18,7 +18,7 @@ %define _fwdefdir %{_prefix}/lib/firewalld/services Name: yast2-cluster -Version: 4.3.7 +Version: 4.3.8 Release: 0 Summary: Configuration of cluster License: GPL-2.0-only diff --git a/src/modules/Cluster.rb b/src/modules/Cluster.rb index 8d9870b..bdbafde 100644 --- a/src/modules/Cluster.rb +++ b/src/modules/Cluster.rb @@ -531,13 +531,10 @@ def save_csync2_conf SCR.Write(path(".csync2_ha.value.ha_group.host"), @csync2_host) SCR.Write(path(".csync2_ha.value.ha_group.include"), @csync2_include) SCR.Write(path(".csync2_ha.value.ha_group.key"), [@csync2_key_file]) + SCR.Write(path(".csync2_ha"), nil) SCR.Write(path(".sysconfig.pacemaker.LRMD_MAX_CHILDREN"), 4) - SCR.Write( - path(".sysconfig.openais.COROSYNC_DEFAULT_CONFIG_IFACE"), - "openaisserviceenableexperimental:corosync_parser" - ) - + SCR.Write(path(".sysconfig.pacemaker"), nil) nil end @@ -747,7 +744,7 @@ def Write SCR.Execute(path(".target.bash_output"), "systemctl enable corosync.service") end if @global_startcsync2 == true - SCR.Execute(path(".target.bash_output"), "systemctl enable csync2") + SCR.Execute(path(".target.bash_output"), "systemctl enable csync2.socket") end return false if Abort() diff --git a/src/scrconf/cfg_openais.scr b/src/scrconf/cfg_openais.scr deleted file mode 100644 index 858c1cd..0000000 --- a/src/scrconf/cfg_openais.scr +++ /dev/null @@ -1,16 +0,0 @@ -/** - * File: cfg_openais.scr - * Summary: Agent for reading/writing /etc/sysconfig/openais - * Author: Klaus Kaempf - * Access: read / write - * - * $Id: cfg_openais.scr 13069 2003-12-16 09:30:51Z jsrain $ - * - * Read/Sets the values defined in /etc/sysconfig/openais - * in an easy manner. - */ -.sysconfig.openais - -`ag_ini( - `SysConfigFile("/etc/sysconfig/openais") -)