mirror of
https://github.com/valitydev/salt.git
synced 2024-11-06 16:45:27 +00:00
Make sure we pass userdata as bytes to base64 encoder
This commit is contained in:
parent
6b780c6d36
commit
37808fbc53
@ -1818,7 +1818,9 @@ def request_instance(vm_=None, call=None):
|
||||
|
||||
if userdata is not None:
|
||||
try:
|
||||
params[spot_prefix + 'UserData'] = base64.b64encode(userdata)
|
||||
params[spot_prefix + 'UserData'] = base64.b64encode(
|
||||
salt.utils.stringutils.to_bytes(userdata)
|
||||
)
|
||||
except Exception as exc:
|
||||
log.exception('Failed to encode userdata: %s', exc)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user