diff options
author | Tim Rozet <trozet@redhat.com> | 2018-07-31 16:14:25 -0400 |
---|---|---|
committer | Tim Rozet <trozet@redhat.com> | 2018-07-31 16:14:25 -0400 |
commit | fb2878c414eeb144de72e8204d0988236a684122 (patch) | |
tree | b0433a7335a49322ce321acf383b7bebd414e7b0 /lib/ansible/playbooks/post_deploy_overcloud.yml | |
parent | 03d3f7b385c809bc4c7e69619dbdc0e7ed830bd6 (diff) |
Use metadata IP instead of FQDN
There is an issue with loss of external network connectivity that
prevents cloud init to instances working. This becomes a big problem
with snapshots where there is no external network connectivity. Cloud
init fails because each request takes over 30 seconds to get a response.
This is because in the background neutron metadata agent is proxying the
request to nova metadata agent with an HTTP GET using the FQDN. For
whatever reason, a DNS lookup happens even though the entry exists for
the FQDN in /etc/hosts and waits 30 seconds until timing out. After this
timeout, a 200 OK is sent and metadata works.
This patch modifies the config file for metadata to use nova metadata
server's internal IP rather than FQDN as there is no option in OOO to
use IPs instead of FQDN.
Change-Id: I6960181a227d0002c99aeae5112f59807dc41d7a
Signed-off-by: Tim Rozet <trozet@redhat.com>
Diffstat (limited to 'lib/ansible/playbooks/post_deploy_overcloud.yml')
-rw-r--r-- | lib/ansible/playbooks/post_deploy_overcloud.yml | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/ansible/playbooks/post_deploy_overcloud.yml b/lib/ansible/playbooks/post_deploy_overcloud.yml index 372aea49..08460a06 100644 --- a/lib/ansible/playbooks/post_deploy_overcloud.yml +++ b/lib/ansible/playbooks/post_deploy_overcloud.yml @@ -90,3 +90,14 @@ - name: save iptables command: service iptables save become: yes + - name: Modify nova metadata host to be IP + shell: > + crudini --set /var/lib/config-data/puppet-generated/neutron/etc/neutron/metadata_agent.ini + DEFAULT nova_metadata_host $(hiera -c /etc/puppet/hiera.yaml nova_metadata_vip) + become: yes + when: "'controller' in ansible_hostname" + - name: Restart metadata service + shell: "docker restart neutron_metadata_agent" + become: yes + when: + - "'controller' in ansible_hostname" |