Bug 1280448

Summary: Can't find kickstart file when it contains UTF-8 characters
Product: [Fedora] Fedora Reporter: Dávid Halász <dhalasz>
Component: anacondaAssignee: Anaconda Maintenance Team <anaconda-maint-list>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 23CC: anaconda-maint-list, derrien, g.kaviyarasu, holm, jonathan, pascal, vanmeeuwen+fedora
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-11 21:21:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dávid Halász 2015-11-11 18:31:52 UTC
Description of problem:
When there are special UTF-8 characters in the kickstart file, anaconda shows that the file is missing. 


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


How reproducible:


Steps to Reproduce:
1. Create a kickstart file with some UTF-8 special characters
2. Start the installer with the created kickstart file

Actual results:
Kickstart file /run/install/ks.cfg is missing

Output from journalctl -a:
Nov 11 18:22:18 localhost dracut-initqueue[590]: anaconda fetching kickstart from http://192.168.122.1:8000/ks.cfg
Nov 11 18:22:18 localhost dracut-initqueue[590]: % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
Nov 11 18:22:18 localhost dracut-initqueue[590]: Dload  Upload   Total   Spent    Left  Speed
Nov 11 18:22:18 localhost dracut-initqueue[590]: 0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  7812  100  7812    0     0  2990k      0 --:--:-- --:--:-- --:--:-- 3814k
Nov 11 18:22:19 localhost dracut-initqueue[590]: Traceback (most recent call last):
Nov 11 18:22:19 localhost dracut-initqueue[590]: File "/sbin/parse-kickstart", line 609, in <module>
Nov 11 18:22:19 localhost dracut-initqueue[590]: outfile, output = process_kickstart(path)
Nov 11 18:22:19 localhost dracut-initqueue[590]: File "/sbin/parse-kickstart", line 585, in process_kickstart
Nov 11 18:22:19 localhost dracut-initqueue[590]: processed_file = preprocessKickstart(ksfile)
Nov 11 18:22:19 localhost dracut-initqueue[590]: File "/usr/lib/python3.4/site-packages/pykickstart/parser.py", line 124, in preprocessKickstart
Nov 11 18:22:19 localhost dracut-initqueue[590]: contents = load_to_str(f)
Nov 11 18:22:19 localhost dracut-initqueue[590]: File "/usr/lib/python3.4/site-packages/pykickstart/load.py", line 44, in load_to_str
Nov 11 18:22:19 localhost dracut-initqueue[590]: return _load_file(location)
Nov 11 18:22:19 localhost dracut-initqueue[590]: File "/usr/lib/python3.4/site-packages/pykickstart/load.py", line 93, in _load_file
Nov 11 18:22:19 localhost dracut-initqueue[590]: contents = fh.read()
Nov 11 18:22:19 localhost dracut-initqueue[590]: File "/usr/lib64/python3.4/encodings/ascii.py", line 26, in decode
Nov 11 18:22:19 localhost dracut-initqueue[590]: return codecs.ascii_decode(input, self.errors)[0]
Nov 11 18:22:19 localhost dracut-initqueue[590]: UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1579: ordinal not in range(128)
Nov 11 18:22:19 localhost dracut-initqueue[590]: /lib/anaconda-lib.sh: line 212: /tmp/ks.info: No such file or directory


Expected results:


Additional info:
I wanted to create an user with diacritics in the --gecos parameter, but it also fails if you're trying to echo special characters in the %post section.

Comment 1 David Shea 2015-11-11 21:16:20 UTC
This has been fixed in pykickstart (after the F23 release, obviously, and unfortunately), and I'm adding a test in anaconda to make sure it stays fixed.

Comment 2 David Shea 2015-11-13 14:24:30 UTC
*** Bug 1281825 has been marked as a duplicate of this bug. ***

Comment 3 David Shea 2016-01-18 13:39:31 UTC
*** Bug 1298892 has been marked as a duplicate of this bug. ***

Comment 4 David Shea 2016-03-28 13:47:22 UTC
*** Bug 1321363 has been marked as a duplicate of this bug. ***