-
Notifications
You must be signed in to change notification settings - Fork 452
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
Domain and FQDN not picked-up correctly on Windows Server 2016 #1274
Comments
@karim-jaouadi We have a fix that may resolve this that was just merged into master and will ship in Ohai 14.8 |
Hey. FWIW I'm still seeing the FQDN resolution failure on Windows Server 2019 with ohai version 14.8.10. |
I'm noticing this as well, the hint always returns empty values on Windows 2016. It's supposed to gather this from the metadata available at http://169.254.169.254/latest/meta-data, but this doesn't work out of the box. There's a script here that fixes the issue: https://forums.aws.amazon.com/thread.jspa?messageID=790984
|
Updated code is available in Ohai version 15.0.13. |
Additionally, To get the FQDN in powershell, we could try
|
The PowerShell equivalent of:
Is: |
Internal issue CHEF-607 ... might relate to #1733
Description
Ohai don't seem to pick-up and update the attributes related to domain and FQDN correctly on Windows Server 2016.
The below output is what I see from Chef Manage standpoint. On the server I can see the domain and FQDN as the server joined the Active Directory. I've try to run another time to see if it change a thing but no success.
Looking at the code it seems that the way of collecting those information don't seems supported on Windows Server 2016 (See below). I've provided suggested way to read those value (tested from Powershell) it that could be validated and implemented.
Ohai Version
Platform Version
Windows Server 2016
Output of current Ohai call
Base on the code below
ohai/lib/ohai/plugins/hostname.rb
Lines 162 to 181 in 308a32b
The powershell instruction are not recognized.
Suggested method to call
Seems the following methods are supported out of the box and provide either machine_name and domain or the FQDN.
The text was updated successfully, but these errors were encountered: