Bug #8403
closedMissing reports in file and zypper techniques due to a syntax error in reporting
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
Updated by Nicolas CHARLES over 8 years ago
- Status changed from New to In progress
Updated by Nicolas CHARLES over 8 years ago
- Status changed from In progress to Pending technical review
- Assignee changed from Nicolas CHARLES to Benoît PECCATTE
- Pull Request set to https://github.com/Normation/rudder-techniques/pull/964
Updated by Nicolas CHARLES over 8 years ago
Thank you Daniel ! This is a good catch
However, I strongly advice that you migrate to latest version of the technique, and to a newer version of Rudder (3.1 or 3.2), as 2.11 will be maintained only until 10th September 2016 ( https://www.rudder-project.org/site/documentation/faq/#what_is_the_end-of-life_eol_mainteance_period_for_each_major_version )
Updated by Nicolas CHARLES over 8 years ago
- Status changed from Pending technical review to Pending release
- % Done changed from 0 to 100
Applied in changeset rudder-techniques|0c3d839e2c75aa6b70e1b3e309d2fbfd579f2d70.
Updated by Daniel Stan over 8 years ago
i am glad I could help.
I am in the process of upgrading to the latest version but I had to upgrade to 2.11 to proceed further with the process
Updated by Vincent MEMBRÉ over 8 years ago
- Subject changed from error: /default/check_generic_file_content/reports: Variable reference bracket mismatch to Missing reports in file and zypper techniques due to a syntax error in reporting
Updated by Vincent MEMBRÉ over 8 years ago
- Status changed from Pending release to Released