Hello community, here is the log from the commit of package yast2-drbd for openSUSE:Factory checked in at 2015-11-22 11:00:36 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-drbd (Old) and /work/SRC/openSUSE:Factory/.yast2-drbd.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-drbd" Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-drbd/yast2-drbd.changes 2015-11-12 19:41:41.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.yast2-drbd.new/yast2-drbd.changes 2015-11-22 11:02:39.000000000 +0100 @@ -1,0 +2,6 @@ +Thu Nov 19 09:03:24 UTC 2015 - [email protected] + +- BSC#955564. Allow user to configure "use_lvmetad" for lvm. +- Version 3.1.19 + +------------------------------------------------------------------- Old: ---- yast2-drbd-3.1.18.tar.bz2 New: ---- yast2-drbd-3.1.19.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-drbd.spec ++++++ --- /var/tmp/diff_new_pack.mtOmB4/_old 2015-11-22 11:02:40.000000000 +0100 +++ /var/tmp/diff_new_pack.mtOmB4/_new 2015-11-22 11:02:40.000000000 +0100 @@ -17,7 +17,7 @@ Name: yast2-drbd -Version: 3.1.18 +Version: 3.1.19 Release: 0 %define _fwdefdir /etc/sysconfig/SuSEfirewall2.d/services ++++++ yast2-drbd-3.1.18.tar.bz2 -> yast2-drbd-3.1.19.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-drbd-3.1.18/package/yast2-drbd.changes new/yast2-drbd-3.1.19/package/yast2-drbd.changes --- old/yast2-drbd-3.1.18/package/yast2-drbd.changes 2015-11-12 10:06:11.000000000 +0100 +++ new/yast2-drbd-3.1.19/package/yast2-drbd.changes 2015-11-19 11:01:17.000000000 +0100 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Thu Nov 19 09:03:24 UTC 2015 - [email protected] + +- BSC#955564. Allow user to configure "use_lvmetad" for lvm. +- Version 3.1.19 + +------------------------------------------------------------------- Thu Nov 12 08:03:39 UTC 2015 - [email protected] - BSC#954393. Support "options" section in global_common.conf diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-drbd-3.1.18/package/yast2-drbd.spec new/yast2-drbd-3.1.19/package/yast2-drbd.spec --- old/yast2-drbd-3.1.18/package/yast2-drbd.spec 2015-11-12 10:06:11.000000000 +0100 +++ new/yast2-drbd-3.1.19/package/yast2-drbd.spec 2015-11-19 11:01:17.000000000 +0100 @@ -17,7 +17,7 @@ Name: yast2-drbd -Version: 3.1.18 +Version: 3.1.19 Release: 0 %define _fwdefdir /etc/sysconfig/SuSEfirewall2.d/services diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-drbd-3.1.18/src/include/drbd/helps.rb new/yast2-drbd-3.1.19/src/include/drbd/helps.rb --- old/yast2-drbd-3.1.18/src/include/drbd/helps.rb 2015-11-12 10:06:11.000000000 +0100 +++ new/yast2-drbd-3.1.19/src/include/drbd/helps.rb 2015-11-19 11:01:17.000000000 +0100 @@ -125,6 +125,8 @@ "\n" + "\t\t<p><b>LVM cache</b>: Enable/turn on writing the LVM cache is default. Disable cache when for network storage, like nfs. </p>\n" + "\n" + + "\t\t<p><b>LVMetad</b>: When lvmetad is enable, the volume group metadata and PV state flags are obtained from the lvmetad instance and no scanning is done by the individual commands. Since cache of lvmetad can not sync between nodes, should not use lvmetad(disable) when working in cluster environment.</p>\n" + + "\n" + "\t\t" ), "global_conf" => _( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-drbd-3.1.18/src/include/drbd/lvm_conf.rb new/yast2-drbd-3.1.19/src/include/drbd/lvm_conf.rb --- old/yast2-drbd-3.1.18/src/include/drbd/lvm_conf.rb 2015-11-12 10:06:11.000000000 +0100 +++ new/yast2-drbd-3.1.19/src/include/drbd/lvm_conf.rb 2015-11-19 11:01:17.000000000 +0100 @@ -14,14 +14,22 @@ @filter = "" @cache = true + @lvmetad = false + # Default is always true (auto) @auto_lvm_filter = true end def lvm_conf_Read @filter = Ops.get_string( Drbd.lvm_config, "filter", "" ) - cache_str = Ops.get_string( Drbd.lvm_config, "write_cache_state", "1" ) + lvmetad_str = Ops.get_string( Drbd.lvm_config, "use_lvmetad", "0" ) + if lvmetad_str == "0" + @lvmetad = false + else + @lvmetad = true + end + cache_str = Ops.get_string( Drbd.lvm_config, "write_cache_state", "1" ) if cache_str == "0" @cache = false else @@ -80,10 +88,37 @@ ) ) + _Tlvmetad = Frame( + _("Use lvmetad for LVM"), + Left( + HSquash( + VBox( + VBox( + Left( + CheckBox( + Id(:LVMetad), + Opt(:notify), + _("Use LVM metad"), + @lvmetad + ) + ), + Left(Label( + _( + "Warning! Should not use lvmetad for cluster." + ) + )), + ), + ) + ) + ) + ) + VBox( _Tfilter, VSpacing(1), _Tcache, + VSpacing(1), + _Tlvmetad, VStretch() ) end @@ -93,15 +128,22 @@ @auto_lvm_filter = UI.QueryWidget(Id(:AutoFilter), :Value) @cache = UI.QueryWidget(Id(:LVMCache), :Value) - if @cache cache_str = "1" else cache_str = "0" end + @lvmetad = UI.QueryWidget(Id(:LVMetad), :Value) + if @lvmetad + lvmetad_str = "1" + else + lvmetad_str = "0" + end + Drbd.auto_lvm_filter = @auto_lvm_filter Ops.set(Drbd.lvm_config, "write_cache_state", cache_str) + Ops.set(Drbd.lvm_config, "use_lvmetad", lvmetad_str) if !@auto_lvm_filter Ops.set(Drbd.lvm_config, "filter", @filter) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-drbd-3.1.18/src/modules/Drbd.rb new/yast2-drbd-3.1.19/src/modules/Drbd.rb --- old/yast2-drbd-3.1.18/src/modules/Drbd.rb 2015-11-12 10:06:11.000000000 +0100 +++ new/yast2-drbd-3.1.19/src/modules/Drbd.rb 2015-11-19 11:01:17.000000000 +0100 @@ -298,6 +298,16 @@ end #read LVM configs via /etc/lvm/lvm.conf + #Disable use_lvmetad when using yast drbd to avoid lvmetad + #in cluster environment, but it may also effect regular usage + #Manually enable use_lvmetad in this case + val = Convert.to_string( + SCR.Read(Builtins.topath(Builtins.sformat(".drbd_lvm.value.global.%1", + "use_lvmetad"))) + ) + Ops.set(@lvm_config, "use_lvmetad", val) + y2debug("drbd_lvm.global.%1 is %2", "use_lvmetad", val) + #All of them under "devices" section ["filter", "write_cache_state", "cache_dir"].each do |key| val = Convert.to_string( @@ -683,6 +693,13 @@ end end + if Ops.get(@lvm_config, "use_lvmetad") != nil + SCR.Write( + Builtins.topath(Builtins.sformat(".drbd_lvm.value.global.%1", "use_lvmetad")), + Ops.get(@lvm_config, "use_lvmetad") + ) + end + if Ops.get(@lvm_config, "write_cache_state") == "0" SCR.Execute( path(".target.bash"),
