The "InAutomation" field in the Inv_Agent_Plugin_Inventory table does not show a correct value.
Last Updated May 21, 2015
In the database, the Inv_Agent_Plugin_Inventory table holds Agent inventory information passed up to the Notification Server by the Deployment Solution plugin of the Symantec Management Agent and the automation environment counterpart (PECTAgent or ULMAgent). Part of this table is one field called "InAutomation," which reports - to some degree - whether the client machine represented by that record is in an automation environment or not.
However, it has been observed that this field is not completely accurate in reflecting the current state of the client machine. It has been observed that the first time a client is in an environment, it will successfully create/modify the record in the database, but any return to that environment may not consistently change the data to reflect this.
No direct manifestation of this incorrect data has been observed in operation/utilization of the Solution or associated components. However, any reports/filters/targets leveraging this data will be affected.
The information in this table is populated by inventory information sent to the NS by the client machines.
In the automation environment, this data is sent by the automation agent (PECTAgent or ULMAgent) via an .nse containing a limited basic inventory of the client.
In the production environment, this data is sent by the Deployment Solution Plugin via an .nse containing information specifically to be populated into the Inv_Agent_Plugin_Inventory table.
With these two methods of populating the information to the NS/database, the populated information should theoretically be accurate as to the environment of the client machine at all times, with that information having been sent by one of these two processes. However, there are other processes in place that happen to prevent this information from being populated. They are as listed below:
In order to prevent the renaming and overwriting of the basic inventory information, client machines in automation will only send their limited basic inventory .nse file when they are deemed to be an unknown client. If the client is known, it will associate with the record already existing in the database via its hardware hash (rather than full inventory information). This means that the inventory - which includes the "InAutomation" value of 'True' when booted into automation will not be sent unless this is a new client.
By design, the Notification Server keeps a hash of incoming inventory data received from client machines. This prevents duplicate identical inventory data from being repeatedly processed, potentially weighing down the server unnecessarily. This hash is stored in the ResourceUpdateSummary table, associated to the "Agent Plugin Inventory" Data Class (Guid: FC7A489F-0234-4CA9-81E4-C2C26F42E5A3). The .nse sent by the client in production includes hardware information along with the "InAutomation" value 'False', with generally no variation. Since there is no variation, it is believed that this identical file has already been processed, and is not processed again. Since it is not processed, the data in the table is not changed, regardless of the environment of the client.
In order to have the client be able to successfully update the state in the "InAutomation" value, the above listed processes need to be bypassed in the following way(s):
The state of the client machine needs to be set in the database in automation even when the client is a known machine, thus outside of the limited basic inventory functionality.
The identical inventory sent by the client in the production OS needs to be processed by the NS, either in spite of or overcoming the hash.
As a workaround, the stored procedure in the database, spDeployment_GetResourceTaskInstanceData can be piggybacked onto in order to accomplish this purpose. This stored procedure is called when a client is in automation and the client is requesting tasks from the Server. A .sql file to modify the stored procedure is attached to this article.
With the changes, on each execution of the stored procedure, these additional processes will occur:
The "InAutomation" value in the Inv_Agent_Plugin_Inventory table is set to 'True' for the client calling it.
The "DataHash" value in the ResourceUpdateSummary table is cleared for the Agent Plugin Inventory data class.
*NOTE: Though this has been tested repeatedly and shown to work consistently, it is not an official code change implemented in the product.