Project

General

Profile

Actions

Bug #8403

closed

Missing reports in file and zypper techniques due to a syntax error in reporting

Added by Daniel Stan over 8 years ago. Updated over 8 years ago.

Status:
Released
Priority:
3
Category:
Techniques
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

I encountered this error after updating to 2.11 version and running /opt/rudder/bin/cf-agent :

 @@checkGenericFileContent@@result_success@@f7038ae3-9ab4-4677-8fda-3cd958948402@@03d87dee-1b27-4330-a54a-8700f091dd0f@@14@@File@@/etc/yum.repos.d/rudder.repo@@2016-05-26 12:53:27+00:00##f1eedd54-9846-48be-bc86-2c44298dfd68@#The file /etc/yum.repos.d/rudder.repo was already in accordance with the policy
2016-05-26T08:53:28-0400    error: /default/check_generic_file_content/reports: Variable reference bracket mismatch '${generic_file_content_uuid[${index}])@@File@@${generic_file_content_path[${index}])@@${g.execRun}##${g.uuid}@#No content was given to check file ${generic_file_content_path[${index}]), skipping'
2016-05-26T08:53:28-0400    error: /default/check_generic_file_content/reports: Variable reference close mismatch '${generic_file_content_uuid[${index}])@@File@@${generic_file_content_path[${index}])@@${g.execRun}##${g.uuid}@#No content was given to check file ${generic_file_content_path[${index}]), skipping'
2016-05-26T08:53:28-0400    error: /default/check_generic_file_content/reports: Variable reference bracket mismatch '${generic_file_content_path[${index}])@@${g.execRun}##${g.uuid}@#No content was given to check file ${generic_file_content_path[${index}]), skipping'
2016-05-26T08:53:28-0400    error: /default/check_generic_file_content/reports: Variable reference close mismatch '${generic_file_content_path[${index}])@@${g.execRun}##${g.uuid}@#No content was given to check file ${generic_file_content_path[${index}]), skipping'
2016-05-26T08:53:28-0400    error: /default/check_generic_file_content/reports: Variable reference bracket mismatch '${generic_file_content_path[${index}]), skipping'
2016-05-26T08:53:28-0400    error: /default/check_generic_file_content/reports: Variable reference close mismatch '${generic_file_content_path[${index}]), skipping'
2016-05-26T08:53:28-0400    error: /default/check_generic_file_content/reports: Variable reference bracket mismatch '${generic_file_content_uuid[${index}])@@File@@${generic_file_content_path[${index}])@@${g#execRun}##${g#uuid}@#No content was given to check file ${generic_file_content_path[${index}]), skipping'
2016-05-26T08:53:28-0400    error: /default/check_generic_file_content/reports: Variable reference close mismatch '${generic_file_content_uuid[${index}])@@File@@${generic_file_content_path[${index}])@@${g#execRun}##${g#uuid}@#No content was given to check file ${generic_file_content_path[${index}]), skipping'
2016-05-26T08:53:28-0400    error: /default/check_generic_file_content/reports: Variable reference bracket mismatch '${generic_file_content_path[${index}])@@${g#execRun}##${g#uuid}@#No content was given to check file ${generic_file_content_path[${index}]), skipping'
2016-05-26T08:53:28-0400    error: /default/check_generic_file_content/reports: Variable reference close mismatch '${generic_file_content_path[${index}])@@${g#execRun}##${g#uuid}@#No content was given to check file ${generic_file_content_path[${index}]), skipping'
2016-05-26T08:53:28-0400    error: /default/check_generic_file_content/reports: Variable reference bracket mismatch '${generic_file_content_path[${index}]), skipping'
2016-05-26T08:53:28-0400    error: /default/check_generic_file_content/reports: Variable reference close mismatch '${generic_file_content_path[${index}]), skipping'
2016-05-26T08:53:28-0400    error: /default/check_generic_file_content/reports: Variable reference bracket mismatch '${generic_file_content_uuid[${index}])@@File@@${generic_file_content_path[${index}])@@${g#execRun}##${g#uuid}@#No content was given to check file ${generic_file_content_path[${index}]), skipping'
2016-05-26T08:53:28-0400    error: /default/check_generic_file_content/reports: Variable reference close mismatch '${generic_file_content_uuid[${index}])@@File@@${generic_file_content_path[${index}])@@${g#execRun}##${g#uuid}@#No content was given to check file ${generic_file_content_path[${index}]), skipping'
2016-05-26T08:53:28-0400    error: /default/check_generic_file_content/reports: Variable reference bracket mismatch '${generic_file_content_path[${index}])@@${g#execRun}##${g#uuid}@#No content was given to check file ${generic_file_content_path[${index}]), skipping'
2016-05-26T08:53:28-0400    error: /default/check_generic_file_content/reports: Variable reference close mismatch '${generic_file_content_path[${index}])@@${g#execRun}##${g#uuid}@#No content was given to check file ${generic_file_content_path[${index}]), skipping'
2016-05-26T08:53:28-0400    error: /default/check_generic_file_content/reports: Variable reference bracket mismatch '${generic_file_content_path[${index}]), skipping'
2016-05-26T08:53:28-0400    error: /default/check_generic_file_content/reports: Variable reference close mismatch '${generic_file_content_path[${index}]), skipping'

After debugging this further I noticed that the problem was wrong syntax in these files:

/var/rudder/cfengine-community/inputs-bak/checkGenericFileContent/3.2/checkGenericFileContent.cf:                "@@checkGenericFileContent@@result_success@@${generic_file_content_uuid[${index}])@@File@@${generic_file_content_path[${index}])@@${g.execRun}##${g.uuid}@#No content was given to check file ${generic_file_content_path[${index}]), skipping" 
/var/rudder/cfengine-community/inputs.bkp/checkGenericFileContent/3.2/checkGenericFileContent.cf:                "@@checkGenericFileContent@@result_success@@${generic_file_content_uuid[${index}])@@File@@${generic_file_content_path[${index}])@@${g.execRun}##${g.uuid}@#No content was given to check file ${generic_file_content_path[${index}]), skipping" 
/var/rudder/configuration-repository/techniques/fileDistribution/checkGenericFileContent/3.2/checkGenericFileContent.st:                "@@checkGenericFileContent@@result_success@@${generic_file_content_uuid[${index}])@@File@@${generic_file_content_path[${index}])@@${g.execRun}##${g.uuid}@#No content was given to check file ${generic_file_content_path[${index}]), skipping" 
/var/rudder/configuration-repository/techniques/fileDistribution/checkGenericFileContent/3.1/checkGenericFileContent.st:                "@@checkGenericFileContent@@result_success@@${generic_file_content_uuid[${index}])@@File@@${generic_file_content_path[${index}])@@${g.execRun}##${g.uuid}@#No content was given to check file ${generic_file_content_path[${index}]), skipping" 
/var/rudder/configuration-repository/techniques/fileDistribution/checkGenericFileContent/3.0/checkGenericFileContent.st:      "@@checkGenericFileContent@@result_success@@${generic_file_content_uuid[${index}])@@File@@${generic_file_content_path[${index}])@@${g.execRun}##${g.uuid}@#No content was given to check file ${generic_file_content_path[${index}]), skipping" 
/var/rudder/configuration-repository/techniques/applications/zypperPackageManagerSettings/1.0/zypperPackageManagerSettings.st:      "@@zypperPackageManagerSettings@@result_success@@${zypper_uuid[${zypper_index}]}@@Repository@@$(zypper_url[${zypper_index}])@@${g.execRun}##${g.uuid}@#The ZYPPER source $(zypper_name[${zypper_index}]) was already here. Skipping..." 

After correcting them and updating "/var/rudder/configuration-repository/" repo the error disappeared. I just saw this error so it may have been introduced recently.

I am not sure if this was added to the correct project , but feel free to move this to the proper place.

Regards
Daniel Stan

Actions

Also available in: Atom PDF