Hello community, here is the log from the commit of package drbd-formula for openSUSE:Factory checked in at 2019-11-13 13:29:16 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/drbd-formula (Old) and /work/SRC/openSUSE:Factory/.drbd-formula.new.2990 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "drbd-formula" Wed Nov 13 13:29:16 2019 rev:2 rq:748127 version:0.3.6 Changes: -------- --- /work/SRC/openSUSE:Factory/drbd-formula/drbd-formula.changes 2019-07-11 13:17:06.686791624 +0200 +++ /work/SRC/openSUSE:Factory/.drbd-formula.new.2990/drbd-formula.changes 2019-11-13 13:29:19.987760779 +0100 @@ -1,0 +2,55 @@ +Wed Nov 13 09:31:49 UTC 2019 - Xabier Arbulu <xarb...@suse.com> + +- Version 0.3.6 + * Remove additional_repos salt state + +------------------------------------------------------------------- +Mon Nov 11 14:40:12 UTC 2019 - Xabier Arbulu <xarb...@suse.com> + +- Version 0.3.5 + * Fix issue with file permissions during package installation in + /usr/share/salt-formulas (0755, root, salt) + (boo#1142306) + +------------------------------------------------------------------- +Wed Nov 6 06:23:13 UTC 2019 - nick wang <nw...@suse.com> + +- Version 0.3.4 + * Remove the duplicate default value in salt state + * Not to install package by default + * Remove salt indent and change the order of pillar + +------------------------------------------------------------------- +Thu Oct 17 17:48:58 UTC 2019 - Richard Brown <rbr...@suse.com> + +- Remove obsolete Groups tag (fate#326485) + +------------------------------------------------------------------- +Wed Aug 7 08:08:21 UTC 2019 - nick wang <nw...@suse.com> + +- Version 0.3.3 + * Add prefix to ID to avoid conflicts + * Install xfsprogs when need to format xfs + +------------------------------------------------------------------- +Thu Jul 25 02:19:59 UTC 2019 - nick wang <nw...@suse.com> + +- Version 0.3.2, boo#1142762 + * Restructure the deploy and examples directories + * Add examples of using NFS formula + * Fix the issue of mkfs and mount NFS share + * Polish the form.yml based on SUMA4.0, change some default values. + +------------------------------------------------------------------- +Mon Jul 22 13:16:33 UTC 2019 - Diego Akechi <dake...@suse.com> + + - Version 0.3.1 + * Change the requires to salt-formulas-configuration as this is + the virtual "provides" shared by salt and SUMA to guarantee that + the formula works integrated with both (not at the same time). + (boo#1142306) + + * Change the directory permission to avoid file conflicts with + SUMA. + +------------------------------------------------------------------- Old: ---- drbd-formula-0.3.0.tar.gz New: ---- drbd-formula-0.3.6.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ drbd-formula.spec ++++++ --- /var/tmp/diff_new_pack.MyFN8i/_old 2019-11-13 13:29:20.539761357 +0100 +++ /var/tmp/diff_new_pack.MyFN8i/_new 2019-11-13 13:29:20.539761357 +0100 @@ -1,7 +1,7 @@ # # spec file for package drbd-formula # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,27 +16,24 @@ # -# See also http://en.opensuse.org/openSUSE:Specfile_guidelines -%define fname drbd -%define fdir %{_datadir}/salt-formulas +# See also https://en.opensuse.org/openSUSE:Specfile_guidelines + Name: drbd-formula -Version: 0.3.0 +Version: 0.3.6 Release: 0 Summary: DRBD deployment salt formula License: Apache-2.0 -Group: System/Packages URL: https://github.com/SUSE/%{name} Source0: %{name}-%{version}.tar.gz Requires: drbd-utils Requires: salt-shaptools +Requires: salt-formulas-configuration BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build -# On SLE/Leap 15-SP1 and TW requires the new salt-formula configuration location. -%if ! (0%{?sle_version:1} && 0%{?sle_version} < 150100) -Requires: salt-standalone-formulas-configuration -%endif - +%define fname drbd +%define fdir %{_datadir}/salt-formulas +%define ftemplates templates %description DRBD deployment salt formula @@ -48,44 +45,27 @@ %build %install -# before SUMA 4.0/15-SP1, install on the standard Salt Location. -%if 0%{?sle_version:1} && 0%{?sle_version} < 150100 -mkdir -p %{buildroot}/srv/salt/ -cp -R %{fname} %{buildroot}/srv/salt -cp -R templates/* %{buildroot}/srv/salt/%{fname}/templates/ -%else -# On SUMA 4.0/15-SP1, a single shared directory will be used. mkdir -p %{buildroot}%{fdir}/states/%{fname} mkdir -p %{buildroot}%{fdir}/metadata/%{fname} cp -R %{fname} %{buildroot}%{fdir}/states -cp -R templates/* %{buildroot}%{fdir}/states/%{fname}/templates/ +cp -R examples %{buildroot}%{fdir}/states/%{fname}/%{ftemplates}/ cp -R form.yml metadata.yml pillar.example README.md %{buildroot}%{fdir}/metadata/%{fname} -%endif -%if 0%{?sle_version:1} && 0%{?sle_version} < 150100 %files -# %license macro is not available on older releases -%if 0%{?sle_version} <= 120300 +%defattr(-,root,root,-) +%if 0%{?sle_version} < 120300 %doc README.md LICENSE %else %doc README.md %license LICENSE %endif -/srv/salt/%{fname} -%dir %attr(0755, root, salt) /srv/salt -%else -%files -%defattr(-,root,root,-) -%doc README.md -%license LICENSE -%dir %{fdir} -%dir %{fdir}/states -%dir %{fdir}/metadata -%{fdir}/states/%{fname} -%{fdir}/metadata/%{fname} -%dir %attr(0750, root, salt) %{fdir} -%dir %attr(0750, root, salt) %{fdir}/states -%dir %attr(0750, root, salt) %{fdir}/metadata -%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}/metadata/%{fname} %changelog ++++++ drbd-formula-0.3.0.tar.gz -> drbd-formula-0.3.6.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drbd-formula-0.3.0/README.md new/drbd-formula-0.3.6/README.md --- old/drbd-formula-0.3.0/README.md 2019-07-09 11:02:01.907705255 +0200 +++ new/drbd-formula-0.3.6/README.md 2019-11-13 10:55:44.664337122 +0100 @@ -4,7 +4,7 @@ [![Travis Build](https://api.travis-ci.org/SUSE/drbd-formula.svg?branch=master)](https://travis-ci.org/SUSE/drbd-formula) # Version -0.3.0 +0.3.3 # DRBD bootstrap salt formula @@ -29,6 +29,9 @@ sudo cp salt-shaptools/salt/states/* /srv/salt/_states ``` +2. Work with [HABOOTSTRAP formula](https://github.com/SUSE/habootstrap-formula) or [NFS formula](https://github.com/saltstack-formulas/nfs-formula), could deploy NFS on top of DRBD with/without Pacemaker +> [NFS formula is packaged](https://build.opensuse.org/package/show/network:ha-clustering:Unstable/nfs-formula) in openSUSE build service + ## Install (Suse distros) The easiest way to install the formula in SUSE distributions is using a rpm package. @@ -36,7 +39,7 @@ is used in the example): ```bash -sudo zypper addrepo https://download.opensuse.org/repositories/network:ha-clustering:Factory/openSUSE_Leap_15.0/network:ha-clustering:Factory.repo +sudo zypper addrepo https://download.opensuse.org/tumbleweed/repo/oss/ sudo zypper ref sudo zypper in drbd-formula ``` @@ -107,3 +110,8 @@ --------------- Waiting all DRBD resources finish syncing. + +``drbd.nfs_ready`` +--------------- + +Format the backing device and get mounted. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drbd-formula-0.3.0/deploy/deploy.sh new/drbd-formula-0.3.6/deploy/deploy.sh --- old/drbd-formula-0.3.0/deploy/deploy.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/drbd-formula-0.3.6/deploy/deploy.sh 2019-11-13 10:55:44.664337122 +0100 @@ -0,0 +1,7 @@ +mkdir -p /srv/pillar/drbd +cp -R pillar/* /srv/pillar +cp ../pillar.example /srv/pillar/drbd/formula.sls + +mkdir -p /srv/salt/drbd +cp -R salt/* /srv/salt +cp -R ../drbd /srv/salt diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drbd-formula-0.3.0/deploy/pillar/top.sls new/drbd-formula-0.3.6/deploy/pillar/top.sls --- old/drbd-formula-0.3.0/deploy/pillar/top.sls 1970-01-01 01:00:00.000000000 +0100 +++ new/drbd-formula-0.3.6/deploy/pillar/top.sls 2019-11-13 10:55:44.664337122 +0100 @@ -0,0 +1,3 @@ +base: + 'drbd-node*': + - drbd.formula diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drbd-formula-0.3.0/deploy/salt/top.sls new/drbd-formula-0.3.6/deploy/salt/top.sls --- old/drbd-formula-0.3.0/deploy/salt/top.sls 1970-01-01 01:00:00.000000000 +0100 +++ new/drbd-formula-0.3.6/deploy/salt/top.sls 2019-11-13 10:55:44.664337122 +0100 @@ -0,0 +1,3 @@ +base: + 'drbd-node*': + - drbd diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drbd-formula-0.3.0/drbd/defaults.yaml new/drbd-formula-0.3.6/drbd/defaults.yaml --- old/drbd-formula-0.3.0/drbd/defaults.yaml 2019-07-09 11:02:01.907705255 +0200 +++ new/drbd-formula-0.3.6/drbd/defaults.yaml 2019-11-13 10:55:44.664337122 +0100 @@ -1,15 +1,14 @@ drbd: - install_packages: true + install_packages: false with_ha: false + # Must provide the promotion + #promotion: "" + res_template: "res_single_vol_v9.j2" need_init_sync: true - stop_after_init_sync: true + sync_interval: 10 + sync_timeout: 500 need_format: true - - salt: - res_template: "res_single_vol_v9.j2" - promotion: "drbd-node1" - sync_interval: 10 - sync_timeout: 500 + stop_after_init_sync: true global: usage_count: "no" @@ -32,53 +31,5 @@ after_resync_target: "" split_brain: "" - # newres must have a name - # Could test with res name list only - resource: - - name: "beijing" - device: "/dev/drbd5" - disk: "/dev/vdb1" - - # Refer to bsc#1101037 - fixed_rate: true - c_plan_ahead: 20 - c_max_rate: "100M" - c_fill_target: "10M" - - # Salt specific - file_system: "xfs" - mount_point: "/mnt/beijing" - 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/shanghai" - 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 + # Must configure the `resource` + #resource: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drbd-formula-0.3.0/drbd/initial_sync.sls new/drbd-formula-0.3.6/drbd/initial_sync.sls --- old/drbd-formula-0.3.0/drbd/initial_sync.sls 2019-07-09 11:02:01.907705255 +0200 +++ new/drbd-formula-0.3.6/drbd/initial_sync.sls 2019-11-13 10:55:44.664337122 +0100 @@ -25,7 +25,16 @@ - name: 'sleep 3' {% for res in drbd.resource %} -{% if drbd.salt.promotion == host %} +{% if drbd.need_format is defined and drbd.need_format is sameas true%} +{% if res.file_system == 'xfs' %} +init_drbd_install_xfs: + pkg.installed: + - pkgs: + - xfsprogs +{% endif %} +{% endif %} + +{% if drbd.promotion == host %} init-promote-{{ res.name }}: drbd.promoted: - name: {{ res.name }} @@ -34,7 +43,7 @@ - init-extra-sleep {% if drbd.need_format is defined and drbd.need_format is sameas true%} -format-{{ res.name }}: +init-format-{{ res.name }}: blockdev.formatted: - name: {{ res.device }} - fs_type: {{ res.file_system|default("ext4") }} @@ -54,12 +63,12 @@ init-wait-for-{{ res.name }}-synced: drbd.wait_for_successful_synced: - name: {{ res.name }} - - interval: {{ drbd.salt.sync_interval|default(5) }} - - timeout: {{ drbd.salt.sync_timeout|default(300) }} + - interval: {{ drbd.sync_interval }} + - timeout: {{ drbd.sync_timeout }} - require: -{% if drbd.salt.promotion == host %} +{% if drbd.promotion == host %} {% if drbd.format_as is defined %} - - format-{{ res.name }} + - init-format-{{ res.name }} {% else %} - init-promote-{{ res.name }} {% endif %} @@ -68,7 +77,7 @@ {% endif %} {% if drbd.stop_after_init_sync is defined and drbd.stop_after_init_sync is sameas true %} -{% if drbd.salt.promotion == host %} +{% if drbd.promotion == host %} init-demote-{{ res.name }}: drbd.demoted: - name: {{ res.name }} @@ -78,12 +87,12 @@ # Sleep several seconds, in case one node stop before other nodes # check disk status in wait-for-{{ res.name }}-synced -# sleep time should >= drbd.salt.sync_interval +# sleep time should >= drbd.sync_interval init-sleep-to-wait-all-before-stop-{{ res.name }}: cmd.run: - - name: 'sleep {{ drbd.salt.sync_interval|default(5) + 3 }}' + - name: 'sleep {{ drbd.sync_interval + 3 }}' - require: -{% if drbd.salt.promotion == host %} +{% if drbd.promotion == host %} - init-demote-{{ res.name }} {% else %} - init-wait-for-{{ res.name }}-synced diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drbd-formula-0.3.0/drbd/mkfs.sls new/drbd-formula-0.3.6/drbd/mkfs.sls --- old/drbd-formula-0.3.0/drbd/mkfs.sls 2019-07-09 11:02:01.907705255 +0200 +++ new/drbd-formula-0.3.6/drbd/mkfs.sls 2019-11-13 10:55:44.664337122 +0100 @@ -1,11 +1,22 @@ {%- from "drbd/map.jinja" import drbd with context -%} +{% set host = grains['host'] %} + +include: + - drbd.promote {% for res in drbd.resource %} -{% if drbd.need_format is defined and drbd.need_format is sameas true %} -format-{{ res.name }}: +{% if drbd.promotion == host %} +{% if res.file_system == 'xfs' %} +drbd_install_xfs: + pkg.installed: + - pkgs: + - xfsprogs +{% endif %} + +drbd_format_{{ res.name }}: blockdev.formatted: - - name: {{ res.device|default("ext4") }} - - fs_type: {{ res.file_system }} + - name: {{ res.device }} + - fs_type: {{ res.file_system|default("ext4") }} - force: True {% endif %} {% endfor %} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drbd-formula-0.3.0/drbd/nfs_ready.sls new/drbd-formula-0.3.6/drbd/nfs_ready.sls --- old/drbd-formula-0.3.0/drbd/nfs_ready.sls 1970-01-01 01:00:00.000000000 +0100 +++ new/drbd-formula-0.3.6/drbd/nfs_ready.sls 2019-11-13 10:55:44.664337122 +0100 @@ -0,0 +1,33 @@ +{%- from "drbd/map.jinja" import drbd with context -%} +{% set host = grains['host'] %} + +include: + - drbd.additional_repos + - drbd.mkfs + +{% if drbd.with_ha is sameas false %} +install_nfs_formula_packages_for_drbd: + pkg.installed: + - pkgs: + - nfs-formula +{% endif %} + +{% for res in drbd.resource %} +{% if drbd.promotion == host %} +drbd_{{ res.name }}_create_{{ res.mount_point }}: + file.directory: + - name: {{ res.mount_point }} + - user: root + - group: root + - dir_mode: 755 + - file_mode: 644 + +drbd_{{ res.name }}_mountpoint: + mount.mounted: + - name: {{ res.mount_point }} + - device: {{ res.device }} + - fstype: {{ res.file_system|default("ext4") }} + - persist: False + - mkmnt: True +{% endif %} +{% endfor %} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drbd-formula-0.3.0/drbd/packages.sls new/drbd-formula-0.3.6/drbd/packages.sls --- old/drbd-formula-0.3.0/drbd/packages.sls 2019-07-09 11:02:01.907705255 +0200 +++ new/drbd-formula-0.3.6/drbd/packages.sls 2019-11-13 10:55:44.664337122 +0100 @@ -32,6 +32,13 @@ - hawk2 - pacemaker - corosync -{% endif %} +{% else %} + +install_nfs_packages_for_drbd: + pkg.installed: + - pkgs: + - nfs-formula + +{% endif %} {% endif %} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drbd-formula-0.3.0/drbd/promote.sls new/drbd-formula-0.3.6/drbd/promote.sls --- old/drbd-formula-0.3.0/drbd/promote.sls 2019-07-09 11:02:01.907705255 +0200 +++ new/drbd-formula-0.3.6/drbd/promote.sls 2019-11-13 10:55:44.664337122 +0100 @@ -6,7 +6,7 @@ drbd.started: - name: {{ res.name }} -{% if drbd.salt.promotion != host %} +{% if drbd.promotion != host %} pr-demote-{{ res.name }}: drbd.demoted: - name: {{ res.name }} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drbd-formula-0.3.0/drbd/res.sls new/drbd-formula-0.3.6/drbd/res.sls --- old/drbd-formula-0.3.0/drbd/res.sls 2019-07-09 11:02:01.907705255 +0200 +++ new/drbd-formula-0.3.6/drbd/res.sls 2019-11-13 10:55:44.664337122 +0100 @@ -4,15 +4,15 @@ {% set nodeid = 1 %} /etc/drbd.d/{{ res.name }}.res: file.managed: - - source: salt://drbd/templates/{{ drbd.salt.res_template }} + - source: salt://drbd/templates/{{ drbd.res_template }} - user: root - group: root - mode: 644 - template: jinja - defaults: name: '{{ res.name }}' - device: '{{ res.device|default(["/dev/drbd", loop.index]|join('')) }}' - disk: '{{ res.disk|default(["/dev/vdb", loop.index]|join('')) }}' + device: '{{ res.device }}' + disk: '{{ res.disk }}' meta_disk: '{{ res.meta_disk|default("internal") }}' protocol: '{{ res.protocol|default("C") }}' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drbd-formula-0.3.0/drbd/wait_sync.sls new/drbd-formula-0.3.6/drbd/wait_sync.sls --- old/drbd-formula-0.3.0/drbd/wait_sync.sls 2019-07-09 11:02:01.907705255 +0200 +++ new/drbd-formula-0.3.6/drbd/wait_sync.sls 2019-11-13 10:55:44.664337122 +0100 @@ -4,6 +4,6 @@ init-wait-for-{{ res.name }}-synced: drbd.wait_for_successful_synced: - name: {{ res.name }} - - interval: {{ drbd.salt.sync_interval|default(5) }} - - timeout: {{ drbd.salt.sync_timeout|default(300) }} + - interval: {{ drbd.sync_interval }} + - timeout: {{ drbd.sync_timeout }} {% endfor %} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drbd-formula-0.3.0/drbd-formula.changes new/drbd-formula-0.3.6/drbd-formula.changes --- old/drbd-formula-0.3.0/drbd-formula.changes 2019-07-09 11:02:01.907705255 +0200 +++ new/drbd-formula-0.3.6/drbd-formula.changes 2019-11-13 10:55:44.664337122 +0100 @@ -1,4 +1,59 @@ ------------------------------------------------------------------- +Wed Nov 13 09:31:49 UTC 2019 - Xabier Arbulu <xarb...@suse.com> + +- Version 0.3.6 + * Remove additional_repos salt state + +------------------------------------------------------------------- +Mon Nov 11 14:40:12 UTC 2019 - Xabier Arbulu <xarb...@suse.com> + +- Version 0.3.5 + * Fix issue with file permissions during package installation in + /usr/share/salt-formulas (0755, root, salt) + (boo#1142306) + +------------------------------------------------------------------- +Wed Nov 6 06:23:13 UTC 2019 - nick wang <nw...@suse.com> + +- Version 0.3.4 + * Remove the duplicate default value in salt state + * Not to install package by default + * Remove salt indent and change the order of pillar + +------------------------------------------------------------------- +Thu Oct 17 17:48:58 UTC 2019 - Richard Brown <rbr...@suse.com> + +- Remove obsolete Groups tag (fate#326485) + +------------------------------------------------------------------- +Wed Aug 7 08:08:21 UTC 2019 - nick wang <nw...@suse.com> + +- Version 0.3.3 + * Add prefix to ID to avoid conflicts + * Install xfsprogs when need to format xfs + +------------------------------------------------------------------- +Thu Jul 25 02:19:59 UTC 2019 - nick wang <nw...@suse.com> + +- Version 0.3.2, boo#1142762 + * Restructure the deploy and examples directories + * Add examples of using NFS formula + * Fix the issue of mkfs and mount NFS share + * Polish the form.yml based on SUMA4.0, change some default values. + +------------------------------------------------------------------- +Mon Jul 22 13:16:33 UTC 2019 - Diego Akechi <dake...@suse.com> + + - Version 0.3.1 + * Change the requires to salt-formulas-configuration as this is + the virtual "provides" shared by salt and SUMA to guarantee that + the formula works integrated with both (not at the same time). + (boo#1142306) + + * Change the directory permission to avoid file conflicts with + SUMA. + +------------------------------------------------------------------- Mon Jul 8 05:31:33 UTC 2019 - nick wang <nw...@suse.com> - Version 0.3.0, jsc#SLE-6970 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drbd-formula-0.3.0/drbd-formula.spec new/drbd-formula-0.3.6/drbd-formula.spec --- old/drbd-formula-0.3.0/drbd-formula.spec 2019-07-09 11:02:01.907705255 +0200 +++ new/drbd-formula-0.3.6/drbd-formula.spec 2019-11-13 10:55:44.664337122 +0100 @@ -1,7 +1,7 @@ # # spec file for package drbd-formula # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,27 +16,24 @@ # -# See also http://en.opensuse.org/openSUSE:Specfile_guidelines -%define fname drbd -%define fdir %{_datadir}/salt-formulas +# See also https://en.opensuse.org/openSUSE:Specfile_guidelines + Name: drbd-formula -Version: 0.3.0 +Version: 0.3.6 Release: 0 Summary: DRBD deployment salt formula License: Apache-2.0 -Group: System/Packages URL: https://github.com/SUSE/%{name} Source0: %{name}-%{version}.tar.gz Requires: drbd-utils Requires: salt-shaptools +Requires: salt-formulas-configuration BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build -# On SLE/Leap 15-SP1 and TW requires the new salt-formula configuration location. -%if ! (0%{?sle_version:1} && 0%{?sle_version} < 150100) -Requires: salt-standalone-formulas-configuration -%endif - +%define fname drbd +%define fdir %{_datadir}/salt-formulas +%define ftemplates templates %description DRBD deployment salt formula @@ -48,44 +45,27 @@ %build %install -# before SUMA 4.0/15-SP1, install on the standard Salt Location. -%if 0%{?sle_version:1} && 0%{?sle_version} < 150100 -mkdir -p %{buildroot}/srv/salt/ -cp -R %{fname} %{buildroot}/srv/salt -cp -R templates/* %{buildroot}/srv/salt/%{fname}/templates/ -%else -# On SUMA 4.0/15-SP1, a single shared directory will be used. mkdir -p %{buildroot}%{fdir}/states/%{fname} mkdir -p %{buildroot}%{fdir}/metadata/%{fname} cp -R %{fname} %{buildroot}%{fdir}/states -cp -R templates/* %{buildroot}%{fdir}/states/%{fname}/templates/ +cp -R examples %{buildroot}%{fdir}/states/%{fname}/%{ftemplates}/ cp -R form.yml metadata.yml pillar.example README.md %{buildroot}%{fdir}/metadata/%{fname} -%endif -%if 0%{?sle_version:1} && 0%{?sle_version} < 150100 %files -# %license macro is not available on older releases -%if 0%{?sle_version} <= 120300 +%defattr(-,root,root,-) +%if 0%{?sle_version} < 120300 %doc README.md LICENSE %else %doc README.md %license LICENSE %endif -/srv/salt/%{fname} -%dir %attr(0755, root, salt) /srv/salt -%else -%files -%defattr(-,root,root,-) -%doc README.md -%license LICENSE -%dir %{fdir} -%dir %{fdir}/states -%dir %{fdir}/metadata -%{fdir}/states/%{fname} -%{fdir}/metadata/%{fname} -%dir %attr(0750, root, salt) %{fdir} -%dir %attr(0750, root, salt) %{fdir}/states -%dir %attr(0750, root, salt) %{fdir}/metadata -%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}/metadata/%{fname} %changelog diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drbd-formula-0.3.0/example/deploy.sh new/drbd-formula-0.3.6/example/deploy.sh --- old/drbd-formula-0.3.0/example/deploy.sh 2019-07-09 11:02:01.907705255 +0200 +++ new/drbd-formula-0.3.6/example/deploy.sh 1970-01-01 01:00:00.000000000 +0100 @@ -1,7 +0,0 @@ -mkdir -p /srv/pillar/drbd -cp -R pillar/* /srv/pillar -cp ../pillar.example /srv/pillar/drbd/formula.sls - -mkdir -p /srv/salt/drbd -cp -R salt/* /srv/salt -cp -R ../drbd /srv/salt diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drbd-formula-0.3.0/example/pillar/top.sls new/drbd-formula-0.3.6/example/pillar/top.sls --- old/drbd-formula-0.3.0/example/pillar/top.sls 2019-07-09 11:02:01.911705449 +0200 +++ new/drbd-formula-0.3.6/example/pillar/top.sls 1970-01-01 01:00:00.000000000 +0100 @@ -1,3 +0,0 @@ -base: - 'drbd-node*': - - drbd.formula diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drbd-formula-0.3.0/example/salt/top.sls new/drbd-formula-0.3.6/example/salt/top.sls --- old/drbd-formula-0.3.0/example/salt/top.sls 2019-07-09 11:02:01.911705449 +0200 +++ new/drbd-formula-0.3.6/example/salt/top.sls 1970-01-01 01:00:00.000000000 +0100 @@ -1,3 +0,0 @@ -base: - 'drbd-node*': - - drbd diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drbd-formula-0.3.0/examples/README.md new/drbd-formula-0.3.6/examples/README.md --- old/drbd-formula-0.3.0/examples/README.md 1970-01-01 01:00:00.000000000 +0100 +++ new/drbd-formula-0.3.6/examples/README.md 2019-11-13 10:55:44.664337122 +0100 @@ -0,0 +1,23 @@ +``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](./with_pacemakerout/pillar.example.nfs) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drbd-formula-0.3.0/examples/pillar.example.drbd new/drbd-formula-0.3.6/examples/pillar.example.drbd --- old/drbd-formula-0.3.0/examples/pillar.example.drbd 1970-01-01 01:00:00.000000000 +0100 +++ new/drbd-formula-0.3.6/examples/pillar.example.drbd 2019-11-13 10:55:44.664337122 +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: true + + ## Perform initial sync for DRBD resources + #need_init_sync: true + + ## Optional: stop the DRBD resources after initial resync + #stop_after_init_sync: true + + ## Optional: format the DRBD resource after initial resync + #need_format: true + + + # Salt deployment/manage related parameters + salt: + # 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" + # # Optional: interval check time for waiting for resource synced + # sync_interval: 10 + # # Optional: timeout for waiting for resource synced + # sync_timeout: 500 + + + ## 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.3.0/examples/with_pacemaker/drbd_with_nfs_crm.j2 new/drbd-formula-0.3.6/examples/with_pacemaker/drbd_with_nfs_crm.j2 --- old/drbd-formula-0.3.0/examples/with_pacemaker/drbd_with_nfs_crm.j2 1970-01-01 01:00:00.000000000 +0100 +++ new/drbd-formula-0.3.6/examples/with_pacemaker/drbd_with_nfs_crm.j2 2019-11-13 10:55:44.664337122 +0100 @@ -0,0 +1,53 @@ +{% 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 + +{% 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=2 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.3.0/examples/with_pacemaker/pillar.example.cluster new/drbd-formula-0.3.6/examples/with_pacemaker/pillar.example.cluster --- old/drbd-formula-0.3.0/examples/with_pacemaker/pillar.example.cluster 1970-01-01 01:00:00.000000000 +0100 +++ new/drbd-formula-0.3.6/examples/with_pacemaker/pillar.example.cluster 2019-11-13 10:55:44.664337122 +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/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.3.0/examples/without_pacemaker/pillar.example.nfs new/drbd-formula-0.3.6/examples/without_pacemaker/pillar.example.nfs --- old/drbd-formula-0.3.0/examples/without_pacemaker/pillar.example.nfs 1970-01-01 01:00:00.000000000 +0100 +++ new/drbd-formula-0.3.6/examples/without_pacemaker/pillar.example.nfs 2019-11-13 10:55:44.664337122 +0100 @@ -0,0 +1,28 @@ +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.3.0/form.yml new/drbd-formula-0.3.6/form.yml --- old/drbd-formula-0.3.0/form.yml 2019-07-09 11:02:01.911705449 +0200 +++ new/drbd-formula-0.3.6/form.yml 2019-11-13 10:55:44.664337122 +0100 @@ -5,61 +5,57 @@ $optional: true $type: boolean $help: whether need to install DRBD packages first - $default: true + $default: false with_ha: - $visibleIf: .show_more == true $optional: true $type: boolean + $help: whether need to install SLE HA related packages $default: false + promotion: + $name: Primary node when promoting DRBD + $help: Choose a node to become the first primary + + res_template: + $name: Resource template for /etc/drbd.d/xxx.res + $optional: true + $help: The template for DRBD resources + $default: "res_single_vol_v9.j2" + need_init_sync: $optional: true $type: boolean + $help: Whether need to do the initialize sync $default: true - stop_after_init_sync: - $visibleIf: .show_more == true + sync_interval: + $visibleIf: .need_init_sync == true $optional: true - $type: boolean - $default: false + $type: number + $help: Interval to check the initialize sync + $default: 10 + + sync_timeout: + $visibleIf: .need_init_sync == true + $optional: true + $type: number + $help: Timeout for the initialize sync + $default: 500 need_format: - $visibleIf: .show_more == true + $visibleIf: .need_init_sync == true $optional: true $type: boolean $help: whether need to format after DRBD initial sync - $default: false + $default: true - show_more: - $name: Advanced + stop_after_init_sync: + $visibleIf: .need_init_sync == true $optional: true $type: boolean - $help: Show advanced configurations of DRBD - $default: false - - salt: - $name: Salt deployment related parameters - $type: group - - promotion: - $name: Primary node when promoting DRBD - - res_template: - $name: Resource template for /etc/drbd.d/xxx.res - $optional: true - $help: The template for DRBD resources - $default: "res_single_vol_v9.j2" - - sync_interval: - $optional: true - $type: number - $default: 10 - - sync_timeout: - $optional: true - $type: number - $default: 500 + $help: whether need to stop DRBD after initial sync + $default: true global: $name: global section of /etc/drbd.d/global_common.conf diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drbd-formula-0.3.0/pillar.example new/drbd-formula-0.3.6/pillar.example --- old/drbd-formula-0.3.0/pillar.example 2019-07-09 11:02:01.911705449 +0200 +++ new/drbd-formula-0.3.6/pillar.example 2019-11-13 10:55:44.664337122 +0100 @@ -3,32 +3,32 @@ drbd: ## Install required package to manage DRBD - #install_packages: true + #install_packages: false - ## Install required package to configure DRBD in pacemaker cluster + ## 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: stop the DRBD resources after initial resync - #stop_after_init_sync: true + ## Optional: interval check time for waiting for resource synced + #sync_interval: 10 + + ## Optional: timeout for waiting for resource synced + #sync_timeout: 500 ## Optional: format the DRBD resource after initial resync #need_format: true - - # Salt deployment/manage related parameters - salt: - # 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" - # # Optional: interval check time for waiting for resource synced - # sync_interval: 10 - # # Optional: timeout for waiting for resource synced - # sync_timeout: 500 + ## Optional: stop the DRBD resources after initial resync + #stop_after_init_sync: true ## Configures some "global" parameters of /etc/drbd.d/global_common.conf diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drbd-formula-0.3.0/templates/README.md new/drbd-formula-0.3.6/templates/README.md --- old/drbd-formula-0.3.0/templates/README.md 2019-07-09 11:02:01.911705449 +0200 +++ new/drbd-formula-0.3.6/templates/README.md 1970-01-01 01:00:00.000000000 +0100 @@ -1,11 +0,0 @@ -``drbd_with_nfs`` with [htbootstrap-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](./drbd_with_nfs.j2) -* [Pillar: DRBD formula](./drbd_with_nfs.sls) -* [Pillar: habootstrap formula](./drbd_with_nfs_cluster.sls) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/drbd-formula-0.3.0/templates/drbd_with_nfs.j2 new/drbd-formula-0.3.6/templates/drbd_with_nfs.j2 --- old/drbd-formula-0.3.0/templates/drbd_with_nfs.j2 2019-07-09 11:02:01.911705449 +0200 +++ new/drbd-formula-0.3.6/templates/drbd_with_nfs.j2 1970-01-01 01:00:00.000000000 +0100 @@ -1,53 +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 - -{% 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=2 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.3.0/templates/drbd_with_nfs.sls new/drbd-formula-0.3.6/templates/drbd_with_nfs.sls --- old/drbd-formula-0.3.0/templates/drbd_with_nfs.sls 2019-07-09 11:02:01.911705449 +0200 +++ new/drbd-formula-0.3.6/templates/drbd_with_nfs.sls 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 - - ## Install required package to configure DRBD in pacemaker cluster - #with_ha: false - - ## Perform initial sync for DRBD resources - #need_init_sync: true - - ## Optional: stop the DRBD resources after initial resync - #stop_after_init_sync: true - - ## Optional: format the DRBD resource after initial resync - #need_format: true - - - # Salt deployment/manage related parameters - salt: - # 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" - # # Optional: interval check time for waiting for resource synced - # sync_interval: 10 - # # Optional: timeout for waiting for resource synced - # sync_timeout: 500 - - - ## 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.3.0/templates/drbd_with_nfs_cluster.sls new/drbd-formula-0.3.6/templates/drbd_with_nfs_cluster.sls --- old/drbd-formula-0.3.0/templates/drbd_with_nfs_cluster.sls 2019-07-09 11:02:01.911705449 +0200 +++ new/drbd-formula-0.3.6/templates/drbd_with_nfs_cluster.sls 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.j2 - parameters: - virtual_ip: 192.168.10.200 - virtual_ip_mask: 24 - platform: libvirt - prefer_takeover: true - auto_register: false