2016 service password change fails
On Windows 2016, cloudbase-init sometimes fails to logon after resetting its password. We're seeing this about 1 out of 10 VMs. Cloudbase-init 9.11.
2018-07-04 10:09:20.555 2884 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 2018-07-04 10:09:21.695 2884 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 2018-07-04 10:09:21.711 2884 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 2018-07-04 10:09:21.711 2884 DEBUG cloudbaseinit.osutils.windows [-] Resetting password for service user: .\cloudbase-init reset_service_password c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\osutils\windows.py:1050 2018-07-04 10:09:21.742 2884 DEBUG cloudbaseinit.osutils.windows [-] Setting service credentials: cloudbase-init set_service_credentials c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\osutils\windows.py:1010 2018-07-04 10:09:21.820 2884 INFO cloudbaseinit.init [-] Respawning current process with updated credentials. 2018-07-04 10:09:21.820 2884 DEBUG cloudbaseinit.osutils.windows [-] Creating logon session for user: .\cloudbase-init create_user_logon_session c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\osutils\windows.py:566 2018-07-04 10:09:21.836 2884 ERROR cloudbaseinit.shell [-] User logon failed: 'The user name or password is incorrect.' 2018-07-04 10:09:21.836 2884 ERROR cloudbaseinit.shell Traceback (most recent call last): 2018-07-04 10:09:21.836 2884 ERROR cloudbaseinit.shell File "c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\shell.py", line 41, in main 2018-07-04 10:09:21.836 2884 ERROR cloudbaseinit.shell init.InitManager().configure_host() 2018-07-04 10:09:21.836 2884 ERROR cloudbaseinit.shell File "c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\init.py", line 166, in configure_host 2018-07-04 10:09:21.836 2884 ERROR cloudbaseinit.shell self._reset_service_password_and_respawn(osutils) 2018-07-04 10:09:21.836 2884 ERROR cloudbaseinit.shell File "c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\init.py", line 156, in _reset_service_password_and_respawn 2018-07-04 10:09:21.836 2884 ERROR cloudbaseinit.shell logon_type=osutils.LOGON32_LOGON_BATCH) 2018-07-04 10:09:21.836 2884 ERROR cloudbaseinit.shell File "c:\program files\cloudbase solutions\cloudbase-init\python\lib\site-packages\cloudbaseinit\osutils\windows.py", line 577, in create_user_logon_session 2018-07-04 10:09:21.836 2884 ERROR cloudbaseinit.shell "User logon failed: %r") 2018-07-04 10:09:21.836 2884 ERROR cloudbaseinit.shell cloudbaseinit.exception.WindowsCloudbaseInitException: User logon failed: 'The user name or password is incorrect.' 2018-07-04 10:09:21.836 2884 ERROR cloudbaseinit.shell