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 almost 5 years ago. Updated almost 5 years ago.

Status:
Released
Priority:
3
Category:
Techniques
Target version:
Severity:
User visibility:
Effort required:
Priority:

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 #1

Updated by Jonathan CLARKE almost 5 years ago

  • Assignee set to Nicolas CHARLES
Actions #2

Updated by Nicolas CHARLES almost 5 years ago

  • Status changed from New to In progress
Actions #3

Updated by Nicolas CHARLES almost 5 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
Actions #4

Updated by Nicolas CHARLES almost 5 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 )

Actions #5

Updated by Nicolas CHARLES almost 5 years ago

  • Status changed from Pending technical review to Pending release
  • % Done changed from 0 to 100
Actions #6

Updated by Daniel Stan almost 5 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

Actions #7

Updated by Vincent MEMBRÉ almost 5 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
Actions #8

Updated by Vincent MEMBRÉ almost 5 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 2.11.22, 3.0.17, 3.1.11 and 3.2.4 which were released today.

Actions

Also available in: Atom PDF