curtin_userdata fails on 1.10 because of python3 bytes object nonsense

Bug #1548467 reported by Jeff Lane 
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
maas-cert-server
Fix Released
Medium
Jeff Lane 

Bug Description

https://bugs.launchpad.net/maas/+bug/1548402

curtin_userdata has some python2 code that doesn't work on 1.10 and Xenial due to the switch to Python3 in MAAS there.

This fails because

cache_output = check_output(['apt-cache', 'policy', 'maas'])

now returns a bytes object, rather than strings.

Simple fix, decode the output to utf-8 when we run check_output.

Related branches

Revision history for this message
Jeff Lane  (bladernr) wrote :

Tested fix on both 1.10/Xenial and 1.9/Trusty, and it seems to work just fine.

Changed in maas-cert-server:
status: In Progress → Fix Committed
status: Fix Committed → Fix Released
Jeff Lane  (bladernr)
Changed in maas-cert-server:
status: Fix Released → Fix Committed
Jeff Lane  (bladernr)
Changed in maas-cert-server:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.