Description of problem: When Config-Files with macros are used, using rhncfg-client get or rhncfg-client verify fails with Traceback (most recent call last): File "/usr/bin/rhncfg-client", line 38, in <module> sys.exit(Main().main() or 0) File "/usr/share/rhn/config_common/rhn_main.py", line 207, in main handler.run() File "/usr/share/rhn/config_client/rhncfgcli_get.py", line 25, in run self.options.exclude) File "/usr/share/rhn/config_common/deploy.py", line 42, in deploy_files finfo = repository.get_file_info(*args, **kwargs) File "/usr/share/rhn/config_client/rpc_cli_repository.py", line 91, in get_file_info temp_file, dirs_created = f.process(result, directory=dest_directory) File "/usr/share/rhn/config_common/file_utils.py", line 81, in process raise Exception, "Corrupt file received: Content checksums do not match!" Exception: Corrupt file received: Content checksums do not match! Version-Release number of selected component (if applicable): rhncfg-client-5.10.55-10.el6sat.noarch rhncfg-5.10.55-10.el6sat.noarch rhncfg-actions-5.10.55-10.el6sat.noarch How reproducible: Use a macro in a config file, eg. in /etc/postfix/main.cf: myhostname = {| rhn.system.hostname |} Steps to Reproduce: 1. add myhostname = {| rhn.system.hostname |} to /etc/postfix/main.cf in a config channel. Probably the same for any other file/macro 2. run rhncfg-client get /etc/postfix/main.cf on the client system 3. Actual results: Traceback (most recent call last): File "/usr/bin/rhncfg-client", line 38, in <module> sys.exit(Main().main() or 0) File "/usr/share/rhn/config_common/rhn_main.py", line 207, in main handler.run() File "/usr/share/rhn/config_client/rhncfgcli_verify.py", line 73, in run (src, file_info, dirs_created) = self.repository.get_file_info(file) File "/usr/share/rhn/config_client/rpc_cli_repository.py", line 91, in get_file_info temp_file, dirs_created = f.process(result, directory=dest_directory) File "/usr/share/rhn/config_common/file_utils.py", line 81, in process raise Exception, "Corrupt file received: Content checksums do not match!" Exception: Corrupt file received: Content checksums do not match! Expected results: Config files with macros should be deployed Additional info:
forgot to mention that it works again after yum downgrade rhncfg-5.10.55-8.el6sat rhncfg-client-5.10.55-8.el6sat rhncfg-actions-5.10.55-8.el6sat
I could reproduce this also with rhncfg-5.10.77-1.el6.noarch rhncfg-client-5.10.77-1.el6.noarch rhncfg-actions-5.10.77-1.el6.noarch from http://yum.spacewalkproject.org/nightly-client/RHEL/6/x86_64/ against spacewalk 2.2 (not spacewalk nightly, don't know if any server part has an impact on this.)
The fix for this problem is going to come in two parts. Part 1 - client side: We will release updated rhncfg* packages that cause this exception to not happen. This will ensure that the latest rhncfg works correctly against any version of Red Hat Satellite or RHN Classic. Part 2 - serer side: We will release updated spacewalk-backend packages for Satellite that will correctly checksum config files containing macros. When using updated Satellite with an updated client then checksum validation of the config file contents will happen and work correctly before the config file is deployed. If using only an updated client then config file deployment will happen correctly, however the contents will not be validated (the same behavior as rhncfg-5.10.55-8). This bug will track part 1. I will create a clone to track part 2.
Committing to Spacewalk master: 2328a546d67847a61923bbe6f4085a8d2a802fba
KCS Solution https://access.redhat.com/solutions/1198383 with workaround has been updated with current status and BZ#s (thanks Stephen for heads-up!).
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2014-1261.html