Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1437347

Summary: Custom vendor data causes cloud-init failure on 0.7.5
Product: Red Hat Enterprise Linux 6 Reporter: James Biao <jbiao>
Component: cloud-initAssignee: Lars Kellogg-Stedman <lars>
Status: CLOSED CURRENTRELEASE QA Contact: Vratislav Hutsky <vhutsky>
Severity: high Docs Contact:
Priority: urgent    
Version: 6.9CC: dbecker, dmaley, fdinitto, jbiao, jgreguske, lars, mbracho, mkolaja, mschuppe, rmccabe, sboulden, toneata
Target Milestone: rcKeywords: Triaged, ZStream
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: cloud-init-0.7.5-7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1449994 (view as bug list) Environment:
Last Closed: 2018-06-21 08:43:58 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:
Bug Depends On:    
Bug Blocks: 1449994    

Description James Biao 2017-03-30 07:46:11 UTC
Description of problem:
	
Customer is in a secure environment.
# Note SOS reports cannot be provided for this account

We are experiencing the bug documented here: https://bugs.launchpad.net/cloud-init/+bug/1469260

We are using vendor_data in our OSP10 cloud and cloud-init is throwing unhashable type error.

Converting the data to string bypasses the error in user_data.py. However the bug report has a patch with a more permanent fix.

# Coverts a raw string into a mime message
 def convert_string(raw_data, headers=None):
     if not raw_data:
         raw_data = ''
     if not headers:
         headers = {}
-     data = util.decomp_gzip(raw_data)
+    data = str(util.decomp_gzip(raw_data))
     if "mime-version:" in data[0:4096].lower():
         msg = email.message_from_string(data)
         for (key, val) in headers.iteritems():
             _replace_header(msg, key, val)
     else:
         mtype = headers.get(CONTENT_TYPE, NOT_MULTIPART_TYPE)
         maintype, subtype = mtype.split("/", 1)
         msg = MIMEBase(maintype, subtype, *headers)
         msg.set_payload(data)
     return msg

Version-Release number of selected component (if applicable):
cloud-init 0.7.5 (using default RHEL 6.9 qcow2 image from customer portal)

How reproducible:
always

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 11 Lars Kellogg-Stedman 2017-05-01 14:53:56 UTC
Maria: looking for a pm_ack