From: Katy Feng Date: Fri, 24 Mar 2023 20:29:28 +0000 (-0700) Subject: Add UNMANAGED InstallStatus value for components X-Git-Tag: stable-12.3.0~94 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a1a29b2358c8ca022d5116ee199c02337ec6a4a9;p=thirdparty%2Fopen-vm-tools.git Add UNMANAGED InstallStatus value for components The UNMANAGED InstallStatus is returned from components operations to indicate that the component is installed (detected) but is not to be managed by the Component Manager. The Component Manager will not take actions (except checkStatus) until the UNMANAGED status for the component gets resolved (externally). The Salt Minion (salt_minion) component returns code 106 ("ExternalInstall") is equivalent to UNMANAGED. --- diff --git a/open-vm-tools/services/plugins/componentMgr/componentMgrInstallManager.c b/open-vm-tools/services/plugins/componentMgr/componentMgrInstallManager.c index 56c8dc996..73ed5063c 100644 --- a/open-vm-tools/services/plugins/componentMgr/componentMgrInstallManager.c +++ b/open-vm-tools/services/plugins/componentMgr/componentMgrInstallManager.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2021 VMware, Inc. All rights reserved. + * Copyright (C) 2021,2023 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 @@ -19,9 +19,9 @@ /* * componentMgrInstallManager.c -- * - * This file contains all the neccessary functions and handling of performing + * This file contains all the necessary functions and handling of performing * check status operation and add/remove of a component. - * The operations are triggerred as an async process and GSource timers are + * The operations are triggered as an async process and GSource timers are * created to monitor the execution status of the async process. * After successful completion of the async process, it's resources are * released to make way for a new async process. @@ -147,7 +147,7 @@ ComponentMgrCheckStatusMonitor(void *data) // IN ComponentMgr_ResetComponentGSourceTimer(componentIndex); /* - * After checkstatus operation has completed sucessfully, we can have a + * After checkstatus operation has completed successfully, we can have a * next sequence of operations to be executed on a component. */ if (callbackFunction != NULL) { diff --git a/open-vm-tools/services/plugins/componentMgr/componentMgrPlugin.h b/open-vm-tools/services/plugins/componentMgr/componentMgrPlugin.h index 667ef9603..b6621b069 100644 --- a/open-vm-tools/services/plugins/componentMgr/componentMgrPlugin.h +++ b/open-vm-tools/services/plugins/componentMgr/componentMgrPlugin.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2021 VMware, Inc. All rights reserved. + * Copyright (C) 2021,2023 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 @@ -197,6 +197,9 @@ typedef enum InstallStatus REMOVING, /* The component is being removed on the guest OS. */ REMOVEFAILED, /* The component remove failed on the guest OS. */ + UNMANAGED, /* The component is installed on the guest OS, but + is not managed (or manageable), through the + component manager plugin. */ SCRIPTFAILED = 126, /* The component script failed for some reason. */ SCRIPTTERMINATED = 130 /* The component script terminated for some reason. */ @@ -214,7 +217,7 @@ typedef enum Action ABSENT, /* The action removes/uninstalls the components on the guest.*/ CHECKSTATUS, /* The action calls the preconfigured script to check the current status of the component. */ - INVALIDACTION /* Action not recongnised by the plugin. */ + INVALIDACTION /* Action not recognised by the plugin. */ } Action; @@ -254,7 +257,7 @@ typedef struct ComponentInfo * current running async process for a component. */ int statuscount; /* A counter value to store max number of times to - wait before starting another checkstatus opeartion + wait before starting another checkstatus operation */ Action action; /* Contains information about the action to be performed on a component. */ diff --git a/open-vm-tools/services/plugins/componentMgr/componentMgrUtil.c b/open-vm-tools/services/plugins/componentMgr/componentMgrUtil.c index dd2a3c152..a8651293a 100644 --- a/open-vm-tools/services/plugins/componentMgr/componentMgrUtil.c +++ b/open-vm-tools/services/plugins/componentMgr/componentMgrUtil.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2021 VMware, Inc. All rights reserved. + * Copyright (C) 2021,2023 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 @@ -37,7 +37,7 @@ * @param[in] ctx Tools application context. * @param[in] guestInfoCmd Guestinfo command to fetch the guestVar. * @param[out] outBuffer Output buffer to hold RPC result (optional). - * @param[out] outBufferLen Output buffer len (optional). + * @param[out] outBufferLen Output buffer length (optional). * * @return * TRUE if cmd executed successfully, otherwise FALSE @@ -115,6 +115,7 @@ ComponentMgr_GetComponentInstallStatus(InstallStatus installStatus) // IN case REMOVING: return "REMOVING"; case INSTALLFAILED: return "INSTALLFAILED"; case REMOVEFAILED: return "REMOVEFAILED"; + case UNMANAGED: return "UNMANAGED"; case SCRIPTFAILED: return "SCRIPTFAILED"; case SCRIPTTERMINATED: return "SCRIPTTERMINATED"; } @@ -191,7 +192,7 @@ ComponentMgr_GetIncludedComponents(IncludedComponents specialValue) // IN * requested components. * * @param[in] ctx Tools application context. - * @param[in] components Comma seperated list of available components. + * @param[in] components Comma separated list of available components. * * @return * None