Lot of Configuration jobs sent to the agents everyday
search cancel

Lot of Configuration jobs sent to the agents everyday

book

Article ID: 369303

calendar_today

Updated On:

Products

CA Client Automation - IT Client Manager CA Client Automation

Issue/Introduction

Every day a lot of configuration jobs are sent to lot of agents without reasons.

Another symptom is that following errors are seen on some computers
Policy Error
Error in parent group configuration.

Environment

Client Automation - All Versions

Cause

Some groups had a configuration policy applied but this configuration policy has been deleted.
A configuration job remains linked to the group in database. And when a computer is added or removed from this group, ccsmact wrongly detects this as a configuration change and a configuration job is sent to the agent.
 
This SQL Query indicates if there are some groups with this problem :
SELECT groups.name 'Group Name', config.name 'Configuration Job Name'
FROM csm_object config
LEFT JOIN csm_link l1 ON l1.child=config.id
LEFT JOIN csm_object groups ON l1.parent=groups.id
LEFT JOIN csm_property p ON p.object=config.id
WHERE config.class=108 and groups.class=200 and config.id not in (SELECT parent FROM csm_link WHERE child in (SELECT id FROM csm_object WHERE class=2000))
and config.name not like '$allcomputer%' and p.name='listcnt_c_v2' and p.value=0
ORDER BY 1
 
In example below, some groups have a linked configuration job but the configuration policy does not exist anymore :
 

Resolution

If the SQL Query above returns some rows, execute this SQL script to remove the configuration jobs linked to the groups.

use mdb
IF OBJECT_ID ('tempdb.dbo.#TMP1','U') IS NOT NULL DROP TABLE #TMP1

SELECT o.id INTO #TMP1 FROM csm_object o, csm_property p WHERE class=108 and o.id in
(SELECT child FROM csm_link WHERE parent in (SELECT id FROM csm_object WHERE class=200))
and o.id not in (SELECT parent FROM csm_link WHERE child in (SELECT id FROM csm_object WHERE class=2000))
and o.name not like '$allcomputer%' and o.id=p.object and p.name='listcnt_c_v2' and p.value=0


DELETE FROM csm_link WHERE parent in (SELECT id FROM #TMP1) OR child in (SELECT id FROM #TMP1)
UPDATE csm_property SET object=0 WHERE object in (SELECT id FROM #TMP1)
UPDATE csm_object SET class=0,uuid=0x00000000000000000000000000000000,name='' WHERE id in (SELECT id FROM #TMP1)

UPDATE csm_property
SET object=0 
WHERE object in (
  SELECT id FROM csm_object WHERE class=200
  and id in (SELECT object FROM csm_property WHERE name='activeconfiguuid')
  and id not in (SELECT parent FROM csm_link WHERE child in (SELECT id FROM csm_object WHERE class=108))
) and name='activeconfiguuid'

IF OBJECT_ID ('tempdb.dbo.#TMP1','U') IS NOT NULL DROP TABLE #TMP1

 

After execution of this SQL script, the SQL Query should return 0 row