Bookmark this page

Guided Exercise: Managing Cluster Configuration Settings

In this exercise, you query and modify Red Hat Ceph Storage configuration settings.

Outcomes

You should be able to view stored configuration settings, and view and set the value of a specific stored setting and a specific runtime setting.

Important

Do you need to reset your environment before performing this exercise?

If you performed the practice cluster deployments in the Deploying Red Hat Ceph Storage chapter exercises, but have not reset your environment back to the default classroom cluster since that chapter, then you must reset your environment before executing the lab start command.

As the student user on the workstation machine, use the lab command to prepare your system for this exercise.

[student@workstation ~]$ lab start configure-settings

This command confirms that the required hosts for this exercise are accessible.

Procedure 3.1. Instructions

  1. Log in to clienta as the admin user and use sudo to run the cephadm shell.

    [student@workstation ~]$ ssh admin@clienta
    [admin@clienta ~]$ sudo cephadm shell
    [ceph: root@clienta /]#
  2. View the cluster configuration database.

    [ceph: root@clienta /]# ceph config dump
    WHO                                       MASK  LEVEL     OPTION                                 VALUE                           RO
    global                                          advanced  cluster_network                        172.25.249.0/24                 *
    ...output omitted...
      mon                                           advanced  auth_allow_insecure_global_id_reclaim  false
      mon                                           advanced  public_network                         172.25.250.0/24                 *
      mgr                                           advanced  mgr/cephadm/container_init             True                            *
      mgr                                           advanced  mgr/cephadm/migration_current          2                               *
      mgr                                           advanced  mgr/cephadm/registry_password          redhat                          *
      mgr                                           advanced  mgr/cephadm/registry_url               registry.redhat.io              *
      mgr                                           advanced  mgr/cephadm/registry_username          registry                        *
      mgr                                           advanced  mgr/dashboard/ALERTMANAGER_API_HOST    http://172.25.250.12:9093       *
      mgr                                           advanced  mgr/dashboard/GRAFANA_API_SSL_VERIFY   false                           *
      mgr                                           advanced  mgr/dashboard/GRAFANA_API_URL          https://172.25.250.12:3000      *
      mgr                                           advanced  mgr/dashboard/PROMETHEUS_API_HOST      http://172.25.250.12:9095       *
      mgr                                           advanced  mgr/dashboard/ssl_server_port          8443                            *
      mgr                                           advanced  mgr/orchestrator/orchestrator          cephadm
        client.rgw.realm.zone.serverc.xhyhfk        basic     rgw_frontends                          beast port=80                   *
        client.rgw.realm.zone.serverd.fonetu        basic     rgw_frontends                          beast port=80                   *
  3. View the runtime configuration settings for the osd.1 daemon.

    [ceph: root@clienta /]# ceph config show osd.1
    NAME                  VALUE                                                                 SOURCE    OVERRIDES  IGNORES
    cluster_network       172.25.249.0/24                                                       mon
    container_image       registry.redhat.io/rhceph/rhceph-5-rhel8@sha256:6306...47ff           mon
    daemonize             false                                                                 override
    keyring               $osd_data/keyring                                                     default
    leveldb_log                                                                                 default
    log_stderr_prefix     debug                                                                 default
    log_to_file           false                                                                 default
    log_to_stderr         true                                                                  default
    mon_host              [v2:172.25.250.12:3300/0,v1:172.25.250.12:6789/0]                     file
    no_config_file        false                                                                 override
    rbd_default_features  61                                                                    default
    setgroup              ceph                                                                  cmdline
    setuser               ceph                                                                  cmdline
  4. View the runtime and cluster configuration database value of the debug_ms setting for the osd.1 daemon. Edit the setting value to 10. Verify that the runtime and cluster configuration database value is applied. Restart the osd.1 daemon. Verify that the values for the debug_ms setting persist after the restart.

    1. View the debug_ms runtime configuration setting for osd.1.

      [ceph: root@clienta /]# ceph config show osd.1 debug_ms
      0/0
    2. View the debug_ms setting value that is stored in the cluster configuration database for the osd.1 daemon.

      [ceph: root@clienta /]# ceph config get osd.1 debug_ms
      0/0
    3. Modify the debug_ms setting value for osd.1.

      [ceph: root@clienta /]# ceph config set osd.1 debug_ms 10
    4. Verify that the runtime and cluster configuration database value is applied.

      [ceph: root@clienta /]# ceph config show osd.1 debug_ms
      10/10
      [ceph: root@clienta /]# ceph config get osd.1 debug_ms
      10/10
    5. Restart the osd.1 daemon.

      [ceph: root@clienta /]# ceph orch daemon restart osd.1
      Scheduled to restart osd.1 on host 'serverd.lab.example.com'
    6. Run the cephadm shell and verify that the values persist after the restart.

      [ceph: root@clienta /]# ceph config show osd.1 debug_ms
      10/10
      [ceph: root@clienta /]# ceph config get osd.1 debug_ms
      10/10
  5. Use ceph tell to temporarily override the debug_ms setting value for the osd.1 daemon to 5. Restart the osd.1 daemon in serverc and verify that the value is reverted.

    1. View the runtime value of the debug_ms setting for osd.1.

      [ceph: root@clienta /]# ceph tell osd.1 config get debug_ms
      {
          "debug_ms": "10/10"
      }
    2. Temporarily change the runtime value of the debug_ms setting for osd.1 to 5. This setting reverts when you restart the osd.1 daemon.

      [ceph: root@clienta /]# ceph tell osd.1 config set debug_ms 5
      {
          "success": ""
      }
    3. Verify the runtime value of the debug_ms setting for osd.1.

      [ceph: root@clienta /]# ceph tell osd.1 config get debug_ms
      {
          "debug_ms": "5/5"
      }
    4. Restart the osd.1 daemon.

      [ceph: root@clienta /]# ceph orch daemon restart osd.1
      Scheduled to restart osd.1 on host 'serverd.lab.example.com'
    5. Verify that the runtime value is reverted.

      [ceph: root@clienta /]# ceph tell osd.1 config get debug_ms
      {
          "debug_ms": "10/10"
      }
  6. Return to workstation as the student user.

    [ceph: root@clienta /]# exit
    [admin@clienta ~]$ exit
    [student@workstation ~]$
  7. Use a web browser to access the Ceph Dashboard GUI and edit the mon_allow_pool_delete advanced configuration setting to true in the global section.

    1. Open a web browser and navigate to https://serverc:8443. If necessary, accept the certificate warning. The URL might redirect to serverd or servere, depending on the active MGR. Log in with user name admin and password redhat.

    2. In the Ceph Dashboard web UI, click ClusterConfiguration to display the Configuration Settings page.

      Figure 3.1: Configuration settings in the Ceph Dashboard
    3. Select the advanced option from the Level menu to view advanced configuration settings. Type mon_allow_pool_delete in the search bar to find the setting.

      Figure 3.2: Configuration setting search in the Ceph Dashboard
    4. Click mon_allow_pool_delete and then click Edit.

      Figure 3.3: Editing configuration settings in the Ceph Dashboard
    5. Edit the mon_allow_pool_delete setting, set the global value to true, and then click Save.

      Figure 3.4: Modifying a configuration setting in the Ceph Dashboard

      The dashboard displays a message to confirm the new setting.

      Figure 3.5: Modifying a configuration setting in the Ceph Dashboard

Finish

On the workstation machine, use the lab command to complete this exercise. This is important to ensure that resources from previous exercises do not impact upcoming exercises.

[student@workstation ~]$ lab finish configure-settings

This concludes the guided exercise.

Revision: cl260-5.0-29d2128