Closed stevehedrick closed 9 years ago
This sounds like a totally reasonable request. Generally, we shy away from relying on DNS during integration tests as it's another system outside of control of the system-under-test and therefore could cause a race condition. However, your use case makes sense and it feels like something we should support.
My initial gut reaction is to add a new driver parameter called "use_dns" which defaults to false. You could flip it to true, and instead of grabbing an IP address from the returned resource's properties, we'd just set the state[:hostname]
to be the name of the server returned.
What do you think about that approach? How comfortable are you taking a stab at a pull request to add that functionality with some assistance?
I'd be happy to. Thanks!
Awesome! I'm going to close this out, but when you're ready, send up a PR and we can work through it together as needed.
Our vRA server doesn't handle the assignment of IP address, and there's not going to be anything changing on that front. This means that the request will never return an IP. But the machines are immediately added to DNS using the returned server.name value (machinename).
I'm curious if you'd be willing to entertain the idea of either doing an DNS lookup on the machine name or attempting to connect via storing the machine name in the
state[:hostname]
when an IP address isn't provided.I've played with using resolv with a specified DNS server (the one DHCP is updating, so that we can avoid the delays in propagation) and had some good results.