From add258e111daf8cef053744e2347bebeb0a117da Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Dec 08 2015 10:20:46 +0000 Subject: import resource-agents-3.9.5-54.el7_2.1 --- diff --git a/SOURCES/bz1283877-virtualdomain-may-remove-config-file.patch b/SOURCES/bz1283877-virtualdomain-may-remove-config-file.patch new file mode 100644 index 0000000..3a9871b --- /dev/null +++ b/SOURCES/bz1283877-virtualdomain-may-remove-config-file.patch @@ -0,0 +1,40 @@ +diff -uNr a/heartbeat/VirtualDomain b/heartbeat/VirtualDomain +--- a/heartbeat/VirtualDomain 2015-11-20 11:52:58.314263831 +0100 ++++ b/heartbeat/VirtualDomain 2015-11-20 11:53:55.247196256 +0100 +@@ -340,13 +340,32 @@ + return $rc + } + ++# virsh undefine removes configuration files if they are in ++# directories which are managed by libvirt. such directories ++# include also subdirectories of /etc (for instance ++# /etc/libvirt/*) which may be surprising. VirtualDomain didn't ++# include the undefine call before, hence this wasn't an issue ++# before. ++# ++# There seems to be no way to find out which directories are ++# managed by libvirt. ++# + verify_undefined() { +- for dom in `virsh --connect=${OCF_RESKEY_hypervisor} list --all --name 2>/dev/null`; do +- if [ "$dom" = "$DOMAIN_NAME" ]; then ++ local tmpf ++ if virsh --connect=${OCF_RESKEY_hypervisor} list --all --name 2>/dev/null | grep -wqs "$DOMAIN_NAME" ++ then ++ tmpf=$(mktemp -t vmcfgsave.XXXXXX) ++ if [ ! -r "$tmpf" ]; then ++ ocf_log warn "unable to create temp file, disk full?" ++ # we must undefine the domain + virsh $VIRSH_OPTIONS undefine $DOMAIN_NAME > /dev/null 2>&1 +- return ++ else ++ cp -p $OCF_RESKEY_config $tmpf ++ virsh $VIRSH_OPTIONS undefine $DOMAIN_NAME > /dev/null 2>&1 ++ [ -f $OCF_RESKEY_config ] || cp -f $tmpf $OCF_RESKEY_config ++ rm -f $tmpf + fi +- done ++ fi + } + + VirtualDomain_Start() { diff --git a/SPECS/resource-agents.spec b/SPECS/resource-agents.spec index 9ebfb2b..76e65d5 100644 --- a/SPECS/resource-agents.spec +++ b/SPECS/resource-agents.spec @@ -32,7 +32,7 @@ Name: resource-agents Summary: Open Source HA Reusable Cluster Resource Scripts Version: 3.9.5 -Release: 54%{?dist} +Release: 54%{?dist}.1 License: GPLv2+ and LGPLv2+ URL: https://github.com/ClusterLabs/resource-agents %if 0%{?fedora} || 0%{?centos_version} || 0%{?rhel} @@ -125,6 +125,7 @@ Patch80: bz1168251-SAPHana-agents-update2.patch Patch81: bz1168251-SAPHana-agents-update3.patch Patch82: bz1168251-SAPHana-agents_update4.patch Patch83: bz1251484-redis-client-passwd-support.patch +Patch84: bz1283877-virtualdomain-may-remove-config-file.patch Obsoletes: heartbeat-resources <= %{version} Provides: heartbeat-resources = %{version} @@ -313,6 +314,7 @@ exit 1 %patch81 -p1 %patch82 -p1 %patch83 -p1 +%patch84 -p1 %build if [ ! -f configure ]; then @@ -565,6 +567,10 @@ ccs_update_schema > /dev/null 2>&1 ||: %endif %changelog +* Fri Nov 20 2015 Oyvind Albrigtsen - 3.9.5-54.1 +- Fix VirtualDomain may remove config file + Resolves: rhbz#1283877 + * Mon Sep 7 2015 Fabio M. Di Nitto - 3.9.5-54 - Fix redis client password regexp Resolves: rhbz#1251484