Changing the novncproxy_base_url from IP to FQDN in Redhat Openstack

Solution Verified - Updated -

Environment

  • Red Hat OpenStack Platform 12
  • Red Hat OpenStack Platform 13

Issue

  • How to change the novnc proxy url from IP to FQDN to access instance console ?

Resolution

Method 1

  • For manual changes, change novncproxy_base_url on compute nodes,

    crudini --set /var/lib/config-data/puppet-generated/nova_libvirt/etc/nova/nova.conf vnc novncproxy_base_url "https://testing.example.com:6080/vnc_auto.html"
    
    crudini --get /var/lib/config-data/puppet-generated/nova_libvirt/etc/nova/nova.conf vnc novncproxy_base_url
    
  • Restart openstack-nova-compute on compute nodes:

    docker restart nova_compute
    

Note: The manual changes will get depricated in the next stack update or scale out of the nodes.

Method 2

  • For TripleO/Director environment configuration for making the configuration change persistent,
    In the template file configuration, add the following parameter,

    parameter_defaults:
      ExtraConfig:
        nova::vncproxy::common::vncproxy_host: testing.example.com
    
  • Then after applying the changes over template,

    (overcloud) [stack@os1-prd-director01 ~]$ sudo docker exec -i nova_vnc_proxy sh -c "egrep -v '^$|^#' /etc/nova/nova.conf | grep novncproxy_base_url"
    novncproxy_base_url=http://testing.example.com:6080/vnc_auto.html
    (overcloud) [stack@os1-prd-director01 ~]$ openstack console url show test-instance1
    +-------+-----------------------------------------------------------------------------------------+
    | Field | Value                                                                                   |
    +-------+-----------------------------------------------------------------------------------------+
    | type  | novnc                                                                                   |
    | url   | http://testing.example.com:6080/vnc_auto.html?token=ab54c3cc-45bbc-4578-8efa-d78d2hde22 |
    +-------+-----------------------------------------------------------------------------------------+
    

Note: testing.example.com is the resolvable DNS name and FQDN of novncproxy_base_url

Diagnostic Steps

Note: XX.XX.XX.XX is the VIP of the external network

~~~
(overcloud) [stack@undercloud ~]$ openstack console url show test-instance1
+-------+-------------------------------------------------------------------------------------+
| Field | Value                                                                               |
+-------+-------------------------------------------------------------------------------------+
| type  | novnc                                                                               |
| url   | http://XX.XX.XX.XX:6080/vnc_auto.html?token=b23eacd-78de-4578-8efa-187ec694dbbb     |
+-------+-------------------------------------------------------------------------------------+
~~~

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments