Uploaded image for project: 'Red Hat 3scale API Management'
  1. Red Hat 3scale API Management
  2. THREESCALE-7529

Downloading countries fails when the error message is "Could not resolve host"

    XMLWordPrintable

Details

    • Bug
    • Resolution: Obsolete
    • Major
    • None
    • 2.9.1 GA
    • System
    • False
    • False
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started

    Description

      When using the built-in fields definition "Country", the countries are pulled from the external URL http://download.geonames.org/export/dump/countryInfo.txt.
      If the environment is a disconnected environment where this URL can't be reached from system-app the dropdown field Country is not populated.

      Reaching the endpoint via the system-app pod returns the following error:

      oc rsh -c system-provider dc/system-app
      sh-4.2$ curl -v http://download.geonames.org/export/dump/countryInfo.txt
      * Could not resolve host: download.geonames.org; Unknown error
      * Closing connection 0
      curl: (6) Could not resolve host: download.geonames.org; Unknown error
      sh-4.2$
      

      And also we have:

      irb(main):001:0> Country.all
      => #<ActiveRecord::Relation []>
      irb(main):002:0>
      

      The code has a fallback: when the request returns an HTTP error or a timeout an internal URL is used (https://ADMIN-PORTAL-URL/countries.json) to fetch a json file with the countries. However this fallback doesn't include the "Could not resolve host" error.

      The request is to include the "Could not resolve host" error so Customers that doesn't allow to make external requests from their 3scale environment can use the countries.json file.

      Attachments

        Activity

          People

            Unassigned Unassigned
            rhn-support-avilatus Anna Vila Tusell
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: