Project

General

Profile

Bug #9518

Updated by François ARMAND about 8 years ago

When we just updated a configuration, we are getting a "missing" bar in place of a pending one.  

 Explain compliance for the node say:  

 <pre> 
 [2016-10-24 14:45:41] TRACE explain_compliance.root - Run config for node root: UnexpectedUnknowVersion : nodeId exists in DB and has configId, expected configId is fc2e4563, but d59d725c was not found (node corruption?) 
 [2016-10-24 14:45:41] TRACE explain_compliance.root - Computing compliance for node root with: [UnexpectedUnknowVersion: expected NodeConfigId: fc2e4563/[2016-10-24T14:45:33.040Z-now] | last run: nodeConfigId: d59d725c received at 2016-10-24T14:40:54.000Z | expired at 2016-10-24T14:55:33.040Z] 
 [2016-10-24 14:45:41] WARN    explain_compliance.root - Received a run at 2016-10-24T14:40:54.000Z for node 'root' configId 'd59d725c' which is not known by Rudder, and that node should be sending reports for configId fc2e4563 
 </pre> 

 But: 

 * the run exists:  

 <pre> 

 rudder=> select * from reportsexecution ; 
  nodeid |            date            | complete | nodeconfigid | insertionid 
 --------+------------------------+----------+--------------+------------- 
  root     | 2016-10-24 14:00:02+00 | t          | 0              |           102 
  root     | 2016-10-24 14:00:03+00 | t          | 0              |           107 
  root     | 2016-10-24 13:59:26+00 | f          |                |           131 
  root     | 2016-10-24 14:05:44+00 | t          | b38a998d       |           132 
  root     | 2016-10-24 14:10:50+00 | t          | b38a998d       |           177 
  root     | 2016-10-24 14:15:50+00 | t          | b38a998d       |           213 
  root     | 2016-10-24 14:20:50+00 | t          | b38a998d       |           249 
  root     | 2016-10-24 14:25:51+00 | t          | 8bddfecb       |           285 
  root     | 2016-10-24 14:30:52+00 | t          | 8bddfecb       |           321 
  root     | 2016-10-24 14:35:53+00 | t          | bd1e3772       |           357 
  root     | 2016-10-24 14:39:22+00 | t          | bd1e3772       |           394 
  root     | 2016-10-24 14:40:54+00 | t          | d59d725c       |           430 
  root     | 2016-10-24 14:45:56+00 | t          | fc2e4563       |           491 
  root     | 2016-10-24 14:50:56+00 | t          | fc2e4563       |           526 
  root     | 2016-10-24 14:55:56+00 | t          | fc2e4563       |           574 
 (15 rows) 

 </pre> 

 The reported missing nodeConfidId is in nodeconfigurations table: 

 <pre> 
 rudder=> select * from nodeconfigurations where nodeconfigid = 'd59d725c'; 


 nodeid | nodeconfigid |           begindate            |            enddate             |                                configuration 
 --------+--------------+----------------------------+----------------------------+------------------------------------------------------------------------- 
  root     | d59d725c       | 2016-10-24 14:39:41.589+00 | 2016-10-24 14:41:44.981+00 | {                                                                        + 
         |                |                              |                              |     "modes":{                                                              + 
         |                |                              |                              |       "globalPolicyMode":{                                                 + 
         |                |                              |                              |         "mode":"enforce",                                                  + 
 </pre> 


 And it is in nodes_info: 


 <pre> 
 rudder=> select * from nodes_info; 
 -[ RECORD 1 ]------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 
 node_id      | root 
 config_ids | [ 
  {"2016-10-24T14:00:39.314Z":"b38a998d"} 
 ,{"2016-10-24T14:22:14.536Z":"8bddfecb"} 
 ,{"2016-10-24T14:32:59.197Z":"bd1e3772"} 
 ,{"2016-10-24T14:39:41.589Z":"d59d725c"} 
 ,{"2016-10-24T14:41:44.981Z":"97e1744"} 
 ,{"2016-10-24T14:45:33.040Z":"fc2e4563"} 
 ] 



 </pre> 







 The nex run is correctly calculated: 
 <pre> 
 [2016-10-24 14:46:03] TRACE explain_compliance.root - Run config for node root: ComputeCompliance : Last run at 2016-10-24T14:45:56.000Z is for the correct configId fc2e4563 and not expired, compute compliance 
 [2016-10-24 14:46:03] TRACE explain_compliance.root - Computing compliance for node root with: [ComputeCompliance: expected NodeConfigId: fc2e4563/[2016-10-24T14:45:33.040Z-now] | last run: nodeConfigId: fc2e4563 received at 2016-10-24T14:45:56.000Z | expired at 2016-10-24T14:55:56.000Z] 
 [2016-10-24 14:46:03] TRACE explain_compliance.root - Using merge/compare strategy between last reports from run at 2016-10-24T14:45:56.000Z and expect reports fc2e4563/[2016-10-24T14:45:33.040Z-now] 
 [2016-10-24 14:46:03] TRACE explain_compliance.root - Compute compliance for node root using: rules for which compliance is based on run reports: [32377fd7-02fd-43d0-aab7-28460a91347b->1][inventory-all->3][hasPolicyServer-root->3][root-DP->3][server-roles->3]; rule updated since run: [] 
 [2016-10-24 14:46:34] INFO    com.normation.rudder.services.policies.DeployOnTechniqueCallback - Automatic batch update at 2016-10-24T14:46:33.606Z 
 [2016-10-24 14:51:03] TRACE explain_compliance.root - Run config for node root: ComputeCompliance : Last run at 2016-10-24T14:50:56.000Z is for the correct configId fc2e4563 and not expired, compute compliance 
 [2016-10-24 14:51:03] TRACE explain_compliance.root - Computing compliance for node root with: [ComputeCompliance: expected NodeConfigId: fc2e4563/[2016-10-24T14:45:33.040Z-now] | last run: nodeConfigId: fc2e4563 received at 2016-10-24T14:50:56.000Z | expired at 2016-10-24T15:00:56.000Z] 
 [2016-10-24 14:51:03] TRACE explain_compliance.root - Using merge/compare strategy between last reports from run at 2016-10-24T14:50:56.000Z and expect reports fc2e4563/[2016-10-24T14:45:33.040Z-now] 
 [2016-10-24 14:51:03] TRACE explain_compliance.root - Compute compliance for node root using: rules for which compliance is based on run reports: [hasPolicyServer-root->3][inventory-all->3][server-roles->3][root-DP->3][32377fd7-02fd-43d0-aab7-28460a91347b->1]; rule updated since run: [] 
 </pre> 

Back