Hi Guys,
i am running into a situation that my system is trying to run the script which is provided through the user-data field. i can see that the script is in the log file, and that its beeing placed onto the system.
if i run the script ( which i copied from the cloudinit.log ) locally to a file and then run it, all is fine, no problems what so ever (so the script is fine) but when the cloudinit runs it, it fails every time.
i also believe this is due to the fact that cloudinit-unattended is rebooting the system to set the hostname.
Here is a part of the log (verbose and debug are true)
2019-01-15 10:14:59.827 1844 INFO cloudbaseinit.init [-] Executing plugin 'UserDataPlugin' 2019-01-15 10:14:59.827 1844 DEBUG cloudbaseinit.metadata.services.base [-] Getting metadata from: http://ipaddress/latest/user-data _http_request c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\metadata\services\base.py:255 2019-01-15 10:14:59.842 1844 DEBUG cloudbaseinit.plugins.common.userdata [-] User data content length: 3716 execute c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\plugins\common\userdata.py:49 2019-01-15 10:14:59.842 1844 DEBUG cloudbaseinit.plugins.common.userdata [-] Processing userdata _process_user_data c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\plugins\common\userdata.py:108 2019-01-15 10:14:59.842 1844 DEBUG cloudbaseinit.utils.classloader [-] Loading class 'cloudbaseinit.plugins.common.userdataplugins.parthandler.PartHandlerPlugin' load_class c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\utils\classloader.py:27 2019-01-15 10:14:59.842 1844 DEBUG cloudbaseinit.utils.classloader [-] Loading class 'cloudbaseinit.plugins.common.userdataplugins.cloudconfig.CloudConfigPlugin' load_class c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\utils\classloader.py:27 2019-01-15 10:14:59.951 1844 DEBUG cloudbaseinit.utils.classloader [-] Loading class 'cloudbaseinit.plugins.common.userdataplugins.cloudboothook.CloudBootHookPlugin' load_class c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\utils\classloader.py:27 2019-01-15 10:14:59.967 1844 DEBUG cloudbaseinit.utils.classloader [-] Loading class 'cloudbaseinit.plugins.common.userdataplugins.shellscript.ShellScriptPlugin' load_class c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\utils\classloader.py:27 2019-01-15 10:14:59.967 1844 DEBUG cloudbaseinit.utils.classloader [-] Loading class 'cloudbaseinit.plugins.common.userdataplugins.multipartmixed.MultipartMixedPlugin' load_class c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\utils\classloader.py:27 2019-01-15 10:14:59.967 1844 DEBUG cloudbaseinit.utils.classloader [-] Loading class 'cloudbaseinit.plugins.common.userdataplugins.heat.HeatPlugin' load_class c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\utils\classloader.py:27 2019-01-15 10:14:59.967 1844 DEBUG cloudbaseinit.plugins.common.userdata [-] User data content: Content-Type: multipart/mixed; boundary="MIMEBOUNDARY" MIME-Version: 1.0 --MIMEBOUNDARY Content-Disposition: attachment; filename="cloudinit.ps1" Content-Transfer-Encoding: 7bit Content-Type: text/x-shellscript Mime-Version: 1.0 #ps1_sysnative $chefversion = 'xxx' $chefenvironment = 'xxx' $vaulttoken = 'xxx' $validationcert = 'xxx' $nodename = ($env:COMPUTERNAME).ToLower() Start-Transcript -Path $env:SystemRoot\temp\transscript.log do { Write-Host "waiting..." sleep 3 } until(Test-NetConnection omnitruck.chef.io -Port 443 | ? { $_.TcpTestSucceeded } ) write-output "ik wil lopen" | out-file "c:\bla.txt" -append; . { Invoke-WebRequest -UseBasicParsing https://omnitruck.chef.io/install.ps1 } | Invoke-Expression; install -v $chefversion; $ChefInfoToFile = @" log_level :auto log_location "c:/chef/log/client.log" chef_server_url "https://url/organizations/env" validation_name "chef-validator" node_name `"$nodename`" environment `"$chefenvironment`" "@ $ChefInfoToFile | Out-File -FilePath c:\chef\client.rb -Encoding ascii; $vaulttoken | out-file c:\chef\.vault-token -Encoding ascii; $chefvalidation = ($validationcert -replace ' ', ''); $chefvalidation | Out-File c:\chef\validation.pem -Encoding ascii; $firstbootjson = @" { "run_list": [ "recipe[xxx]" ] } "@ $firstbootjson | Out-File -FilePath c:\chef\firstboot.json -Encoding ascii; New-Item -Path "c:\chef\log" -ItemType Directory -Force; C:\opscode\chef\bin\chef-client.bat -j c:\chef\firstboot.json -l debug | Tee-Object -FilePath "$env:SystemRoot\temp\chef-first-run.log" -Append; Remove-item c:\chef\validation.pem -Force write-output "Hello, Powershell Test" | out-file "c:\alb.txt" -append; Stop-Transcript --MIMEBOUNDARY-- _parse_mime c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\plugins\common\userdata.py:83 2019-01-15 10:14:59.967 1844 DEBUG cloudbaseinit.plugins.common.userdata [-] Executing userdata plugin: MultipartMixedPlugin _process_part c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\plugins\common\userdata.py:145 2019-01-15 10:14:59.967 1844 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 2019-01-15 10:14:59.967 1844 DEBUG cloudbaseinit.utils.classloader [-] Loading class 'cloudbaseinit.osutils.windows.WindowsUtils' load_class c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\utils\classloader.py:27 2019-01-15 10:15:01.780 1844 DEBUG cloudbaseinit.plugins.common.fileexecutils [-] User_data stdout: b'' exec_file c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\plugins\common\fileexecutils.py:35 2019-01-15 10:15:01.780 1844 DEBUG cloudbaseinit.plugins.common.fileexecutils [-] User_data stderr: b'' exec_file c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\plugins\common\fileexecutils.py:36 2019-01-15 10:15:01.780 1844 INFO cloudbaseinit.plugins.common.fileexecutils [-] Script "C:\Windows\TEMP\cloudinit.ps1" ended with exit code: 1 2019-01-15 10:15:01.780 1844 INFO cloudbaseinit.init [-] Plugins execution done 2019-01-15 10:15:01.780 1844 INFO cloudbaseinit.init [-] Stopping Cloudbase-Init service 2019-01-15 10:15:04.791 1844 DEBUG cloudbaseinit.osutils.windows [-] Stopping service cloudbase-init stop_service c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\osutils\windows.py:942 2019-01-15 10:15:04.791 1844 ERROR cloudbaseinit.shell [-] (1115, 'OpenSCManager', 'A system shutdown is in progress.') 2019-01-15 10:15:04.791 1844 ERROR cloudbaseinit.shell Traceback (most recent call last): 2019-01-15 10:15:04.791 1844 ERROR cloudbaseinit.shell File "c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\shell.py", line 41, in main 2019-01-15 10:15:04.791 1844 ERROR cloudbaseinit.shell init.InitManager().configure_host() 2019-01-15 10:15:04.791 1844 ERROR cloudbaseinit.shell File "c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\init.py", line 211, in configure_host 2019-01-15 10:15:04.791 1844 ERROR cloudbaseinit.shell osutils.terminate() 2019-01-15 10:15:04.791 1844 ERROR cloudbaseinit.shell File "c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\osutils\windows.py", line 1062, in terminate 2019-01-15 10:15:04.791 1844 ERROR cloudbaseinit.shell self.stop_service(self._service_name) 2019-01-15 10:15:04.791 1844 ERROR cloudbaseinit.shell File "c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\osutils\windows.py", line 946, in stop_service 2019-01-15 10:15:04.791 1844 ERROR cloudbaseinit.shell win32service.SERVICE_QUERY_STATUS) as hs: 2019-01-15 10:15:04.791 1844 ERROR cloudbaseinit.shell File "c:\program files\cloudbase solutions\cloudbase-init\python\lib\contextlib.py", line 59, in __enter__ 2019-01-15 10:15:04.791 1844 ERROR cloudbaseinit.shell return next(self.gen) 2019-01-15 10:15:04.791 1844 ERROR cloudbaseinit.shell File "c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\osutils\windows.py", line 971, in _get_service_handle 2019-01-15 10:15:04.791 1844 ERROR cloudbaseinit.shell with WindowsUtils._get_service_control_manager(scm_access) as hscm: 2019-01-15 10:15:04.791 1844 ERROR cloudbaseinit.shell File "c:\program files\cloudbase solutions\cloudbase-init\python\lib\contextlib.py", line 59, in __enter__ 2019-01-15 10:15:04.791 1844 ERROR cloudbaseinit.shell return next(self.gen) 2019-01-15 10:15:04.791 1844 ERROR cloudbaseinit.shell File "c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\osutils\windows.py", line 960, in _get_service_control_manager 2019-01-15 10:15:04.791 1844 ERROR cloudbaseinit.shell hscm = win32service.OpenSCManager(None, None, scm_access) 2019-01-15 10:15:04.791 1844 ERROR cloudbaseinit.shell pywintypes.error: (1115, 'OpenSCManager', 'A system shutdown is in progress.') 2019-01-15 10:15:04.791 1844 ERROR cloudbaseinit.shell
my unattended.xml has the content of the recommended version that comes with the installer. the unattended log looks like this
2019-01-15 10:14:39.670 2420 DEBUG cloudbaseinit.utils.classloader [-] Loading class 'cloudbaseinit.osutils.windows.WindowsUtils' load_class c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\utils\classloader.py:27 2019-01-15 10:14:39.717 2420 DEBUG cloudbaseinit.osutils.windows [-] Checking if service exists: cloudbase-init check_service_exists c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\osutils\windows.py:894 2019-01-15 10:14:39.717 2420 DEBUG cloudbaseinit.osutils.windows [-] Getting service username: cloudbase-init get_service_username c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\osutils\windows.py:1027 2019-01-15 10:14:39.717 2420 INFO cloudbaseinit.osutils.windows [-] Skipping password reset, service running as a built-in account: LocalSystem 2019-01-15 10:14:39.717 2420 INFO cloudbaseinit.init [-] Cloudbase-Init version: 0.9.11 2019-01-15 10:14:39.717 2420 DEBUG cloudbaseinit.utils.classloader [-] Loading class 'cloudbaseinit.plugins.common.sethostname.SetHostNamePlugin' load_class c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\utils\classloader.py:27 2019-01-15 10:14:39.717 2420 INFO cloudbaseinit.init [-] Executing plugins for stage 'PRE_NETWORKING': 2019-01-15 10:14:39.717 2420 DEBUG cloudbaseinit.utils.classloader [-] Loading class 'cloudbaseinit.plugins.common.sethostname.SetHostNamePlugin' load_class c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\utils\classloader.py:27 2019-01-15 10:14:39.717 2420 INFO cloudbaseinit.init [-] Executing plugins for stage 'PRE_METADATA_DISCOVERY': 2019-01-15 10:14:39.717 2420 DEBUG cloudbaseinit.utils.classloader [-] Loading class 'cloudbaseinit.metadata.services.cloudstack.CloudStack' load_class c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\utils\classloader.py:27 2019-01-15 10:14:39.717 2420 DEBUG cloudbaseinit.utils.classloader [-] Loading class 'cloudbaseinit.osutils.windows.WindowsUtils' load_class c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\utils\classloader.py:27 2019-01-15 10:14:39.733 2420 DEBUG cloudbaseinit.metadata.services.base [-] Getting metadata from: http://10.1.1.1/latest/meta-data/service-offering _http_request c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\metadata\services\base.py:255 2019-01-15 10:15:00.780 2420 DEBUG cloudbaseinit.metadata.services.cloudstack [-] Something went wrong. _test_api c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\metadata\services\cloudstack.py:74 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack [-] HTTPConnectionPool(host='10.1.1.1', port=80): Max retries exceeded with url: /latest/meta-data/service-offering (Caused by NewConnectionError('<requests.packages.urllib3.connection.httpconnection object="" at="" 0x00000000049f5908="">: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond',)) 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack Traceback (most recent call last): 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack File "c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\requests\packages\urllib3\connection.py", line 141, in _new_conn 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack (self.host, self.port), self.timeout, **extra_kw) 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack File "c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\requests\packages\urllib3\util\connection.py", line 83, in create_connection 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack raise err 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack File "c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\requests\packages\urllib3\util\connection.py", line 73, in create_connection 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack sock.connect(sa) 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack During handling of the above exception, another exception occurred: 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack Traceback (most recent call last): 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack File "c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 600, in urlopen 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack chunked=chunked) 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack File "c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 356, in _make_request 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack conn.request(method, url, **httplib_request_kw) 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack File "c:\program files\cloudbase solutions\cloudbase-init\python\lib\http\client.py", line 1088, in request 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack self._send_request(method, url, body, headers) 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack File "c:\program files\cloudbase solutions\cloudbase-init\python\lib\http\client.py", line 1126, in _send_request 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack self.endheaders(body) 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack File "c:\program files\cloudbase solutions\cloudbase-init\python\lib\http\client.py", line 1084, in endheaders 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack self._send_output(message_body) 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack File "c:\program files\cloudbase solutions\cloudbase-init\python\lib\http\client.py", line 922, in _send_output 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack self.send(msg) 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack File "c:\program files\cloudbase solutions\cloudbase-init\python\lib\http\client.py", line 857, in send 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack self.connect() 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack File "c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\requests\packages\urllib3\connection.py", line 166, in connect 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack conn = self._new_conn() 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack File "c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\requests\packages\urllib3\connection.py", line 150, in _new_conn 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack self, "Failed to establish a new connection: %s" % e) 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack requests.packages.urllib3.exceptions.NewConnectionError: <requests.packages.urllib3.connection.httpconnection object="" at="" 0x00000000049f5908="">: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack During handling of the above exception, another exception occurred: 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack Traceback (most recent call last): 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack File "c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\requests\adapters.py", line 423, in send 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack timeout=timeout 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack File "c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 649, in urlopen 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack _stacktrace=sys.exc_info()[2]) 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack File "c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\requests\packages\urllib3\util\retry.py", line 376, in increment 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack raise MaxRetryError(_pool, url, error or ResponseError(cause)) 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack requests.packages.urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='10.1.1.1', port=80): Max retries exceeded with url: /latest/meta-data/service-offering (Caused by NewConnectionError('<requests.packages.urllib3.connection.httpconnection object="" at="" 0x00000000049f5908="">: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond',)) 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack During handling of the above exception, another exception occurred: 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack Traceback (most recent call last): 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack File "c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\metadata\services\cloudstack.py", line 66, in _test_api 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack response = self._get_data(self._get_path("service-offering")) 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack File "c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\metadata\services\base.py", line 267, in _get_data 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack response = self._http_request(path) 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack File "c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\metadata\services\base.py", line 260, in _http_request 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack verify=self._verify_https_request()) 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack File "c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\requests\api.py", line 70, in get 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack return request('get', url, params=params, **kwargs) 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack File "c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\requests\api.py", line 56, in request 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack return session.request(method=method, url=url, **kwargs) 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack File "c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\requests\sessions.py", line 488, in request 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack resp = self.send(prep, **send_kwargs) 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack File "c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\requests\sessions.py", line 609, in send 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack r = adapter.send(request, **kwargs) 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack File "c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\requests\adapters.py", line 487, in send 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack raise ConnectionError(e, request=request) 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack requests.exceptions.ConnectionError: HTTPConnectionPool(host='10.1.1.1', port=80): Max retries exceeded with url: /latest/meta-data/service-offering (Caused by NewConnectionError('<requests.packages.urllib3.connection.httpconnection object="" at="" 0x00000000049f5908="">: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond',)) 2019-01-15 10:15:00.780 2420 ERROR cloudbaseinit.metadata.services.cloudstack 2019-01-15 10:15:00.780 2420 DEBUG cloudbaseinit.metadata.services.cloudstack [-] Testing: url load c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\metadata\services\cloudstack.py:94 2019-01-15 10:15:00.780 2420 DEBUG cloudbaseinit.metadata.services.base [-] Getting metadata from: http://url/latest/meta-data/service-offering _http_request c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\metadata\services\base.py:255 2019-01-15 10:15:00.780 2420 DEBUG cloudbaseinit.metadata.services.cloudstack [-] Available services: b'SOME-SERVICE-NODE-LEVEL' _test_api c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\metadata\services\cloudstack.py:78 2019-01-15 10:15:00.780 2420 INFO cloudbaseinit.init [-] Metadata service loaded: 'CloudStack' 2019-01-15 10:15:00.780 2420 DEBUG cloudbaseinit.metadata.services.base [-] Getting metadata from: http://url/latest/meta-data/instance-id _http_request c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\metadata\services\base.py:255 2019-01-15 10:15:00.795 2420 DEBUG cloudbaseinit.init [-] Instance id: bcd291ce-6dcd-4f72-8372-115bf36ae0d7 configure_host c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\init.py:192 2019-01-15 10:15:00.795 2420 DEBUG cloudbaseinit.utils.classloader [-] Loading class 'cloudbaseinit.plugins.common.sethostname.SetHostNamePlugin' load_class c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\utils\classloader.py:27 2019-01-15 10:15:00.795 2420 INFO cloudbaseinit.init [-] Executing plugins for stage 'MAIN': 2019-01-15 10:15:00.795 2420 INFO cloudbaseinit.init [-] Executing plugin 'SetHostNamePlugin' 2019-01-15 10:15:00.795 2420 DEBUG cloudbaseinit.utils.classloader [-] Loading class 'cloudbaseinit.osutils.windows.WindowsUtils' load_class c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\utils\classloader.py:27 2019-01-15 10:15:00.795 2420 DEBUG cloudbaseinit.metadata.services.base [-] Getting metadata from: http://url/latest/meta-data/local-hostname _http_request c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\metadata\services\base.py:255 2019-01-15 10:15:00.795 2420 INFO cloudbaseinit.utils.hostname [-] Setting hostname: MYHOSTNAME 2019-01-15 10:15:00.811 2420 INFO cloudbaseinit.init [-] Plugins execution done
i am a bit lost, since it seems to work if i dont execute the unattended part within the sysprep specialize fase. same script, same user-data field etc.
i am using cloudstack/cosmic i've tried the latest (0.9.12dev52 and Stable 0.9.11.0) i've created the file with visual studio code, and used 'windows 1252' encoding and CRLF line endings.
hopefully you guys can help me or point me in the right direction.