Hello GaurhothW,
I'm starting to look into this as I am also in need to get documentation on the decision process.
It won't answer your question but I am beginning the research from the web-interfaces used by the Client Task Agent:
- /Altiris/TaskManagement/CTAgent/GetClientTaskServers.aspx
This interfaces is redirected to an assembly via the web.config under the "TaskManagement\CTAgentWeb" (so the aspx file doesn't physically exist).
The class on the assembly is (as you could guess) named GetClientTaskServers and contains methods to return a list of servers following this execution path (simplified):
- update performance counters
- get the caller resource guid from the http request
- get the caller ip address from http request (could thus be a proxy or content engine) [See Update 2]
- get Task server for guid and ip (1)
- if no task server returned: run GetAnyTaskServer(2)
- write for each TS the name, resource and guid entry in xml
- send the response to the caller
The call in (1) are pretty deep and refer to generic functions, including string caches and site service caches, so it's hardly to exactly find what happens there.
But at least we know what happens when no task servers are found (2): the following SQL query is executed.
SELECT CASE WHEN tcp.[Primary DNS Suffix] IS NOT NULL AND tcp.[Primary DNS Suffix] != '' THEN [Host Name] + '.' + tcp.[Primary DNS Suffix]
WHEN [Host Name] IS NOT NULL THEN [Host Name]
WHEN [Host Name] IS NULL THEN vci.Name END,
vci.Guid
FROM [dbo].[vTaskServiceResource] vts
JOIN [dbo].vRM_Computer_Item vci on vts.ResourceGuid = vci.Guid
LEFT JOIN Inv_AeX_AC_TCPIP tcp ON tcp._ResourceGuid = vci.Guid AND
tcp.[_id] = (SELECT TOP 1 t.[_id]
FROM [Inv_AeX_AC_TCPIP] t
WHERE vts.[ResourceGuid]=t.[_ResourceGuid] AND t.[IP Address] NOT IN ('127.0.0.1', '0.0.0.0', '') AND NOT t.[IP Address] IS NULL
ORDER BY t.Routable DESC)
If the query returns nothing the hostname for the NS is sent back to the client.
I'll try to go deeper into this later on today or during the week, as I haven't been able to walk down the success path on this brief introduction to the process.
Update 1! The profiler doesn't return anything of interest for this as no profiling hooks are present in TaskManagement...
Update 2! This is corrected in Pointfix rollup version 18 (HOWTO36013) so the NS now uses a list of ip for the computer from the DB.