Check that hostname can be resolved before stopping IaaS poll#41
Check that hostname can be resolved before stopping IaaS poll#41
Conversation
There was a problem hiding this comment.
Why do you no longer do this self._ok_states check?
There was a problem hiding this comment.
This check will stop the thread doing the IaaS polling as soon as the instance becomes running. We don't want that to happen, because OpenStack will eventually change the hostname to the correct one.
But good point, I guess I could add running to this list of states.
|
I successfully tested a couple of OOI launches with this patch. If I understand correctly, the poller will end once the hostname is resolvable. So this could still end with the internal hostname, if it resolves in DNS? Still, this is an improvement, and I'm not sure a better solution without a big change to how the pollers work. For example, the hostname poller could continue until the port poller ends (and potentially change the hostname the port poller uses). I'm ok with merging this as is, and considering a better solution in the future if needed (or maybe Openstack will fix the behavior?). |
|
You are correct, it would still end if the internal hostname resolves in DNS even if it is not reachable. Originally I wanted to update the hostname concurrently with the port poller, but it was not straightforward to implement. Maybe now that I know the code a bit more I would find it easier. However, this is a workaround for FutureGrid at least, so that solves our original problem. As you say we can always implement a better solution in the future. I am hoping OpenStack will fix the behaviour, but that could take a long time given the priority of our bug report. |
This is a workaround for OpenStack, which returns the local hostname as the public hostname for some time during the launch, even though the instance is running. If this hostname cannot be resolved, we continue polling IaaS until we get a resolvable hostname.
This is a workaround for OpenStack, which returns an internal hostname as the public IP for some time during the launch, even though the instance is running. If this hostname cannot be resolved, we continue polling IaaS until we get a resolvable hostname.