Retry metadata request on connection refused error
Retry metadata request on connection refused error

This testcase may fail intermittently on 'Connection refused' error.
This could be due to the fact that the metadata proxy setup is not exactly
complete at the time the request is issued; in fact there is no
synchronization between the router being up and the metadata request being
issued, and clearly this may be the reason of accidental but seldom failures.

In order to rule out this possibility and stabilize the test, let's retry
on connection refused only. If we continue to fail, then the next step would
be to dump the content of iptables to figure out why the error occurs.

Closes-bug: #1461172

Change-Id: I65a5bf4fbbcad6ba93a46d36cabe7844ff528d8d

mahak/neutron,MaximNevrov/neutron,JianyuWang/neutron,MaximNevrov/neutron,mattt416/neutron,mattt416/neutron,cloudbase/neutron,skyddv/neutron,chitr/neutron,mahak/neutron,openstack/neutron,skyddv/neutron,wolverineav/neutron,jumpojoy/neutron,sasukeh/neutron,igor-toga/local-snat,yanheven/neutron,noironetworks/neutron,bigswitch/neutron,openstack/neutron,wolverineav/neutron,vivekanand1101/neutron,huntxu/neutron,chitr/neutron,silenci/neutron,SamYaple/neutron,jumpojoy/neutron,sebrandon1/neutron,mahak/neutron,dhanunjaya/neutron,glove747/liberty-neutron,shahbazn/neutron,dims/neutron,asgard-lab/neutron,yanheven/neutron,takeshineshiro/neutron,swdream/neutron,JianyuWang/neutron,sasukeh/neutron,huntxu/neutron,SamYaple/neutron,eayunstack/neutron,apporc/neutron,sebrandon1/neutron,klmitch/neutron,swdream/neutron,silenci/neutron,noironetworks/neutron,apporc/neutron,takeshineshiro/neutron,glove747/liberty-neutron,eayunstack/neutron,igor-toga/local-snat,openstack/neutron,bigswitch/neutron,dims/neutron,dhanunjaya/neutron,cloudbase/neutron,asgard-lab/neutron,shahbazn/neutron,klmitch/neutron,vivekanand1101/neutron