Make wait_for_service more robust by checking HTTP response
Make wait_for_service more robust by checking HTTP response

wait_for_service just checked to see if the remote service
was started, not that it was returning data. This caused
problems when the service was behind a proxy because the
proxy would respond quickly but the service may not have
fully started.

Wait for a non-503 HTTP response code and non-7 exit code
(connection error) from curl

Return an error if a successful connection cannot be made.

Change-Id: I059a12b1b920f703f28aca0e2f352714118dee97

openstack-dev/devstack,dtroyer/devstack,richliu/devstack,openstack-dev/devstack,richliu/devstack,bswartz/devstack,noironetworks/devstack,nawawi/openstack,dtroyer/devstack,group-policy/devstack,nawawi/openstack,bswartz/devstack,group-policy/devstack,noironetworks/devstack