New Question

Revision history [back]

click to hide/show revision 1
initial version

Failure running multipart shellscript with Terraform and OpenStack

Hi,

I am hitting an issue when launching Windows 2012R2 images on OpenStack Stein using Terraform. I initially thought though issue was with my image but I have used the "eval" image from Cloudbase and the results are the same. Cloud-init is working fine and all the standard provisioning seems to work but when I try execute multipart userdata that consists of 2 shell scripts fail to execute.

The backtrace for each script is identical:

2020-04-29 14:04:58.381 924 DEBUG cloudbaseinit.plugins.common.userdata [-] Executing userdata plugin: ShellScriptPlugin _process_part c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\plugins\common\userdata.py:145
2020-04-29 14:04:58.396 924 ERROR cloudbaseinit.plugins.common.userdata [-] Exception during multipart part handling: text/x-shellscript, None
2020-04-29 14:04:58.412 924 ERROR cloudbaseinit.plugins.common.userdata [-] object of type 'NoneType' has no len()
2020-04-29 14:04:58.412 924 ERROR cloudbaseinit.plugins.common.userdata Traceback (most recent call last):
2020-04-29 14:04:58.412 924 ERROR cloudbaseinit.plugins.common.userdata   File "c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\plugins\common\userdata.py", line 153, in _process_part
2020-04-29 14:04:58.412 924 ERROR cloudbaseinit.plugins.common.userdata     ret_val = user_data_plugin.process(part)
2020-04-29 14:04:58.412 924 ERROR cloudbaseinit.plugins.common.userdata   File "c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\plugins\common\userdataplugins\shellscript.py", line 36, in process
2020-04-29 14:04:58.412 924 ERROR cloudbaseinit.plugins.common.userdata     target_path = os.path.join(tempfile.gettempdir(), file_name)
2020-04-29 14:04:58.412 924 ERROR cloudbaseinit.plugins.common.userdata   File "c:\program files\cloudbase solutions\cloudbase-init\python\lib\ntpath.py", line 110, in join
2020-04-29 14:04:58.412 924 ERROR cloudbaseinit.plugins.common.userdata     p_drive, p_path = splitdrive(p)
2020-04-29 14:04:58.412 924 ERROR cloudbaseinit.plugins.common.userdata   File "c:\program files\cloudbase solutions\cloudbase-init\python\lib\ntpath.py", line 159, in splitdrive
2020-04-29 14:04:58.412 924 ERROR cloudbaseinit.plugins.common.userdata     if len(p) > 1:
2020-04-29 14:04:58.412 924 ERROR cloudbaseinit.plugins.common.userdata TypeError: object of type 'NoneType' has no len()
2020-04-29 14:04:58.412 924 ERROR cloudbaseinit.plugins.common.userdata

I am not sure where to start looking for a solution.

I have pasted the full output here: https://pastebin.com/FkpGQfWK