Uploaded image for project: 'Red Hat OpenStack Services on OpenShift'
  1. Red Hat OpenStack Services on OpenShift
  2. OSPRH-7680

Auto set the heat_metadata_server_url parameter in heat.conf

XMLWordPrintable

    • Low

      For VM's to be deployed by Heat and leverage the metadata service, we need to explicitly set the Heat CFN public route URL as the `heat_metadata_server_url` parameter. This will ensure the endpoint is reachable for VM's that don't have access to internal endpoints.

      To do this, we need to lookup the route since Heat operator isn't responsible for creating the route. It is created by the openstack-operator:

      [m3@localhost beta]$ oc get route -o yaml heat-cfnapi-public | yq .metadata.ownerReferences
      [
        {
          "apiVersion": "core.openstack.org/v1beta1",
          "blockOwnerDeletion": true,
          "controller": true,
          "kind": "OpenStackControlPlane",
          "name": "openstack-control-plane",
          "uid": "cb4e3698-3c78-4ad6-b861-894106228489"
        }
      ] 

      If it does exist, we can use the `.status.Ingress[0].Host` field as our `heat_metadata_server_url`:

      [m3@localhost beta]$ oc get route -o yaml heat-cfnapi-public | yq '.status.ingress[].host'
      "heat-cfnapi-public-openstack.apps.ostest.test.metalkube.org" 

            rhn-support-bshephar Brendan Shephard
            rhn-support-bshephar Brendan Shephard
            rhos-dfg-df
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: