VMware Cloud Community
BillStreet00
Enthusiast
Enthusiast
Jump to solution

Query DNS

Has anyone came across a way to query DNS from orchestrator to verify whether or not a DNS record exists? I am trying to create a WF in which a potential CNAME is presented, checked and if not used create the CNAME.  Creating the entry, or removing it, is not a problem.  I've googled it and came back with solutions for node.js but nothing for the js being used in orchestrator.  Did anyone have success trying to perform a lookup?

0 Kudos
1 Solution

Accepted Solutions
filosmith
Enthusiast
Enthusiast
Jump to solution

Have you tried System.resolveHostName()?

View solution in original post

0 Kudos
6 Replies
iiliev
VMware Employee
VMware Employee
Jump to solution

A couple of days ago Christophe Decanini released Microsoft DNS plug-in (uses PowerShell internally).

Check if it suits your use case. Info about the plug-in is available here - https://communities.vmware.com/docs/DOC-36762

0 Kudos
BillStreet00
Enthusiast
Enthusiast
Jump to solution

Unfortunately it doesn't look like it will help.  We are using OpenDNS and Men & Mice (IPAM). Though I think I will end up using PowerShell regardless.  Invoke the script, check for the entries and pass something back to vRO.

0 Kudos
daphnissov
Immortal
Immortal
Jump to solution

If you configured js-io-rights properly, you can run a lookup from the vRO appliance provided it has access to the DNS servers/zones you want to validate.

0 Kudos
BillStreet00
Enthusiast
Enthusiast
Jump to solution

I ran the workflow to create the file but it errors on the directory.

[2017-11-03 09:57:05.399] [E] Not a directory

[2017-11-03 09:57:05.408] [E] Workflow execution stack:

***

item: 'Export logs and application settings/item1', state: 'failed', business state: 'null', exception: 'Not a directory'

workflow: 'Export logs and application settings' (A18080808080808080808080808080808080808001231146624761b79546544c2)

|  'attribute': name=zipFileName type=string value=vCO_troubleshooting

|  'input': name=localPath type=Path value=/opt/vmo/app-server/server/vmo/conf

|  'no outputs'

*** End of execution stack.

0 Kudos
filosmith
Enthusiast
Enthusiast
Jump to solution

Have you tried System.resolveHostName()?

0 Kudos
BillStreet00
Enthusiast
Enthusiast
Jump to solution

That solved my issue.  Thank you very much.

0 Kudos