From: John Wolfe Date: Fri, 22 Jan 2021 20:25:41 +0000 (-0800) Subject: Fix an issue where CustomizationUnknownFailure is generated multiple times X-Git-Tag: stable-11.3.0~174 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f06ab994230b074a361edbd76e29e00a7b3160ef;p=thirdparty%2Fopen-vm-tools.git Fix an issue where CustomizationUnknownFailure is generated multiple times on Linux. For Linux, sysimage sends a failure status to VMX when the deploy pkg failed. The tools plugin then sends the failure notice again. Changing the plugin to only send the failure notice for Windows guests where the failure has yet to be logged. --- diff --git a/open-vm-tools/services/plugins/deployPkg/deployPkg.c b/open-vm-tools/services/plugins/deployPkg/deployPkg.c index 1d1be5265..d7a84b421 100644 --- a/open-vm-tools/services/plugins/deployPkg/deployPkg.c +++ b/open-vm-tools/services/plugins/deployPkg/deployPkg.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2020 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2021 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 @@ -249,6 +249,12 @@ DeployPkgExecDeploy(ToolsAppCtx *ctx, // IN: app context /* Unpack the package and run the command. */ ret = DeployPkgDeployPkgInGuest(ctx, pkgNameStr, errMsg, sizeof errMsg); if (ret != TOOLSDEPLOYPKG_ERROR_SUCCESS) { +#ifdef _WIN32 + /* + * PR 1631160. for Linux, sysimage has sent failure status in vmx when + * deploy pkg failed, to avoid sending failure events repeatedly, here + * is only sending status in the case of windows. + */ gchar *msg = g_strdup_printf("deployPkg.update.state %d %d %s", TOOLSDEPLOYPKG_DEPLOYING, TOOLSDEPLOYPKG_ERROR_DEPLOY_FAILED, @@ -261,6 +267,7 @@ DeployPkgExecDeploy(ToolsAppCtx *ctx, // IN: app context TOOLSDEPLOYPKG_ERROR_DEPLOY_FAILED); } g_free(msg); +#endif g_warning("DeployPkgInGuest failed, error = %d\n", ret); } }