[Bug 998843] New: Cloud:Tools/cloud-init: Bug
http://bugzilla.opensuse.org/show_bug.cgi?id=998843 Bug ID: 998843 Summary: Cloud:Tools/cloud-init: Bug Classification: openSUSE Product: openSUSE.org Version: unspecified Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: 3rd party software Assignee: jdsn@suse.com Reporter: eblock@nde.ag QA Contact: opensuse-communityscreening@forge.provo.novell.com CC: rjschwei@suse.com Found By: --- Blocker: --- Testing cloud-init-0.7.8 for SLE12-SP1 I'm running into a UnicodeDecodeError: ---cut here--- host-172-17-2-109:/var/lib/cloud # systemctl status cloud-init-local.service cloud-init-local.service - Initial cloud-init job (pre-networking) Loaded: loaded (/usr/lib/systemd/system/cloud-init-local.service; enabled) Active: failed (Result: exit-code) since Mi 2016-09-14 16:53:05 CEST; 17s ago Process: 10270 ExecStart=/bin/touch /run/cloud-init/network-config-ready (code=exited, status=0/SUCCESS) Process: 10272 ExecStart=/usr/bin/cloud-init init --local (code=exited, status=1/FAILURE) Main PID: 10272 (code=exited, status=1/FAILURE) Sep 14 16:53:05 host-172-17-2-109 cloud-init[10272]: infile = self._handle_bom(infile) Sep 14 16:53:05 host-172-17-2-109 cloud-init[10272]: File "/usr/lib/python2.7/site-packages/configobj.py", line 1457, in _handle_bom Sep 14 16:53:05 host-172-17-2-109 cloud-init[10272]: if not line.startswith(BOM): Sep 14 16:53:05 host-172-17-2-109 cloud-init[10272]: [CLOUDINIT] util.py[DEBUG]: Reading from /proc/uptime (quiet=False) Sep 14 16:53:05 host-172-17-2-109 cloud-init[10272]: [CLOUDINIT] util.py[DEBUG]: Read 19 bytes from /proc/uptime Sep 14 16:53:05 host-172-17-2-109 cloud-init[10272]: [CLOUDINIT] util.py[DEBUG]: cloud-init mode 'init' took 0.279 seconds (0.28) Sep 14 16:53:05 host-172-17-2-109 cloud-init[10272]: [CLOUDINIT] handlers.py[DEBUG]: finish: init-local: SUCCESS: searching for local datasources Sep 14 16:53:05 host-172-17-2-109 cloud-init[10272]: UnicodeDecodeError: 'ascii' codec can't decode byte 0xff in position 0: ordinal not in range(128) Sep 14 16:53:05 host-172-17-2-109 cloud-init[10272]: ------------------------------------------------------------ Sep 14 16:53:05 host-172-17-2-109 systemd[1]: Failed to start Initial cloud-init job (pre-networking). ---cut here--- I compared the settings from cloud-init on my Leap 42.1 vm and added a couple of lines to the /usr/lib/python2.7/site-packages/configobj.py: ---cut here--- host-172-17-2-109:/var/lib/cloud # diff -u /usr/lib/python2.7/site-packages/configobj.py /usr/lib/python2.7/site-packages/configobj.py.mod --- /usr/lib/python2.7/site-packages/configobj.py 2016-09-14 16:56:15.755813701 +0200 +++ /usr/lib/python2.7/site-packages/configobj.py.mod 2016-09-14 16:56:06.411813701 +0200 @@ -1417,6 +1417,12 @@ else: line = infile + if isinstance(line, six.text_type): + # it's already decoded and there's no need to do anything + # else, just use the _decode utility method to handle + # listifying appropriately + return self._decode(infile, self.encoding) + if self.encoding is not None: # encoding explicitly supplied # And it could have an associated BOM ---cut here--- With this change the service starts successfully: ---cut here--- host-172-17-2-109:/var/lib/cloud # systemctl status cloud-init-local.service cloud-init-local.service - Initial cloud-init job (pre-networking) Loaded: loaded (/usr/lib/systemd/system/cloud-init-local.service; enabled) Active: active (exited) since Mi 2016-09-14 16:59:21 CEST; 2s ago Process: 10426 ExecStart=/bin/touch /run/cloud-init/network-config-ready (code=exited, status=0/SUCCESS) Process: 10415 ExecStart=/usr/bin/cloud-init init --local (code=exited, status=0/SUCCESS) Main PID: 10426 (code=exited, status=0/SUCCESS) ---cut here--- I'm not sure if this is really the issue, but this worked for my vm. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=998843
http://bugzilla.opensuse.org/show_bug.cgi?id=998843#c1
--- Comment #1 from Eugen Block
http://bugzilla.opensuse.org/show_bug.cgi?id=998843
http://bugzilla.opensuse.org/show_bug.cgi?id=998843#c2
--- Comment #2 from Eugen Block
http://bugzilla.opensuse.org/show_bug.cgi?id=998843
http://bugzilla.opensuse.org/show_bug.cgi?id=998843#c3
Robert Schweikert
http://bugzilla.opensuse.org/show_bug.cgi?id=998843
http://bugzilla.opensuse.org/show_bug.cgi?id=998843#c4
Robert Schweikert
participants (1)
-
bugzilla_noreply@novell.com