WindowsAgent
WindowsAgent copied to clipboard
Fixed 15 character device name limit
Status
READY
Description
Use DNS hostnames rather than NetBIOS in order to support hostnames longer than 15 chars.
Related Issues
Resolves #164
Todos
- [x] Tests
- [x] Documentation
Test environment
Executed with /local & /xml flags to verify results.
General information
Operating system : Windows 7 Pro / Windows 10 Home Compiled with Visual Studio 2022
OCS Inventory information
Windows agent version : Current master branch (2.9.2.0)
Deploy Notes
No new dependencies or major changes.
Impacted Areas in Application
- DeviceID generation
- sysinfo/Device.cpp
Hi @CorbinIvon
Thanks for your contribution.
However I'm wondering what about duplicate management. What happen if you update from an agent with NET_BIOS_NAME (limited to 15 char.) to DNS_NAME ?
As far as I know the last time I tried it, it generated an army of duplicate PC which was why we didn't implemented it.
Regards, Gilles.
Hello @gillesdubois
Thank you for your reply.
I understand how this would be an issue. I will look into it further to meet your expectations.
Have a wonderful day, Corbin.
Hi,
Our teams will definitely check out your PR in detail anyway :) In fact it would be a nice change to not rely on the NetBIOS name which is limited.
I'll keep you up to date !
Regards, Gilles.
Salutations @gillesdubois!
I would like to inform you that we have solved the duplication concern. This patch will now update the device names on the server without creating duplicates. It has been tested and confirmed using the current version of the Windows Agent and the patched version. The result is that devices with less than 15 characters remain unaffected while devices that were shortened due to NETBIOS will now show the full DNS name in the server without creating a duplicate. It will simply update the already existing entry on the server. It does this by comparing the hostname from the DeviceID to both the NetBIOS and DNS hostnames. This means existing devices won't unnecessarily regenerate the DeviceID, thus avoiding duplicates. At the same time, the DNS hostname will be used in any future DeviceIDs generated, in order to transition away from NetBIOS hostnames over time.
If you have any questions, please do not hesitate to ask. I look forwards to your response!
Until then, Corbin.
Hi @CorbinIvon,
Thx a lot for your contribution. We are going to check this internally and get back to you asap.
Regards, Gilles.
Hi,
I have the same problem here. I have many servers that have more than 15 characters in their hostname. Do you plan to accept this request?
Thanks
Hi
We are going to review the PR and make a decision in the next weeks.
Regards, Gilles.
Hi @CorbinIvon ,
Thanks for your contribution ! All tests are OK :-)
I merge your code.
Best regards, Charlene