Bug 1381343 - Config diff failure on Fedora 23
Summary: Config diff failure on Fedora 23
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Clients
Version: 2.5
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Gennadii Altukhov
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: 1395894 space27
TreeView+ depends on / blocked
 
Reported: 2016-10-03 18:51 UTC by max
Modified: 2017-09-27 19:22 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1395894 (view as bug list)
Environment:
Last Closed: 2017-09-27 19:22:58 UTC
Embargoed:


Attachments (Terms of Use)

Description max 2016-10-03 18:51:41 UTC
Description of problem:
Spacewalk client 2.5 fails to diff config files on Fedora 23

Version-Release number of selected component (if applicable):
Spacewalk client 2.5

How reproducible:
Can reproduce

Steps to Reproduce:
1. Install client on latest updated Fedora 23
2. Deploy config file to system
3. Attempt to diff the config file

Actual results:
Returns python error due to <str> missing decode function:
(excerpt from /var/log/up2date)
File "/usr/share/rhn/actions/configfiles.py", line 332, in is_utf8
    input.decode('utf-8')
<class 'AttributeError'>: 'str' object has no attribute 'decode'

Expected results:
Diff to pass without errors.

Additional info:
Investigation indicates this is due to newer versions of Python 3. Per updated versions, the .decode function for strings has been removed due to adjustments in string handling.

Adjustment of the configfiles.py to always return true does not overtly show fault while enabling the script to continue.

Comment 1 Gennadii Altukhov 2016-10-20 16:32:08 UTC
The problem is in diff action in rhncfg-action-control.

Actual steps to reproduce:

1. Register Fedora 23 system in Spacewalk
2. If there is no config channel, create one
3. Subscribe registered system to config channel (Systems -> <system_name> -> Configuration -> Manage Configuration Channels -> Subscribe to Channels)
4. On Fedora 23 system deploy configuration file from Channel:
   # rhncfg-client get
5. On Fedora 23 system install rhncfg* and enable all actions (actually we need    only 'diff')
   # dnf install rhncfg*
   # rhn-actions-control --enable-all
6. Change some of the deployed to Fedora 23 configuration files
7. In Spacewalk Web UI try to get diff between file deployed on Fedora 23 system and file in Spacewalk Configuration Channel (Systems -> <system_name> -> Configuration -> Compare Files)

Results:
cannot get diff, error in /var/log/up2date

Comment 2 Gennadii Altukhov 2016-10-20 16:32:33 UTC
spacewalk.git:
963fba6b14206fbd42dd0feada1b7ead1490eb99

Comment 3 Radovan Drazny 2016-11-11 10:51:12 UTC
Reproduced on rhncfg-client-5.10.93-1.fc23 using the reproducer from comment #1, with the result described in initial report (<class 'AttributeError'>: 'str' object has no attribute 'decode').

After update to rhncfg-client-5.10.98-1 and rescheduling the "Compare files" event, the comparison in performed correctly, and it is possible to display the diff output in WebUI. 
VERIFIED

Comment 4 Eric Herget 2017-09-27 19:22:58 UTC
This looks like it was fixed in previous release, but I'm closing it in this one.

Spacewalk 2.7 has been released.

https://github.com/spacewalkproject/spacewalk/wiki/ReleaseNotes27


Note You need to log in before you can comment on or make changes to this bug.