From 5fa55c727ce930aaf6ad8ca04a09f11ddc86335f Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: May 12 2020 12:35:16 +0000 Subject: import open-vm-tools-10.3.10-2.el7_8.1 --- diff --git a/SOURCES/ovt-Avoid-freezing-mount-points-for-same-device.patch b/SOURCES/ovt-Avoid-freezing-mount-points-for-same-device.patch new file mode 100644 index 0000000..64fd3cc --- /dev/null +++ b/SOURCES/ovt-Avoid-freezing-mount-points-for-same-device.patch @@ -0,0 +1,111 @@ +From 4952e22663c8e00c913a007a5e59e47e3b3b02c0 Mon Sep 17 00:00:00 2001 +From: Cathy Avery +Date: Wed, 11 Mar 2020 14:59:21 +0100 +Subject: [PATCH 1/2] Avoid freezing mount points for same device. + +Message-id: <20200311145921.11689-1-cavery@redhat.com> +Patchwork-id: 94230 +O-Subject: [RHEL-7.8.z/RHEL-7.7.z/RHEL-7.6.z open-vm-tools PATCH] Avoid freezing mount points for same device. +Bugzilla: 1812934 +RH-Acked-by: Eduardo Otubo +RH-Acked-by: Mohammed Gamal +RH-Acked-by: Vitaly Kuznetsov + +commit d58847b497e212737007958c945af1df22a8ab58 +Author: Oliver Kurth +Date: Fri Aug 2 11:07:21 2019 -0700 + + Avoid freezing mount points for same device. + + Loopback device setup could cause a cyclic dependency + between 2 mount points. In order to break the cycle, + avoid freezing the mount points to the same device. + + This change also skips some system mount points for 'tmpfs' + and 'cgroup' etc as those share the same device/FS name. + This is fine because we can't quiese those mount points + anyway (system mount points don't support quiescing). + +Signed-off-by: Cathy Avery +Signed-off-by: Miroslav Rezanina +--- + lib/syncDriver/syncDriverPosix.c | 32 ++++++++++++++++++++++---- + 1 file changed, 27 insertions(+), 5 deletions(-) + +diff --git a/lib/syncDriver/syncDriverPosix.c b/lib/syncDriver/syncDriverPosix.c +index 839cb6d..7b6132b 100644 +--- a/lib/syncDriver/syncDriverPosix.c ++++ b/lib/syncDriver/syncDriverPosix.c +@@ -1,5 +1,5 @@ + /********************************************************* +- * Copyright (C) 2005-2018 VMware, Inc. All rights reserved. ++ * Copyright (C) 2005-2019 VMware, Inc. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published +@@ -140,6 +140,7 @@ static GSList * + SyncDriverLocalMounts(void) + { + GSList *paths = NULL; ++ GHashTable *devices; + MNTHANDLE mounts; + DECLARE_MNTINFO(mntinfo); + +@@ -148,19 +149,39 @@ SyncDriverLocalMounts(void) + return NULL; + } + ++ devices = g_hash_table_new_full(g_str_hash, g_str_equal, free, free); ++ + while (GETNEXT_MNTINFO(mounts, mntinfo)) { +- char *path; ++ const char *device; ++ const char *path; ++ const char *prevDevicePath; ++ ++ device = MNTINFO_NAME(mntinfo); ++ path = MNTINFO_MNTPT(mntinfo); ++ + /* + * Skip remote mounts because they are not freezable and opening them + * could lead to hangs. See PR 1196785. + */ + if (SyncDriverIsRemoteFS(mntinfo)) { + Debug(LGPFX "Skipping remote file system, name=%s, mntpt=%s.\n", +- MNTINFO_NAME(mntinfo), MNTINFO_MNTPT(mntinfo)); ++ device, path); ++ continue; ++ } ++ ++ /* ++ * Avoid adding a path to the list, if we have already got ++ * a path mounting the same device path. ++ */ ++ prevDevicePath = g_hash_table_lookup(devices, device); ++ if (prevDevicePath != NULL) { ++ Debug(LGPFX "Skipping duplicate file system, name=%s, mntpt=%s " ++ "(existing path=%s).\n", device, path, prevDevicePath); + continue; + } + +- path = Util_SafeStrdup(MNTINFO_MNTPT(mntinfo)); ++ g_hash_table_insert(devices, Util_SafeStrdup(device), ++ Util_SafeStrdup(path)); + + /* + * A mount point could depend on existence of a previous mount +@@ -172,9 +193,10 @@ SyncDriverLocalMounts(void) + * dependency. So, we need to keep them in reverse order of + * mount points to achieve the dependency order. + */ +- paths = g_slist_prepend(paths, path); ++ paths = g_slist_prepend(paths, Util_SafeStrdup(path)); + } + ++ g_hash_table_destroy(devices); + (void) CLOSE_MNTFILE(mounts); + return paths; + } +-- +1.8.3.1 + diff --git a/SPECS/open-vm-tools.spec b/SPECS/open-vm-tools.spec index 57505a9..5632f1b 100644 --- a/SPECS/open-vm-tools.spec +++ b/SPECS/open-vm-tools.spec @@ -28,7 +28,7 @@ Name: open-vm-tools Version: %{toolsversion} -Release: 2%{?dist} +Release: 2%{?dist}.1 Summary: Open Virtual Machine Tools for virtual machines hosted on VMware Group: Applications/System License: GPLv2 @@ -37,7 +37,7 @@ Source0: https://github.com/vmware/%{name}/releases/download/stable-%{v Source1: %{toolsdaemon}-init.service Source2: %{toolsdaemon}.service Source3: %{vgauthdaemon}.service -ExclusiveArch: x86_64 %{ix86} +ExclusiveArch: x86_64 Patch0002: 0002-Fix-RELRO-flag.patch # For bz#1760625 - [ESXi][RHEL7.8]Need to backport some severe memory leak fixes from upstream @@ -46,6 +46,8 @@ Patch3: ovt-Fix-memory-leaks-in-vix-tools-plugin.patch Patch4: ovt-End-VGAuth-impersonation-in-the-case-of-error.patch # For bz#1760625 - [ESXi][RHEL7.8]Need to backport some severe memory leak fixes from upstream Patch5: ovt-Fix-leaks-in-ListAliases-and-ListMappedAliases-9bc72.patch +# For bz#1812934 - [ESXi] [open-vm-tools] Snapshot of the RHEL7 guest on the VMWare ESXi hypervisor failed due to a deadlock condition of the 'vmtoolsd' task [rhel-7.8.z] +Patch6: ovt-Avoid-freezing-mount-points-for-same-device.patch BuildRequires: autoconf BuildRequires: automake @@ -145,6 +147,7 @@ machines. %patch3 -p1 %patch4 -p1 %patch5 -p1 +%patch6 -p1 %build # Required for regenerating configure script when @@ -208,12 +211,6 @@ install -p -m 644 -D %{SOURCE3} %{buildroot}%{_unitdir}/%{vgauthdaemon}.service # upstream %post -if [ -f %{_bindir}/vmware-guestproxycerttool ]; then - mkdir -p %{_sysconfdir}/vmware-tools/GuestProxyData/server - mkdir -p -m 0700 %{_sysconfdir}/vmware-tools/GuestProxyData/trusted - %{_bindir}/vmware-guestproxycerttool -g &> /dev/null || /bin/true -fi - # Setup mount point for Shared Folders # NOTE: Use systemd-detect-virt to detect VMware platform because # vmware-checkvm might misbehave on non-VMware platforms. @@ -252,6 +249,9 @@ if [ "$1" = "0" -a \ umount /mnt/hgfs &> /dev/null || /bin/true rmdir /mnt/hgfs &> /dev/null || /bin/true fi + + # Cleanup GuestProxy certs + %{_bindir}/vmware-guestproxycerttool -e &> /dev/null || /bin/true fi %postun @@ -259,10 +259,6 @@ fi %systemd_postun_with_restart %{toolsdaemon}-init.service %systemd_postun_with_restart %{toolsdaemon}.service %systemd_postun_with_restart %{vgauthdaemon}.service -# Cleanup GuestProxy certs if open-vm-tools is being uninstalled -if [ "$1" = "0" ]; then - rm -rf %{_sysconfdir}/vmware-tools/GuestProxyData &> /dev/null || /bin/true -fi %post devel -p /sbin/ldconfig @@ -333,6 +329,14 @@ fi %{_bindir}/vmware-vgauth-smoketest %changelog +* Tue Mar 31 2020 Miroslav Rezanina - 10.3.10-2.el7_8.1 +- ovt-Avoid-freezing-mount-points-for-same-device.patch [bz#1812934] +- ovt-Implement-the-https-pagure.io-packaging-committee-is.patch [bz#1813913] +- Resolves: bz#1812934 + ([ESXi] [open-vm-tools] Snapshot of the RHEL7 guest on the VMWare ESXi hypervisor failed due to a deadlock condition of the 'vmtoolsd' task [rhel-7.8.z]) +- Resolves: bz#1813913 + ([ESXi][RHEL7.3]open-vm-tools SSL/TLS certificates needs to be unique per instance or install but this value is created at install-time and not during the first run. [rhel-7.8.z]) + * Mon Nov 04 2019 Miroslav Rezanina - 10.3.10-2.el7 - ovt-Fix-memory-leaks-in-vix-tools-plugin.patch [bz#1760625] - ovt-End-VGAuth-impersonation-in-the-case-of-error.patch [bz#1760625]