-
Notifications
You must be signed in to change notification settings - Fork 24k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
win_domain fails using vmware_tools connection plugin #57607
Comments
Files identified in the description: If these files are inaccurate, please update the |
Other modules work correctly? Did you verify all requirements at https://docs.ansible.com/ansible/latest/plugins/connection/vmware_tools.html |
We don't support PSCore right now, the main problem is that we don't test it in CI and can never guarantee that it will continue to work. I won't close this because I'm unsure whether vmware_tools needs to be changed to report the proper error but the Windows module will require PS Desktop to run. |
@jborean93 : it is not about pscore, it is about the server core, e.g. without desktop experiance. It has the normal powershell installed. @ShachafGoldstein : Other modules work correctly, it might just be incorrect error propagation, as it works after patching the win_domain_controller module to no longer try to install gui components. |
Ah sorry, it's late at night and I misread what you said. |
Ok, this issue is not caused by trying to install the administration center. Apparently this one can be installed on core servers. It was just fixed, as I had a win_feature step before invoking this module that already installed the features. So some investigation is still required... |
can you put the output of running it verbose here? -vvv |
!component win_domain @ShachafGoldstein the output above is already -vvv or do you mean -vvvv? |
Files identified in the description: If these files are inaccurate, please update the |
Finally I think I found the issue. It is a race condition in conjunction with the vmware_tools connection plugin. The same error occurs when replacing the win_domain modules content with: #!powershell
#Requires -Module Ansible.ModuleUtils.Legacy
Set-StrictMode -Version 2
$ErrorActionPreference = "Stop"
Stop-Service "Netlogon"
Start-Sleep -Seconds 20
Start-Service "Netlogon" |
Files identified in the description: If these files are inaccurate, please update the |
Sorry accidentally closed the issue. I’m not sure there would be anything we can do here. The AD cmdlet stops Netlogon itself and we force start it even though a reboot should be done straight away so the next winrm/psrp task can continue connect and actually do the reboot. Potentially you may need to run with async and ultimately ignore the error when the connection was dropped but that’s dependent on if the service actually gets started or is just killed before it reaches that step |
Can we add some error handling into the connection plugin? In its simplest form, to just allow one to do The exception:
Others struggling with this error (but by using the powershell api): https://www.van-gelderen.eu/invoke-vmscript-a-general-system-error-occurred-vix-error-codes-1-0/ |
Yep, would just need to raise a PR and the maintainer would have to verify that it is the correct thing to do.
It probably would have to raise |
SUMMARY
I tried to use this module against a windows server 2019 core using the vmware_tools transporter and it fails with a exception, no real error message is shown.
Edit: The win_domain module invokes Install-ADDSForest, which stops the Netlogon service. The module starts it again, but that is to late, as the vmware_tools connection plugin already failed and terminated script execution prematurely. Execution of the win_domain module stops right after invoking Install-ADDSForest.
ISSUE TYPE
COMPONENT NAME
win_domain
vmware_tools
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
ArchLinux
STEPS TO REPRODUCE
Run this module against a windows server 2019 core server.
EXPECTED RESULTS
Deploys a domain controller
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: