Skip to content
This repository was archived by the owner on Sep 23, 2020. It is now read-only.

Check that hostname can be resolved before stopping IaaS poll#41

Open
priteau wants to merge 1 commit intomasterfrom
openstack-hostname
Open

Check that hostname can be resolved before stopping IaaS poll#41
priteau wants to merge 1 commit intomasterfrom
openstack-hostname

Conversation

@priteau
Copy link
Contributor

@priteau priteau commented Jan 29, 2013

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you no longer do this self._ok_states check?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@labisso
Copy link
Contributor

labisso commented Jan 30, 2013

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?).

@priteau
Copy link
Contributor Author

priteau commented Jan 30, 2013

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.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants