Upgrading or deploying overcloud fails due to "Name or service not known"

Solution Verified - Updated -

Issue

  • Overcloud deploy or upgrade failed with Name or service not known message.
    In the following example, it failed to access https://overcloud.example.com:13000 due to the error.

    $ openstack overcloud upgrade run --stack overcloud --limit overcloud-controller-0
        :
    2023-01-01 00:00:00.710105 | aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa |      FATAL | Check Keystone public endpoint status | overcloud-controller-0 -> localhost | item=placement | error={"ansible_job_id": "000000000000.000000", "ansible_loop_var": "tripleo_keystone_resources_endpoint_async_result_item", "attempts": 2, "changed": false, "cmd": "/tmp/ansible-tripleo-admin/ansible-tmp-0000000000.0000000-000000-00000000000000/AnsiballZ_endpoint.py", "data": "", "finished": 1, "msg": "Traceback (most recent call last):\n  File \"/tmp/ansible_async_wrapper_payload_dborq437/ansible_async_wrapper_payload.zip/ansible/modules/utilities/logic/async_wrapper.py\", line 166, in _run_module\n  File \"/tmp/ansible_async_wrapper_payload_dborq437/ansible_async_wrapper_payload.zip/ansible/modules/utilities/logic/async_wrapper.py\", line 94, in _filter_non_json_lines\nValueError: No start of json char found\n", "stderr": "Failed to discover available identity versions when contacting https://overcloud.example.com:13000. Attempting to parse version from URL.\nTraceback (most recent call last):\n  File \"/usr/lib/python3.6/site-packages/urllib3/connection.py\", line 162, in _new_conn\n    (self._dns_host, self.port), self.timeout, **extra_kw)\n  File \"/usr/lib/python3.6/site-packages/urllib3/util/connection.py\", line 57, in create_connection\n    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):\n  File \"/usr/lib64/python3.6/socket.py\", line 745, in getaddrinfo\n    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):\nsocket.gaierror: [Errno -2] Name or service not known\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n  File \"/usr/lib/python3.6/site-packages/urllib3/connectionpool.py\", line 600, in urlopen\n    chunked=chunked)\n  File \"/usr/lib/python3.6/site-packages/urllib3/connectionpool.py\", line 343, in _make_request\n    self._validate_conn(conn)\n  File \"/usr/lib/python3.6/site-packages/urllib3/connectionpool.py\", line 839, in _validate_conn\n    conn.connect()\n  File \"/usr/lib/python3.6/site-packages/urllib3/connection.py\", line 315, in connect\n    conn = self._new_conn()\n  File \"/usr/lib/python3.6/site-packages/urllib3/connection.py\", line 171, in _new_conn\n    self, \"Failed to establish a new connection: %s\" % e)\nurllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x000000000000>: Failed to establish a new connection: [Errno -2] Name or service not known  ........
    
  • overcloud.example.com is defined in the CloudName parameter in the template files.

    $ cat templates/cloudname.yaml
    parameter_defaults:
      CloudName: overcloud.example.com
      DnsServers: ["10.0.0.1"]
    

Environment

  • Red Hat OpenStack Platform 16.2

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content