Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package drbd-formula for openSUSE:Factory 
checked in at 2021-03-19 16:42:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/drbd-formula (Old)
 and      /work/SRC/openSUSE:Factory/.drbd-formula.new.2401 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "drbd-formula"

Fri Mar 19 16:42:57 2021 rev:10 rq:879996 version:0.4.2+git.1616116365.1e3ab34

Changes:
--------
--- /work/SRC/openSUSE:Factory/drbd-formula/drbd-formula.changes        
2021-02-26 22:00:06.163855140 +0100
+++ /work/SRC/openSUSE:Factory/.drbd-formula.new.2401/drbd-formula.changes      
2021-03-19 16:43:09.162113715 +0100
@@ -1,0 +2,7 @@
+Thu Mar 11 05:04:03 UTC 2021 - nick wang <nw...@suse.com>
+
+- Version bump 0.4.2
+  * Fix github issue#15
+  * Rename examples to templates
+
+-------------------------------------------------------------------

Old:
----
  drbd-formula-0.4.1+git.1614327740.f74a33a.tar.gz

New:
----
  drbd-formula-0.4.2+git.1616116365.1e3ab34.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ drbd-formula.spec ++++++
--- /var/tmp/diff_new_pack.iR4pW6/_old  2021-03-19 16:43:09.734114487 +0100
+++ /var/tmp/diff_new_pack.iR4pW6/_new  2021-03-19 16:43:09.738114492 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package drbd-formula
 #
-# Copyright (c) 2019 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -16,10 +16,11 @@
 #
 
 
+%define fname drbd
+%define fdir %{_datadir}/salt-formulas
 # See also https://en.opensuse.org/openSUSE:Specfile_guidelines
-
 Name:           drbd-formula
-Version:        0.4.1+git.1614327740.f74a33a
+Version:        0.4.2+git.1616116365.1e3ab34
 Release:        0
 Summary:        DRBD deployment salt formula
 License:        Apache-2.0
@@ -27,17 +28,12 @@
 Source0:        %{name}-%{version}.tar.gz
 Requires:       drbd-utils
 Requires:       salt-shaptools >= 0.2.9
+BuildArch:      noarch
 %if 0%{?suse_version} < 1500
 Recommends:     salt-formulas-configuration
 %else
 Requires:       salt-formulas-configuration
 %endif
-BuildArch:      noarch
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-
-%define fname drbd
-%define fdir %{_datadir}/salt-formulas
-%define ftemplates templates
 
 %description
 DRBD deployment salt formula
@@ -56,24 +52,19 @@
 mkdir -p %{buildroot}%{fdir}/states/%{fname}
 mkdir -p %{buildroot}%{fdir}/metadata/%{fname}
 cp -R %{fname} %{buildroot}%{fdir}/states
-cp -R examples %{buildroot}%{fdir}/states/%{fname}/%{ftemplates}/
+cp -R templates %{buildroot}%{fdir}/states/%{fname}
 cp -R form.yml metadata.yml pillar.example README.md 
%{buildroot}%{fdir}/metadata/%{fname}
 
 %files
-%defattr(-,root,root,-)
-%if 0%{?sle_version} < 120300
-%doc README.md LICENSE
-%else
 %doc README.md
 %license LICENSE
-%endif
 
 %dir %attr(0755, root, salt) %{fdir}
 %dir %attr(0755, root, salt) %{fdir}/states
 %dir %attr(0755, root, salt) %{fdir}/metadata
 
 %attr(0755, root, salt) %{fdir}/states/%{fname}
-%attr(0755, root, salt) %{fdir}/states/%{fname}/%{ftemplates}
+%attr(0755, root, salt) %{fdir}/states/%{fname}/templates
 %attr(0755, root, salt) %{fdir}/metadata/%{fname}
 
 %changelog

++++++ _service ++++++
--- /var/tmp/diff_new_pack.iR4pW6/_old  2021-03-19 16:43:09.762114524 +0100
+++ /var/tmp/diff_new_pack.iR4pW6/_new  2021-03-19 16:43:09.762114524 +0100
@@ -4,8 +4,8 @@
     <param name="scm">git</param>
     <param name="exclude">.git</param>
     <param name="filename">drbd-formula</param>
-    <param name="versionformat">0.4.1+git.%ct.%h</param>
-    <param name="revision">f74a33a0a13f4b6c2b16889bef306619b9110053</param>
+    <param name="versionformat">0.4.2+git.%ct.%h</param>
+    <param name="revision">1e3ab3447c27973ffd184a16b8fbfc98c9284f89</param>
   </service>
 
   <service name="recompress" mode="disabled">

++++++ drbd-formula-0.4.1+git.1614327740.f74a33a.tar.gz -> 
drbd-formula-0.4.2+git.1616116365.1e3ab34.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/drbd-formula-0.4.1+git.1614327740.f74a33a/README.md 
new/drbd-formula-0.4.2+git.1616116365.1e3ab34/README.md
--- old/drbd-formula-0.4.1+git.1614327740.f74a33a/README.md     2021-02-26 
09:22:20.000000000 +0100
+++ new/drbd-formula-0.4.2+git.1616116365.1e3ab34/README.md     2021-03-19 
02:12:45.000000000 +0100
@@ -1,10 +1,10 @@
-![Formula 
CI](https://github.com/SUSE/drbd-formula/drbd-formula/workflows/Formula%20CI/badge.svg)
+[![Formula 
CI](https://github.com/SUSE/drbd-formula/actions/workflows/drbd-formula-ci.yml/badge.svg)](https://github.com/SUSE/drbd-formula/actions/workflows/drbd-formula-ci.yml)
 
 # drbd-formula
 
 # Version
 
-0.4.1
+0.4.2
 
 # DRBD bootstrap salt formula
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/drbd-formula-0.4.1+git.1614327740.f74a33a/_service 
new/drbd-formula-0.4.2+git.1616116365.1e3ab34/_service
--- old/drbd-formula-0.4.1+git.1614327740.f74a33a/_service      2021-02-26 
09:22:20.000000000 +0100
+++ new/drbd-formula-0.4.2+git.1616116365.1e3ab34/_service      2021-03-19 
02:12:45.000000000 +0100
@@ -4,7 +4,7 @@
     <param name="scm">git</param>
     <param name="exclude">.git</param>
     <param name="filename">drbd-formula</param>
-    <param name="versionformat">0.4.1+git.%ct.%h</param>
+    <param name="versionformat">0.4.2+git.%ct.%h</param>
     <param name="revision">%%VERSION%%</param>
   </service>
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/drbd-formula-0.4.1+git.1614327740.f74a33a/drbd-formula.changes 
new/drbd-formula-0.4.2+git.1616116365.1e3ab34/drbd-formula.changes
--- old/drbd-formula-0.4.1+git.1614327740.f74a33a/drbd-formula.changes  
2021-02-26 09:22:20.000000000 +0100
+++ new/drbd-formula-0.4.2+git.1616116365.1e3ab34/drbd-formula.changes  
2021-03-19 02:12:45.000000000 +0100
@@ -1,4 +1,11 @@
 -------------------------------------------------------------------
+Thu Mar 11 05:04:03 UTC 2021 - nick wang <nw...@suse.com>
+
+- Version bump 0.4.2
+  * Fix github issue#15
+  * Rename examples to templates
+
+-------------------------------------------------------------------
 Wed Feb 24 08:30:45 UTC 2021 - nick wang <nw...@suse.com>
 
 - Version bump 0.4.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/drbd-formula-0.4.1+git.1614327740.f74a33a/drbd-formula.spec 
new/drbd-formula-0.4.2+git.1616116365.1e3ab34/drbd-formula.spec
--- old/drbd-formula-0.4.1+git.1614327740.f74a33a/drbd-formula.spec     
2021-02-26 09:22:20.000000000 +0100
+++ new/drbd-formula-0.4.2+git.1616116365.1e3ab34/drbd-formula.spec     
2021-03-19 02:12:45.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package drbd-formula
 #
-# Copyright (c) 2019 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -16,8 +16,9 @@
 #
 
 
+%define fname drbd
+%define fdir %{_datadir}/salt-formulas
 # See also https://en.opensuse.org/openSUSE:Specfile_guidelines
-
 Name:           drbd-formula
 Version:        0
 Release:        0
@@ -27,17 +28,12 @@
 Source0:        %{name}-%{version}.tar.gz
 Requires:       drbd-utils
 Requires:       salt-shaptools >= 0.2.9
+BuildArch:      noarch
 %if 0%{?suse_version} < 1500
 Recommends:     salt-formulas-configuration
 %else
 Requires:       salt-formulas-configuration
 %endif
-BuildArch:      noarch
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-
-%define fname drbd
-%define fdir %{_datadir}/salt-formulas
-%define ftemplates templates
 
 %description
 DRBD deployment salt formula
@@ -56,24 +52,19 @@
 mkdir -p %{buildroot}%{fdir}/states/%{fname}
 mkdir -p %{buildroot}%{fdir}/metadata/%{fname}
 cp -R %{fname} %{buildroot}%{fdir}/states
-cp -R examples %{buildroot}%{fdir}/states/%{fname}/%{ftemplates}/
+cp -R templates %{buildroot}%{fdir}/states/%{fname}
 cp -R form.yml metadata.yml pillar.example README.md 
%{buildroot}%{fdir}/metadata/%{fname}
 
 %files
-%defattr(-,root,root,-)
-%if 0%{?sle_version} < 120300
-%doc README.md LICENSE
-%else
 %doc README.md
 %license LICENSE
-%endif
 
 %dir %attr(0755, root, salt) %{fdir}
 %dir %attr(0755, root, salt) %{fdir}/states
 %dir %attr(0755, root, salt) %{fdir}/metadata
 
 %attr(0755, root, salt) %{fdir}/states/%{fname}
-%attr(0755, root, salt) %{fdir}/states/%{fname}/%{ftemplates}
+%attr(0755, root, salt) %{fdir}/states/%{fname}/templates
 %attr(0755, root, salt) %{fdir}/metadata/%{fname}
 
 %changelog
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/drbd-formula-0.4.1+git.1614327740.f74a33a/examples/README.md 
new/drbd-formula-0.4.2+git.1616116365.1e3ab34/examples/README.md
--- old/drbd-formula-0.4.1+git.1614327740.f74a33a/examples/README.md    
2021-02-26 09:22:20.000000000 +0100
+++ new/drbd-formula-0.4.2+git.1616116365.1e3ab34/examples/README.md    
1970-01-01 01:00:00.000000000 +0100
@@ -1,23 +0,0 @@
-``drbd_with_nfs`` via 
[habootstrap-formula](https://github.com/SUSE/habootstrap-formula.git)
--------------------
-> Load NFS module/service.\
-> Configure ms DRBD resources.\
-> Format and setup NFS on top of DRBD resources.\
-> Each NFS group has a virtual IP.
-
-
-* [Jinja template for drbd with nfs of crm 
resource](./with_pacemaker/drbd_with_nfs_crm.j2)
-* [Pillar: DRBD formula](./pillar.example.drbd)
-* [Pillar: habootstrap formula](./with_pacemaker/pillar.example.cluster)
-
-
-``drbd_with_nfs`` via 
[nfs-formula](https://github.com/saltstack-formulas/nfs-formula)
--------------------
-*Should run nfs.server on DRBD master only*
-
-> Configure NFS exports.\
-> Load NFS kernel module/servicer.
-
-
-* [Pillar: DRBD formula](./pillar.example.drbd)
-* [Pillar: NFS formula](./without_pacemakerout/pillar.example.nfs)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/drbd-formula-0.4.1+git.1614327740.f74a33a/examples/pillar.example.drbd 
new/drbd-formula-0.4.2+git.1616116365.1e3ab34/examples/pillar.example.drbd
--- old/drbd-formula-0.4.1+git.1614327740.f74a33a/examples/pillar.example.drbd  
2021-02-26 09:22:20.000000000 +0100
+++ new/drbd-formula-0.4.2+git.1616116365.1e3ab34/examples/pillar.example.drbd  
1970-01-01 01:00:00.000000000 +0100
@@ -1,124 +0,0 @@
-# -*- mode: yaml -*-
-# vim: ft=yaml
-
-drbd:
-  ## Install required package to manage DRBD
-  #install_packages: false
-
-  ## Configure DRBD in pacemaker cluster
-  #with_ha: false
-
-  ## Pirmary node when promoting DRBD
-  ## TODO: Only support single primary currently
-  promotion: "drbd-node1"
-
-  ## Resource template for /etc/drbd.d/xxx.res
-  #res_template: "res_single_vol_v9.j2"
-
-  ## Perform initial sync for DRBD resources
-  #need_init_sync: true
-
-  ## Optional: interval check time for waiting for resource synced
-  #sync_interval: 10
-
-  ## Optional: timeout for waiting for resource synced
-  #sync_timeout: 2000
-
-  ## Optional: format the DRBD resource after initial resync
-  #need_format: true
-
-  ## Optional: stop the DRBD resources after initial resync
-  #stop_after_init_sync: true
-
-
-  ## Configures some "global" parameters of /etc/drbd.d/global_common.conf
-  #global:
-  #  # Optional: Participate in DRBD's online usage counter
-  #  usage_count: "no"
-  #  # Optional: A sizing hint for DRBD to right-size various memory pools.
-  #  minor_count: 9
-  #  # Optional: The user dialog redraws the second count every time seconds
-  #  dialog_refresh: 1
-
-
-  ## Configures some "common" parameters of /etc/drbd.d/global_common.conf
-  #common:
-  #  # This section is used to fine tune the behaviour of the resource object
-  #  options:
-  #    # Optional: Cluster partition requires quorum to modify the replicated 
data set.
-  #    quorum: "off"
-
-  #  # This section is used to fine tune DRBD's properties.
-  #  net:
-  #    # Optional: you may assign the primary role to both nodes.
-  #    multi_primaries: "no"
-  #    # Optional: preventive measures to avoid situations where both nodes 
are primary and disconnected(AKA split brain)
-  #    fencing: "resource-and-stonith"
-  #    # Optional: split brain handler when no primary
-  #    after_sb_0pri: "discard-zero-changes"
-  #    # Optional: split brain handler when one primary
-  #    after_sb_1pri: "discard-secondary"
-  #    # Optional: split brain handler when two primaries
-  #    after_sb_2pri: "disconnect"
-
-  #  # Define handlers (executables) that are started by the DRBD system in 
response to certain events.
-  #  handlers:
-  #    # Optional: This handler is called in case the node needs to fence the 
peer's disk
-  #    fence_peer: "/usr/lib/drbd/crm-fence-peer.9.sh"
-  #    # Optional: This handler is called in case the node needs to unfence 
the peer's disk
-  #    unfence_peer: "/usr/lib/drbd/crm-unfence-peer.9.sh"
-  #    # Optional: This handler is called before a resync begins on the node 
that becomes resync target.
-  #    before_resync_target: "/usr/lib/drbd/snapshot-resync-target-lvm.sh -p 
15 -- -c 16k"
-  #    # Optional: This handler is called after a resync operation finished on 
the node.
-  #    after_resync_target: "/usr/lib/drbd/unsnapshot-resync-target-lvm.sh"
-  #    # Optional: DRBD detected a split brain situation but remains 
unresolved. This handler should alert someone.
-  #    split_brain: "/usr/lib/drbd/notify-split-brain.sh root"
-
-
-  resource:
-    - name: "beijing"
-      device: "/dev/drbd5"
-      disk: "/dev/vdb1"
-
-      fixed_rate:  true
-      c_plan_ahead: 20
-      c_max_rate: "100M"
-      c_fill_target: "10M"
-
-      # Salt specific
-      file_system: "xfs"
-      mount_point: "/mnt/fs-A"
-      virtual_ip: "192.168.10.201"
-
-      nodes:
-        - name: "drbd-node1"
-          ip: "192.168.10.101"
-          port: 7990
-          id: 1
-        - name: "drbd-node2"
-          ip: "192.168.10.102"
-          port: 7990
-          id: 2
-
-    - name: "shanghai"
-      device: "/dev/drbd6"
-      disk: "/dev/vdb2"
-      on_io_error: "detach"
-
-      fixed_rate:  True
-      resync_rate: "150M"
-
-      # Salt specific
-      file_system: "ext4"
-      mount_point: "/mnt/fs-B"
-      virtual_ip: "192.168.10.202"
-
-      nodes:
-        - name: "drbd-node1"
-          ip: "192.168.10.101"
-          port: 7982
-          id: 1
-        - name: "drbd-node2"
-          ip: "192.168.10.102"
-          port: 7982
-          id: 2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/drbd-formula-0.4.1+git.1614327740.f74a33a/examples/with_pacemaker/drbd_with_nfs_crm.j2
 
new/drbd-formula-0.4.2+git.1616116365.1e3ab34/examples/with_pacemaker/drbd_with_nfs_crm.j2
--- 
old/drbd-formula-0.4.1+git.1614327740.f74a33a/examples/with_pacemaker/drbd_with_nfs_crm.j2
  2021-02-26 09:22:20.000000000 +0100
+++ 
new/drbd-formula-0.4.2+git.1616116365.1e3ab34/examples/with_pacemaker/drbd_with_nfs_crm.j2
  1970-01-01 01:00:00.000000000 +0100
@@ -1,54 +0,0 @@
-{% set data = pillar.cluster.configure.template.parameters %}
-{% set drbd = salt['pillar.get']('drbd', merge=True) %}
-{% set nfsid = 1 %}
-
-#
-# defaults and production DRBD
-#
-
-rsc_defaults \
-    resource-stickiness="1000" \
-    migration-threshold="5000"
-
-op_defaults \
-    timeout="600"
-
-primitive nfsserver systemd:nfs-server \
-        op monitor interval=30s
-clone cl-nfsserver nfsserver \
-        meta interleave=true
-
-# Need to edit drbd pillar file.
-{% for res in drbd.resource %}
-primitive drbd-{{ res.name }} ocf:linbit:drbd \
-          params drbd_resource={{ res.name }} \
-          op monitor interval=15 role=Master \
-          op monitor interval=30 role=Slave
-
-ms ms_{{ res.name }} drbd-{{ res.name }} \
-   meta master-max=1 master-node-max=1 \
-   meta clone-max={{ res.nodes | length }} clone-node-max=1 \
-   meta notify=true target-role=Started
-
-primitive fs_{{ res.name }} ocf:heartbeat:Filesystem \
-   params device={{ res.device }} directory={{ res.mount_point}} fstype={{ 
res.file_system }} \
-   options=noatime,nodiratime \
-   op monitor interval="20" timeout="40s"
-
-primitive test-IP_{{ res.name }} IPaddr2 \
-        params ip={{ res.virtual_ip }}
-
-primitive exportfs_work_{{ res.name }} exportfs \
-        params directory={{ res.mount_point }} fsid={{ nfsid + loop.index0 }} \
-        options="rw,async,no_subtree_check" clientspec="*" 
wait_for_leasetime_on_stop=true \
-        op monitor interval=30s
-group g-nfs_{{ res.name }} fs_{{ res.name }} test-IP_{{ res.name }} 
exportfs_work_{{ res.name }}
-
-order o_drbd_{{ res.name }}-before-fs_{{ res.name }} \
-  ms_{{ res.name }}:promote g-nfs_{{ res.name }}:start
-colocation c_fs_{{ res.name }}-with_drbd_{{ res.name }} \
-  inf: g-nfs_{{ res.name }} ms_{{ res.name }}:Master
-{% endfor %}
-
-primitive extra-IP IPaddr2 \
-        params ip={{ data.virtual_ip }}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/drbd-formula-0.4.1+git.1614327740.f74a33a/examples/with_pacemaker/pillar.example.cluster
 
new/drbd-formula-0.4.2+git.1616116365.1e3ab34/examples/with_pacemaker/pillar.example.cluster
--- 
old/drbd-formula-0.4.1+git.1614327740.f74a33a/examples/with_pacemaker/pillar.example.cluster
        2021-02-26 09:22:20.000000000 +0100
+++ 
new/drbd-formula-0.4.2+git.1616116365.1e3ab34/examples/with_pacemaker/pillar.example.cluster
        1970-01-01 01:00:00.000000000 +0100
@@ -1,25 +0,0 @@
-cluster:
-  name: 'hacluster'
-  init: 'drbd-node1'
-  interface: 'eth0'
-  join_timer: 20
-  watchdog:
-    module: softdog
-    device: /dev/watchdog
-  sbd:
-    device: '/dev/vdc'
-  ntp: pool.ntp.org
-  install_packages: false
-  sshkeys:
-    overwrite: true
-    password: suse
-  configure:
-    method: 'update'
-    template:
-      source: /tmp/drbd_with_nfs_crm.j2
-      parameters:
-        virtual_ip: 192.168.10.200
-        virtual_ip_mask: 24
-        platform: libvirt
-        prefer_takeover: true
-        auto_register: false
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/drbd-formula-0.4.1+git.1614327740.f74a33a/examples/without_pacemaker/pillar.example.nfs
 
new/drbd-formula-0.4.2+git.1616116365.1e3ab34/examples/without_pacemaker/pillar.example.nfs
--- 
old/drbd-formula-0.4.1+git.1614327740.f74a33a/examples/without_pacemaker/pillar.example.nfs
 2021-02-26 09:22:20.000000000 +0100
+++ 
new/drbd-formula-0.4.2+git.1616116365.1e3ab34/examples/without_pacemaker/pillar.example.nfs
 1970-01-01 01:00:00.000000000 +0100
@@ -1,27 +0,0 @@
-nfs:
-  # Global settings:
-  mkmnt: False
-  mount_opts: noauto,ro
-  persist_unmount: True
-  persist_mount: False
-
-  # Server settings
-  server:
-    exports:
-      /mnt/fs-A: "*(rw,sync,no_subtree_check)"
-      /mnt/fs-B: "*(rw,sync,no_subtree_check)"
-
-  # mount settings
-  mount:
-    somename:
-      mountpoint: "/mnt/local-A"
-      location: "drbd-node1:/mnt/fs-A"
-      opts: "vers=3,rsize=65535,wsize=65535"
-      persist: False
-      mkmnt: True
-
-  unmount:
-    someothername:
-      mountpoint: "/mnt/local-A"
-      location: "drbd-node1:/mnt/fs-A"
-      persist: False
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/drbd-formula-0.4.1+git.1614327740.f74a33a/form.yml 
new/drbd-formula-0.4.2+git.1616116365.1e3ab34/form.yml
--- old/drbd-formula-0.4.1+git.1614327740.f74a33a/form.yml      2021-02-26 
09:22:20.000000000 +0100
+++ new/drbd-formula-0.4.2+git.1616116365.1e3ab34/form.yml      2021-03-19 
02:12:45.000000000 +0100
@@ -240,13 +240,13 @@
         $type: boolean
         $default: true
 
-      resync_rate: 
+      resync_rate:
         $visibleIf: .fixed_rate == true
         $name: Fixed sync rate
         $optional: true
         $default: "150M"
 
-      c_plan_ahead: 
+      c_plan_ahead:
         $visibleIf: .fixed_rate == false
         $name: C plan ahead
         $help: Dynamically control the resync speed
@@ -254,7 +254,7 @@
         $type: number
         $default: 20
 
-      c_max_rate: 
+      c_max_rate:
         $visibleIf: .fixed_rate == false
         $name: C max rate
         $help: Max rate of dynamically resync rate
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/drbd-formula-0.4.1+git.1614327740.f74a33a/templates/README.md 
new/drbd-formula-0.4.2+git.1616116365.1e3ab34/templates/README.md
--- old/drbd-formula-0.4.1+git.1614327740.f74a33a/templates/README.md   
1970-01-01 01:00:00.000000000 +0100
+++ new/drbd-formula-0.4.2+git.1616116365.1e3ab34/templates/README.md   
2021-03-19 02:12:45.000000000 +0100
@@ -0,0 +1,33 @@
+``NFS on top of DRBD with HA cluster`` via 
[habootstrap-formula](https://github.com/SUSE/habootstrap-formula.git)
+-------------------
+> Support libvirt/azure/aws/gcp.\
+> Load NFS module/service.\
+> Configure ms DRBD resources.\
+> Format and setup NFS on top of DRBD resources.\
+> Each NFS group has a virtual IP.
+
+
+* [Jinja template for drbd with nfs of crm resource 
simple](./habootstrap-formula/cluster_resources_nfs.j2)
+* [Jinja template for drbd with nfs of crm resource with 
cloud](./habootstrap-formula/cluster_resources_nfs_cloud.j2)
+* [Pillar: DRBD formula](./pillar.example.drbd)
+* [Pillar: habootstrap formula](./habootstrap-formula/pillar.example.cluster)
+
+
+``NFS on top of DRBD`` via 
[nfs-formula](https://github.com/saltstack-formulas/nfs-formula)
+-------------------
+*Should run nfs.server on DRBD master only*
+
+> Configure NFS exports.\
+> Load NFS kernel module/servicer.
+
+
+* [Pillar: DRBD formula](./pillar.example.drbd)
+* [Pillar: NFS formula](./nfs-formula/pillar.example.nfs)
+
+
+``drbd split brain script`` via 
[ha-cluster-exporter](https://github.com/ClusterLabs/ha_cluster_exporter.git)
+-------------------
+> Support ha_cluster_exporter monitor DRBD split brain status.
+
+
+* [Exporter: ha_cluster_exporter monitor for 
split-brain](./ha_cluster_exporter/notify-split-brain-haclusterexporter-suse-metric.sh)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/drbd-formula-0.4.1+git.1614327740.f74a33a/templates/ha_cluster_exporter/notify-split-brain-haclusterexporter-suse-metric.sh
 
new/drbd-formula-0.4.2+git.1616116365.1e3ab34/templates/ha_cluster_exporter/notify-split-brain-haclusterexporter-suse-metric.sh
--- 
old/drbd-formula-0.4.1+git.1614327740.f74a33a/templates/ha_cluster_exporter/notify-split-brain-haclusterexporter-suse-metric.sh
     1970-01-01 01:00:00.000000000 +0100
+++ 
new/drbd-formula-0.4.2+git.1616116365.1e3ab34/templates/ha_cluster_exporter/notify-split-brain-haclusterexporter-suse-metric.sh
     2021-03-19 02:12:45.000000000 +0100
@@ -0,0 +1,14 @@
+#! /bin/bash
+
+# this is a custom handler for drbd splitbrain
+# see upstream doc 
https://docs.linbit.com/docs/users-guide-8.4/#s-configure-split-brain-behavior
+
+# the main goal of this handler signal via file when the splitbrain mechanism 
occurs.
+# the handler create a simple file which is then tracked by the 
ha_cluster_exporter https://github.com/ClusterLabs/ha_cluster_exporter
+# and from this file we create a metrics for detecting splitbrain and monitor 
it
+
+# remember to remove the file once the drbd splitbrain is over, otherwise the 
exporter will always set the metric of splitbrain to present
+
+TMP_LOCATION="/var/run/drbd/splitbrain"
+mkdir -p $TMP_LOCATION
+echo "DRBD split-brain detected! Please remove this file once the split-brain 
is fixed." > 
${TMP_LOCATION}/drbd-split-brain-detected-$DRBD_RESOURCE-$DRBD_VOLUME
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/drbd-formula-0.4.1+git.1614327740.f74a33a/templates/habootstrap-formula/cluster_resources_nfs.j2
 
new/drbd-formula-0.4.2+git.1616116365.1e3ab34/templates/habootstrap-formula/cluster_resources_nfs.j2
--- 
old/drbd-formula-0.4.1+git.1614327740.f74a33a/templates/habootstrap-formula/cluster_resources_nfs.j2
        1970-01-01 01:00:00.000000000 +0100
+++ 
new/drbd-formula-0.4.2+git.1616116365.1e3ab34/templates/habootstrap-formula/cluster_resources_nfs.j2
        2021-03-19 02:12:45.000000000 +0100
@@ -0,0 +1,56 @@
+{%- set data = pillar.cluster.configure.template.parameters %}
+{%- set drbd = salt['pillar.get']('drbd', default={}, merge=True) %}
+{%- set nfsid = 1 %}
+
+#
+# defaults and production DRBD
+#
+
+rsc_defaults \
+  resource-stickiness="1000" \
+  migration-threshold="5000"
+
+op_defaults \
+  timeout="600"
+
+primitive nfsserver systemd:nfs-server \
+  op monitor interval=30s
+
+clone cl-nfsserver nfsserver \
+  meta interleave=true
+
+# Need to edit drbd pillar file.
+{%- for res in drbd.resource %}
+primitive drbd-{{ res.name }} ocf:linbit:drbd \
+  params drbd_resource={{ res.name }} \
+  op monitor interval=15 role=Master \
+  op monitor interval=30 role=Slave
+
+ms ms_{{ res.name }} drbd-{{ res.name }} \
+  meta master-max=1 master-node-max=1 \
+  meta clone-max={{ res.nodes | length }} clone-node-max=1 \
+  meta notify=true target-role=Started
+
+primitive fs_{{ res.name }} ocf:heartbeat:Filesystem \
+  params device={{ res.device }} directory={{ res.mount_point }} fstype={{ 
res.file_system }} \
+  options=noatime,nodiratime \
+  op monitor interval="20" timeout="40s"
+
+primitive test-IP_{{ res.name }} IPaddr2 \
+        params ip={{ res.virtual_ip }}
+
+primitive exportfs_work_{{ res.name }} exportfs \
+  params directory={{ res.mount_point }} fsid={{ nfsid + loop.index0 }} \
+  options="rw,no_root_squash" clientspec="*" wait_for_leasetime_on_stop=true \
+  op monitor interval=30s
+
+group g-nfs_{{ res.name }} fs_{{ res.name }} test-IP_{{ res.name }} 
exportfs_work_{{ res.name }}
+
+order o_drbd_{{ res.name }}-before-fs_{{ res.name }} \
+  ms_{{ res.name }}:promote g-nfs_{{ res.name }}:start
+colocation c_fs_{{ res.name }}-with_drbd_{{ res.name }} \
+  inf: g-nfs_{{ res.name }} ms_{{ res.name }}:Master
+{%- endfor %}
+
+primitive extra-IP IPaddr2 \
+        params ip={{ data.virtual_ip }}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/drbd-formula-0.4.1+git.1614327740.f74a33a/templates/habootstrap-formula/cluster_resources_nfs_cloud.j2
 
new/drbd-formula-0.4.2+git.1616116365.1e3ab34/templates/habootstrap-formula/cluster_resources_nfs_cloud.j2
--- 
old/drbd-formula-0.4.1+git.1614327740.f74a33a/templates/habootstrap-formula/cluster_resources_nfs_cloud.j2
  1970-01-01 01:00:00.000000000 +0100
+++ 
new/drbd-formula-0.4.2+git.1616116365.1e3ab34/templates/habootstrap-formula/cluster_resources_nfs_cloud.j2
  2021-03-19 02:12:45.000000000 +0100
@@ -0,0 +1,107 @@
+{%- set data = pillar.cluster.configure.template.parameters %}
+{%- set cloud_provider = grains['cloud_provider'] %}
+{%- set drbd = salt['pillar.get']('drbd', default={}, merge=True) %}
+{%- set nfsid = 1 %}
+{%- set native_fencing = data.native_fencing|default(True) %}
+
+#
+# defaults and production DRBD
+#
+
+rsc_defaults \
+  resource-stickiness="1000" \
+  migration-threshold="5000"
+
+op_defaults \
+  timeout="600"
+
+primitive nfsserver systemd:nfs-server \
+  op monitor interval=30s
+
+clone cl-nfsserver nfsserver \
+  meta interleave=true
+
+# Need to edit drbd pillar file.
+{%- for res in drbd.resource %}
+primitive drbd-{{ res.name }} ocf:linbit:drbd \
+  params drbd_resource={{ res.name }} \
+  op monitor interval=15 role=Master \
+  op monitor interval=30 role=Slave
+
+ms ms_{{ res.name }} drbd-{{ res.name }} \
+  meta master-max=1 master-node-max=1 \
+  meta clone-max={{ res.nodes | length }} clone-node-max=1 \
+  meta notify=true target-role=Started
+
+primitive fs_{{ res.name }} ocf:heartbeat:Filesystem \
+  params device={{ res.device }} directory={{ res.mount_point }} fstype={{ 
res.file_system }} \
+  options=noatime,nodiratime \
+  op monitor interval="20" timeout="40s"
+
+{%- if cloud_provider not in ["amazon-web-services", "google-cloud-platform"] 
%}
+{%- set cidr_netmask = "cidr_netmask="~data.virtual_ip_mask|default("32") %}
+{%- set nic = "nic="~pillar.cluster.interface|json if pillar.cluster.interface 
is defined else "" %}
+
+primitive vip_{{ res.name }}_nfs IPaddr2 \
+  params ip={{ res.virtual_ip }} {{ cidr_netmask }} {{ nic }} \
+  op monitor interval=10 timeout=20
+
+{%- if cloud_provider == "microsoft-azure" %}
+primitive rsc_socat_{{ res.name }}_nfs azure-lb \
+  params port={{ data.probe }} \
+  op monitor timeout=20s interval=10 depth=0
+
+{%- endif %}
+
+{%- elif cloud_provider == "google-cloud-platform" %}
+{%- if native_fencing %}
+primitive rsc_gcp_stonith_{{ res.name }}_{{ grains['host'] }} 
stonith:fence_gce \
+  params plug={{ grains['gcp_instance_name'] }} pcmk_host_map="{{ 
grains['host'] }}:{{ grains['gcp_instance_name'] }}" \
+  meta target-role=Started
+{%- endif %}
+
+primitive vip_{{ res.name }}_nfs ocf:heartbeat:gcp-vpc-move-route \
+  params ip={{ data.virtual_ip }} vpc_network={{ data.vpc_network_name }} 
route_name={{ data.route_name }} \
+  op start interval=0 timeout=180 \
+  op stop interval=0 timeout=180 \
+  op monitor interval=60 timeout=60
+
+{%- elif cloud_provider == "amazon-web-services" %}
+
+{%- if native_fencing %}
+property $id="cib-bootstrap-options" \
+    stonith-enabled="true" \
+    stonith-action="off" \
+    stonith-timeout="150s"
+
+primitive rsc_aws_stonith_{{ res.name }}_nfs stonith:external/ec2 \
+    params tag={{ data.instance_tag }} profile={{ data.cluster_profile }} \
+    op start interval=0 timeout=180 \
+    op stop interval=0 timeout=180 \
+    op monitor interval=120 timeout=60 \
+    meta target-role=Started
+{%- endif %}
+
+primitive vip_{{ res.name }}_nfs ocf:suse:aws-vpc-move-ip \
+    params ip={{ data.virtual_ip }} routing_table={{ data.route_table }} \
+    interface={{ pillar.cluster.interface|default('eth0')|json }} profile={{ 
data.cluster_profile }} \
+    op start interval=0 timeout=180 \
+    op stop interval=0 timeout=180 \
+    op monitor interval=60 timeout=60
+
+{%- endif %}
+
+primitive exportfs_work_{{ res.name }} exportfs \
+  params directory={{ res.mount_point }} fsid={{ nfsid + loop.index0 }} \
+  options="rw,no_root_squash" clientspec="*" wait_for_leasetime_on_stop=true \
+  op monitor interval=30s
+
+group g-nfs_{{ res.name }} fs_{{ res.name }} vip_{{ res.name }}_nfs 
exportfs_work_{{ res.name }} {% if cloud_provider == "microsoft-azure" %} 
rsc_socat_{{ res.name }}_nfs {% endif %}
+
+order o_drbd_{{ res.name }}-before-fs_{{ res.name }} \
+  ms_{{ res.name }}:promote g-nfs_{{ res.name }}:start
+
+colocation c_fs_{{ res.name }}-with_drbd_{{ res.name }} \
+  inf: g-nfs_{{ res.name }} ms_{{ res.name }}:Master\
+
+{%- endfor %}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/drbd-formula-0.4.1+git.1614327740.f74a33a/templates/habootstrap-formula/pillar.example.cluster
 
new/drbd-formula-0.4.2+git.1616116365.1e3ab34/templates/habootstrap-formula/pillar.example.cluster
--- 
old/drbd-formula-0.4.1+git.1614327740.f74a33a/templates/habootstrap-formula/pillar.example.cluster
  1970-01-01 01:00:00.000000000 +0100
+++ 
new/drbd-formula-0.4.2+git.1616116365.1e3ab34/templates/habootstrap-formula/pillar.example.cluster
  2021-03-19 02:12:45.000000000 +0100
@@ -0,0 +1,25 @@
+cluster:
+  name: 'hacluster'
+  init: 'drbd-node1'
+  interface: 'eth0'
+  join_timer: 20
+  watchdog:
+    module: softdog
+    device: /dev/watchdog
+  sbd:
+    device: '/dev/vdc'
+  ntp: pool.ntp.org
+  install_packages: false
+  sshkeys:
+    overwrite: true
+    password: suse
+  configure:
+    method: 'update'
+    template:
+      source: /tmp/cluster_resources_nfs.j2
+      parameters:
+        virtual_ip: 192.168.10.200
+        virtual_ip_mask: 24
+        platform: libvirt
+        prefer_takeover: true
+        auto_register: false
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/drbd-formula-0.4.1+git.1614327740.f74a33a/templates/nfs-formula/pillar.example.nfs
 
new/drbd-formula-0.4.2+git.1616116365.1e3ab34/templates/nfs-formula/pillar.example.nfs
--- 
old/drbd-formula-0.4.1+git.1614327740.f74a33a/templates/nfs-formula/pillar.example.nfs
      1970-01-01 01:00:00.000000000 +0100
+++ 
new/drbd-formula-0.4.2+git.1616116365.1e3ab34/templates/nfs-formula/pillar.example.nfs
      2021-03-19 02:12:45.000000000 +0100
@@ -0,0 +1,27 @@
+nfs:
+  # Global settings:
+  mkmnt: False
+  mount_opts: noauto,ro
+  persist_unmount: True
+  persist_mount: False
+
+  # Server settings
+  server:
+    exports:
+      /mnt/fs-A: "*(rw,sync,no_subtree_check)"
+      /mnt/fs-B: "*(rw,sync,no_subtree_check)"
+
+  # mount settings
+  mount:
+    somename:
+      mountpoint: "/mnt/local-A"
+      location: "drbd-node1:/mnt/fs-A"
+      opts: "vers=3,rsize=65535,wsize=65535"
+      persist: False
+      mkmnt: True
+
+  unmount:
+    someothername:
+      mountpoint: "/mnt/local-A"
+      location: "drbd-node1:/mnt/fs-A"
+      persist: False
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/drbd-formula-0.4.1+git.1614327740.f74a33a/templates/pillar.example.drbd 
new/drbd-formula-0.4.2+git.1616116365.1e3ab34/templates/pillar.example.drbd
--- old/drbd-formula-0.4.1+git.1614327740.f74a33a/templates/pillar.example.drbd 
1970-01-01 01:00:00.000000000 +0100
+++ new/drbd-formula-0.4.2+git.1616116365.1e3ab34/templates/pillar.example.drbd 
2021-03-19 02:12:45.000000000 +0100
@@ -0,0 +1,124 @@
+# -*- mode: yaml -*-
+# vim: ft=yaml
+
+drbd:
+  ## Install required package to manage DRBD
+  #install_packages: false
+
+  ## Configure DRBD in pacemaker cluster
+  #with_ha: false
+
+  ## Pirmary node when promoting DRBD
+  ## TODO: Only support single primary currently
+  promotion: "drbd-node1"
+
+  ## Resource template for /etc/drbd.d/xxx.res
+  #res_template: "res_single_vol_v9.j2"
+
+  ## Perform initial sync for DRBD resources
+  #need_init_sync: true
+
+  ## Optional: interval check time for waiting for resource synced
+  #sync_interval: 10
+
+  ## Optional: timeout for waiting for resource synced
+  #sync_timeout: 2000
+
+  ## Optional: format the DRBD resource after initial resync
+  #need_format: true
+
+  ## Optional: stop the DRBD resources after initial resync
+  #stop_after_init_sync: true
+
+
+  ## Configures some "global" parameters of /etc/drbd.d/global_common.conf
+  #global:
+  #  # Optional: Participate in DRBD's online usage counter
+  #  usage_count: "no"
+  #  # Optional: A sizing hint for DRBD to right-size various memory pools.
+  #  minor_count: 9
+  #  # Optional: The user dialog redraws the second count every time seconds
+  #  dialog_refresh: 1
+
+
+  ## Configures some "common" parameters of /etc/drbd.d/global_common.conf
+  #common:
+  #  # This section is used to fine tune the behaviour of the resource object
+  #  options:
+  #    # Optional: Cluster partition requires quorum to modify the replicated 
data set.
+  #    quorum: "off"
+
+  #  # This section is used to fine tune DRBD's properties.
+  #  net:
+  #    # Optional: you may assign the primary role to both nodes.
+  #    multi_primaries: "no"
+  #    # Optional: preventive measures to avoid situations where both nodes 
are primary and disconnected(AKA split brain)
+  #    fencing: "resource-and-stonith"
+  #    # Optional: split brain handler when no primary
+  #    after_sb_0pri: "discard-zero-changes"
+  #    # Optional: split brain handler when one primary
+  #    after_sb_1pri: "discard-secondary"
+  #    # Optional: split brain handler when two primaries
+  #    after_sb_2pri: "disconnect"
+
+  #  # Define handlers (executables) that are started by the DRBD system in 
response to certain events.
+  #  handlers:
+  #    # Optional: This handler is called in case the node needs to fence the 
peer's disk
+  #    fence_peer: "/usr/lib/drbd/crm-fence-peer.9.sh"
+  #    # Optional: This handler is called in case the node needs to unfence 
the peer's disk
+  #    unfence_peer: "/usr/lib/drbd/crm-unfence-peer.9.sh"
+  #    # Optional: This handler is called before a resync begins on the node 
that becomes resync target.
+  #    before_resync_target: "/usr/lib/drbd/snapshot-resync-target-lvm.sh -p 
15 -- -c 16k"
+  #    # Optional: This handler is called after a resync operation finished on 
the node.
+  #    after_resync_target: "/usr/lib/drbd/unsnapshot-resync-target-lvm.sh"
+  #    # Optional: DRBD detected a split brain situation but remains 
unresolved. This handler should alert someone.
+  #    split_brain: "/usr/lib/drbd/notify-split-brain.sh root"
+
+
+  resource:
+    - name: "beijing"
+      device: "/dev/drbd5"
+      disk: "/dev/vdb1"
+
+      fixed_rate:  true
+      c_plan_ahead: 20
+      c_max_rate: "100M"
+      c_fill_target: "10M"
+
+      # Salt specific
+      file_system: "xfs"
+      mount_point: "/mnt/fs-A"
+      virtual_ip: "192.168.10.201"
+
+      nodes:
+        - name: "drbd-node1"
+          ip: "192.168.10.101"
+          port: 7990
+          id: 1
+        - name: "drbd-node2"
+          ip: "192.168.10.102"
+          port: 7990
+          id: 2
+
+    - name: "shanghai"
+      device: "/dev/drbd6"
+      disk: "/dev/vdb2"
+      on_io_error: "detach"
+
+      fixed_rate:  True
+      resync_rate: "150M"
+
+      # Salt specific
+      file_system: "ext4"
+      mount_point: "/mnt/fs-B"
+      virtual_ip: "192.168.10.202"
+
+      nodes:
+        - name: "drbd-node1"
+          ip: "192.168.10.101"
+          port: 7982
+          id: 1
+        - name: "drbd-node2"
+          ip: "192.168.10.102"
+          port: 7982
+          id: 2

Reply via email to