Comment 2 for bug 1722992

Revision history for this message
Scott Moser (smoser) wrote :

Any datasource that uses convert_vendordata is possibly affected.

This is bad in that it fails, but not as bad as it could be. Cloud-init
itself never re-constitutes the blob on disk. Its only a convenience for
the user.

What we should do:
 a.) always have vendordata_raw be bytes
 b.) write them as bytes to the file

We can still allow the datasource to use something like 'convert_vendordata'
intelligently to get types other than bytes. We just have to have
the 'get_vendordata' function access a different attribute in the datasource.

ie:
- DataSource.vendordata_raw should always be the raw bytes as found.
- get_vendordata would then use some other attribuate 'vendordata_converted' (?) to take advantage of the datasource specific knowlege.