Ceph - How to update the IP address or Port of the Ceph-dashboard

Solution Verified - Updated -

Environment

  • Red Hat Ceph Storage 3.x
  • Red Hat Ceph Storage 4.x
  • Red Hat Ceph Storage 5.x

Issue

  • By default, the ceph-mgr daemon hosting the dashboard (i.e., the currently active manager) will bind to TCP port 8443 or 8080 when SSL is disabled.
  • How can I change this after the cluster is deployed?

Resolution

  • Like most web applications, the dashboard binds to a TCP/IP address and TCP port.
  • If there is an existing configuration configured with respect to the Ceph Dashboard IP address and port address, then remove it.

    • Verify the existing configuration
    $ ceph config dump
    
    • Remove all of the existing server_addr related configurations
    $ ceph config rm mgr mgr/dashboard/mgr.<mgr-id>/server_addr
    $ ceph config rm mgr mgr/dashboard/<mgr-node-name>/server_addr
    $ ceph config rm mgr mgr/dashboard/<mgr-id>/server_addr 
    
  • These defaults can be changed via the configuration key facility on a cluster-wide level (so they apply to all manager instances) as follows:

    # ceph config set mgr mgr/dashboard/server_addr $IP
    # ceph config set mgr mgr/dashboard/server_port $PORT
    # ceph config set mgr mgr/dashboard/ssl_server_port $PORT
    
  • Each ceph-mgr hosts its own instance of the dashboard, so it may be necessary to configure them separately. The IP address and port for a specific manager instance can be changed with the following commands:

    $ ceph config set mgr mgr/dashboard/$name/server_addr $IP
    $ ceph config set mgr mgr/dashboard/$name/server_port $PORT
    $ ceph config set mgr mgr/dashboard/$name/ssl_server_port $PORT
    

    Note: Replace $name in the command above with the ID of the ceph-mgr instance hosting the dashboard.
    Note: After making the necessary changes restart the ceph-mgr service to allow it to take effect.

For RHCS 3/4

  • If you wish to set the dashboard to listen on all IPs at port 8443 with the following commands, you can do so with the following example:
    ~~~
    # ceph config set mgr mgr/dashboard/mons-0/server_addr *
    # ceph config set mgr mgr/dashboard/mons-0/server_addr ''
    ~~~
    NOTE: 'mons-0' is the ID of my mgr node and would be replaced by your respective ID.

For RHCS 5

  • If you wish to set the dashboard to listen on all IPs at port 8443 with the following commands, you can do so with the following example:

    # ceph config set mgr mgr/dashboard/node2ceph5.kksjkp/server_addr \*
    

    NOTE: 'node2ceph5.kksjkp' is the ID of my mgr node and would be replaced by your respective ID.

    NOTE: In RHCS 5.0 the above setting that allows the ceph-dashboard to listen on all IPs at 8443 will fail, and it will be fixed in the upcoming release RHCS 5.1

  • For the changes to take effect, restart the MGR services.

    # ceph mgr module disable dashboard
    # ceph mgr module enable dashboard
    

    Also, ensure any firewalls/routers/switches are updated as needed. If the listening interface is different from the public interface, the Grafana API URL also needs to be changed, e.g.:

    # ceph dashboard set-grafana-api-url http://NEW_IP:3000
    

Diagnostic Steps

  • The command ceph mgr services will show you all endpoints that are currently configured. Look for the dashboard key to obtain the URL for accessing the dashboard.
  • In addition a netstat -ntlp command is useful in identifying the current IP and port configuration for your ceph-mgr

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