Highlighted
Mel Farber Super Contributor.
Super Contributor.
499 views

DNS Resolver is not setting the hostname for the node

Jump to solution

I have a very simple test discovery zone.  It has only 2 jobs.  Range IPs by ICMP and DNS Resolver.  The IP range has only 2 IPs.  The discovered IPs are not accessible by SHELL or SNMP so no node is ordinarily created.  The previous consultant created an enrichment to create an attached Node CI to an IP.  The node name of the created CI is <IP> DefaultDomain.

On the old UCMDB system, created by the previous consultant, the discovery runs and creates an attached node CI, with the correct DNS name and CI history showed the node CI changing. 

On the new UCMDB system, the DNS resolver is invoked and shows success, just like the old system. However, when I check the iP and related CI, the attached node still has a name of <IP> DefaultDomain..  The Discovery Status shows the DNS Resolve as totally successful and shows the CI as <IP> DefaultDomain .  I checked nslookup on the Windows Server of the UCMDB server and it resolves the IP to the correct hostname.  The CI history has no reference to DNS resolver, only the enrichment which initially creates the node.

Any ideas on what is wrong or different?  I have checked the jobs and the triggers and the new system matches the old system.

Thanks,
Mel

 

Tags (2)
0 Likes
1 Solution

Accepted Solutions
Micro Focus Expert
Micro Focus Expert

Re: DNS Resolver is not setting the hostname for the node

Jump to solution

Mel;

I examined the scripts and there is a different... it has to do with which levels the if statement is on.  If you want this reverted, we'd have to investigate why it was done by R&D to begin with.

Hope this helps,
Keith Paschal
UCMDB Worldwide Support Lead
Micro Focus Support
If you find this or any post resolves your issue, please be sure to mark it as an accepted solution."

Click the KUDOS star on the left to say 'Thanks'
0 Likes
7 Replies
Outstanding Contributor.. Melissa_C_UCMDB Outstanding Contributor..
Outstanding Contributor..

Re: DNS Resolver is not setting the hostname for the node

Jump to solution

Hello Mel ,

 

Would you please share the version of both environments ?

Regards,

Melissa Carranza Mejias
Customer Support Engineer

If you find that this or any other post resolves your issue, please be sure to mark it as an accepted solution.
If you are satisfied with anyone’s response please remember to give them a KUDOS by clicking on the STAR at the bottom left of the post and show your appreciation. “
0 Likes
Mel Farber Super Contributor.
Super Contributor.

Re: DNS Resolver is not setting the hostname for the node

Jump to solution

Sorry for not including the versions initially.

Old version is 10.22 CUP 1.260 and CP 18.00.74

New version is 10.33.129 and CP 24.00.86

0 Likes
Micro Focus Expert
Micro Focus Expert

Re: DNS Resolver is not setting the hostname for the node

Jump to solution

Mel;

The issue is with the new script, DNS_Discovery.py:

            if host_name and dnsName.split('.')[0] == host_name:    #share same short name
                primary_dns_name_candidates.append(dnsName)

So, if the 'name' is not set and not equal to the first part of the primary dns name, it is not updated.  You can either change the script so this is not the case, OR, create an enrichment to add the authoritative DNS name from the IP to the node created by the other enrichment.

 

Hope this helps,
Keith Paschal
UCMDB Worldwide Support Lead
Micro Focus Support
If you find this or any post resolves your issue, please be sure to mark it as an accepted solution."

Click the KUDOS star on the left to say 'Thanks'
0 Likes
Mel Farber Super Contributor.
Super Contributor.

Re: DNS Resolver is not setting the hostname for the node

Jump to solution

Keith,

I'm seeing the same lines in the 10.22 version of UCMDB.

Regardless, can I just eliminate the if and let it always run the  primary_dns_name_candidates.append(dnsName)?

If I add an enrichment, I can add the node to the IP address.  I would think I would set the PrimaryDnsName attribute.  The value can be set by the name attribute of the IPaddress, but what Regular Expression would I use to get the DNS name from the IPAddress name?

Thanks,
Mel

0 Likes
Micro Focus Expert
Micro Focus Expert

Re: DNS Resolver is not setting the hostname for the node

Jump to solution

Mel;

Looking at the differences between the scripts, the problem becomes more obvious.  Now, the 'if netutils.convertIpToInt' line is moved under the if loop from above.  So, the line that causes the DNS name to get set is in that if loop:

smallIpDns = dnsName

Then later:

hostOSH.setAttribute('primary_dns_name', smallIpDns)

So, you can revert the script if you like (moving the netutils (line 66) back out from under the if loop. and also line 76 being changed back to get the original functionality.  Just remember you have to do this to this script every time you run it.

 

Hope this helps,
Keith Paschal
UCMDB Worldwide Support Lead
Micro Focus Support
If you find this or any post resolves your issue, please be sure to mark it as an accepted solution."

Click the KUDOS star on the left to say 'Thanks'
Mel Farber Super Contributor.
Super Contributor.

Re: DNS Resolver is not setting the hostname for the node

Jump to solution

Keith,

I didn't quite follow your instructions, but I did the following, which worked:

I moved the "if netutils.convertIpToInt(ip) ..." section to the same level as the "if host_name and dnsName.split ..." and I added the hostOSH.setAttribute('primary_dns_name', smallIpDns) to the "if netutils ..." section.

Admittedly, I have no idea what the if netutils is really checking, but I tested it twice, with the original and the modified and it only worked with the modified version.  I did have to run the discovery twice.  The first to discover the IP, then the enrichment kicked in to create the node <IP> Defualt Domain and the second discovery to the update the node to the DNS name, where it works with only one discovery in production 10.22.

The original 10.30 script was the same as 10.22, so something else was either different in the two UCMDB versions or something was changed somewhere else by my predecessor.

In any event, thanks for the direction and help.

Mel

0 Likes
Micro Focus Expert
Micro Focus Expert

Re: DNS Resolver is not setting the hostname for the node

Jump to solution

Mel;

I examined the scripts and there is a different... it has to do with which levels the if statement is on.  If you want this reverted, we'd have to investigate why it was done by R&D to begin with.

Hope this helps,
Keith Paschal
UCMDB Worldwide Support Lead
Micro Focus Support
If you find this or any post resolves your issue, please be sure to mark it as an accepted solution."

Click the KUDOS star on the left to say 'Thanks'
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.