Description of problem: Running satellite-sync from disk export with non-default locale fails with thraceback. Version-Release number of selected component (if applicable): spacewalk-backend-1.5.3-1.el6 How reproducible: always Steps to Reproduce: 1. export LC_CTYPE=cs_CZ.UTF-8 2. export LC_TIME=cs_CZ.UTF-8 3. rhn-satellite-exporter -d exp -c rhel-i386-server-6 --no-rpms --no-packages --no-kickstarts --print-report 4. satellite-sync -l -m rhel6/ Actual results: 08:41:09 Red Hat Network Satellite - file-system synchronization 08:41:09 mp: /tmp/rhel6 08:41:09 db: spaceuser/<password>@dbname=spaceschema;host=localhost;port=5432 08:41:09 08:41:09 Retrieving / parsing channel-families data 08:41:09 channel-families data complete 08:41:09 08:41:09 Retrieving / parsing product names data 08:41:09 08:41:09 Retrieving / parsing channel data 08:41:09 p = previously imported/synced channel 08:41:09 . = channel not yet imported/synced 08:41:09 base-channels: +++ sending log as an email +++ SYNC ERROR: unhandled exception occurred: (Check logs/email for potentially more detail) UnicodeDecodeError('ascii', 'P\xc3\xa1\xc2\xa015.\xc2\xa0duben\xc2\xa02011,\xc2\xa005:12:40\xc2\xa0', 1, 2, 'ordinal not in range(128)') 'ascii' codec can't decode byte 0xc3 in position 1: ordinal not in range(128) Expected results: list of channels as usual Additional info: /var/log/rhn/rhn_server_satellite.log: Traceback (most recent call last): File "/usr/bin/satellite-sync", line 139, in main return satsync.Runner().main() File "/usr/lib/python2.6/site-packages/spacewalk/satellite_tools/satsync.py", line 227, in main ret = method() File "/usr/lib/python2.6/site-packages/spacewalk/satellite_tools/satsync.py", line 302, in _step_channels self.syncer.process_channels() File "/usr/lib/python2.6/site-packages/spacewalk/satellite_tools/satsync.py", line 667, in process_channels self._printChannelTree(doEOSYN=doEOSYN) File "/usr/lib/python2.6/site-packages/spacewalk/satellite_tools/satsync.py", line 755, in _printChannelTree self._printChannel(plabel, channel_object, p_format, (plabel in ch_requested_imported)) File "/usr/lib/python2.6/site-packages/spacewalk/satellite_tools/satsync.py", line 726, in _printChannel log(1, format % (status, label, pkgs_count, self._formatChannelExportType(channel_object))) File "/usr/lib/python2.6/site-packages/spacewalk/satellite_tools/satsync.py", line 712, in _formatChannelExportType return _("%10s import from %s") % (export_type, self._formatDateTime(end_date)) UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1: ordinal not in range(128)
Fixed in spacewalk nightly by commit 513be7ad9c8f73630582cef905ca1b7a9052a3df 696970 - disabled localization backend logging subclasses aren't prepared for full localization yet commit db5df50dd31a51d147073ee9f104f8a8e7ec3e37 696970 - unified time printing via formatDateTime() commit a39b67afaa28231434b22393f09563886e77c335 696970 - %%c is the preferred date/time representation for the current locale commit 23fc724aa5bcd8ef5898ac6c2379eaa71f0830cc 696970 - locale must be initialized by calling setlocale(LC_ALL, '')
*** Bug 720642 has been marked as a duplicate of this bug. ***
This bugzilla is currently MODIFIED, so we believe the fix is in the Spacewalk nightly yum repository at http://spacewalk.redhat.com/yum/nightly/ Therefore, moving ON_QA.
Spacewalk 1.5 was released.