Bookmark this page

Guided Exercise: Describing Red Hat OpenStack Platform Services

In this exercise, you will explore the use of commands to view status information and manage services used in Red Hat OpenStack Platform.

Outcomes

You should be able to:

  • Show a status overview of installed OpenStack services.

  • View and control enabled OpenStack services.

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

This command ensures that all resources required for the exercise are present.

[student@workstation ~]$ lab intro-services start

Procedure 1.2. Instructions

  1. From workstation, use SSH to connect to controller0 and switch to the root user.

    [student@workstation ~]$ ssh heat-admin@controller0
    [heat-admin@controller0 ~]$ sudo -i
    [root@controller0 ~]#
  2. List the running containers on controller0.

    1. Use the podman ps command to list the running services.

      [root@controller0 ~]# podman ps
      CONTAINER ID  IMAGE                                                                                    COMMAND               CREATED      STATUS          PORTS  NAMES
      3f925b4f4293  director.ctlplane.localdomain:8787/rhosp-rhel8/openstack-redis:16.0-98                   /bin/bash /usr/lo...  7 hours ago  Up 7 hours ago         redis-bundle-podman-0
      0c4ccbef9da9  director.ctlplane.localdomain:8787/rhosp-rhel8/openstack-mariadb:16.0-101                /bin/bash /usr/lo...  7 hours ago  Up 7 hours ago         galera-bundle-podman-0
      3bb77f6d2bae  director.ctlplane.localdomain:8787/rhosp-rhel8/openstack-haproxy:16.0-101                /bin/bash /usr/lo...  7 hours ago  Up 7 hours ago         haproxy-bundle-podman-0
      5b92fc38dc00  director.ctlplane.localdomain:8787/rhosp-rhel8/openstack-rabbitmq:16.0-101               /bin/bash /usr/lo...  7 hours ago  Up 7 hours ago         rabbitmq-bundle-podman-0
      ebc3d4db79a0  director.ctlplane.localdomain:8787/rhosp-rhel8/openstack-ovn-northd:16.0-95              /bin/bash /usr/lo...  7 hours ago  Up 7 hours ago         ovn-dbs-bundle-podman-0
      861d22441d6e  director.ctlplane.localdomain:8787/rhosp-rhel8/openstack-cinder-volume:16.0-90           /bin/bash /usr/lo...  7 hours ago  Up 7 hours ago         openstack-cinder-volume-podman-0
      2a592c5110ff  director.ctlplane.localdomain:8787/rhosp-rhel8/openstack-manila-share:16.0-95            /bin/bash /usr/lo...  7 hours ago  Up 7 hours ago         openstack-manila-share-podman-0
      9fa33b6d0dbc  director.ctlplane.localdomain:8787/rhceph/rhceph-4-rhel8:4-20                                                  7 hours ago  Up 7 hours ago         ceph-mon-controller0
      edfc6e329b8e  director.ctlplane.localdomain:8787/rhceph/rhceph-4-rhel8:4-20                                                  7 hours ago  Up 7 hours ago         ceph-mds-controller0
      ...output omitted...
    2. To improve readability, choose which columns to display using the --format option and the grep command.

      [root@controller0 ~]# podman ps --format="{{.Names}}" | grep swift
      swift_proxy
      swift_rsync
      swift_object_updater
      swift_object_server
      swift_object_replicator
      swift_object_expirer
      swift_object_auditor
      swift_container_updater
      swift_container_server
      swift_container_replicator
      swift_container_auditor
      swift_account_server
      swift_account_replicator
      swift_account_reaper
      swift_account_auditor
    3. Other options can make the podman ps output more readable. For example, define a custom format using a GO template with supported placeholders.

      [root@controller0 ~]# podman ps --format \
      > 'CONTAINER ID: {{.ID}}
      > IMAGE: {{.Image}}
      > COMMAND: {{.Command}}
      > CREATED: {{.CreatedAt}}
      > STATUS: {{.Status}}
      > NAMES: {{.Names}}
      > '
      CONTAINER ID: 3f925b4f4293
      IMAGE: director.ctlplane.localdomain:8787/rhosp-rhel8/openstack-redis:16.0-98
      COMMAND: /bin/bash /usr/lo...
      CREATED: 2020-05-04 02:10:10.714826277 +0000 UTC
      STATUS: Up 7 hours ago
      NAMES: redis-bundle-podman-0
      
      CONTAINER ID: 0c4ccbef9da9
      IMAGE: director.ctlplane.localdomain:8787/rhosp-rhel8/openstack-mariadb:16.0-101
      COMMAND: /bin/bash /usr/lo...
      CREATED: 2020-05-04 02:10:10.351217863 +0000 UTC
      STATUS: Up 7 hours ago
      NAMES: galera-bundle-podman-0
      ...output omitted...
  3. Use the podman ps command to verify the status of the OpenStack services.

    [root@controller0 ~]# podman ps -a --format="table {{.Names}} {{.Status}}"
    Names                                         Status
    redis-bundle-podman-0                         Up 7 hours ago
    galera-bundle-podman-0                        Up 7 hours ago
    haproxy-bundle-podman-0                       Up 7 hours ago
    rabbitmq-bundle-podman-0                      Up 7 hours ago
    ovn-dbs-bundle-podman-0                       Up 7 hours ago
    openstack-cinder-volume-podman-0              Up 7 hours ago
    openstack-manila-share-podman-0               Up 7 hours ago
    ceph-mon-controller0                          Up 7 hours ago
    ceph-mds-controller0                          Up 7 hours ago
    octavia_worker                                Up 7 hours ago
    octavia_housekeeping                          Up 7 hours ago
    octavia_health_manager                        Up 7 hours ago
    manila_share_init_bundle                      Exited (0) 2 weeks ago
    cinder_volume_init_bundle                     Exited (0) 2 weeks ago
    ...output omitted...

    Note

    Containers with a status of Exited are not in error. They are init containers that are executed at system boot and then exit.

  4. Use the systemctl command with the stop and start options to manage the swift_proxy service.

    [root@controller0 ~]# systemctl status tripleo_swift_proxy
    ● tripleo_swift_proxy.service - swift_proxy container
       Loaded: loaded (/etc/systemd/system/tripleo_swift_proxy.service; enabled; vendor preset: disabled)
       Active: active (running) since Mon 2020-05-04 02:09:49 UTC; 6h ago
     Main PID: 6454 (conmon)
        Tasks: 0 (limit: 26213)
       Memory: 1.8M
       CGroup: /system.slice/tripleo_swift_proxy.service
               ‣ 6454 /usr/bin/conmon --api-version 1 -s -c e26a...0e67 -u e26af4cd565c08510e0c1315bebf>
    
    May 04 02:08:55 controller0 systemd[1]: Starting swift_proxy container...
    May 04 02:09:44 controller0 podman[3843]: 2020-05-04 02:09:44.991054347 +0000 UTC m=+49.439247081 container init e26af4cd565c08510e0c1315bebfb71aa1be38a>
    May 04 02:09:45 controller0 podman[3843]: 2020-05-04 02:09:45.874057866 +0000 UTC m=+50.322250526 container start e26af4cd565c08510e0c1315bebfb71aa1be38>
    May 04 02:09:45 controller0 podman[3843]: swift_proxy
    May 04 02:09:49 controller0 systemd[1]: Started swift_proxy container.
    
    [root@controller0 ~]# systemctl stop tripleo_swift_proxy
    [root@controller0 ~]#
    Broadcast message from systemd-journald@controller0 (Mon 2020-05-04 09:03:48 UTC):
    
    haproxy[12546]: proxy swift_proxy_server has no server available!
    
    [root@controller0 ~]# systemctl status tripleo_swift_proxy
    ● tripleo_swift_proxy.service - swift_proxy container
       Loaded: loaded (/etc/systemd/system/tripleo_swift_proxy.service; enabled; vendor preset: disabled)
       Active: inactive (dead) since Mon 2020-05-04 09:03:39 UTC; 2min 3s ago
      Process: 545094 ExecStop=/usr/bin/podman stop -t 10 swift_proxy (code=exited, status=0/SUCCESS)
     Main PID: 6454
    
    May 04 02:08:55 controller0 systemd[1]: Starting swift_proxy container...
    May 04 02:09:44 controller0 podman[3843]: 2020-05-04 02:09:44.991054347 +0000 UTC m=+49.439247081 container init e26af4cd565c08510e0c1315bebfb71aa1be38abf>
    May 04 02:09:45 controller0 podman[3843]: 2020-05-04 02:09:45.874057866 +0000 UTC m=+50.322250526 container start e26af4cd565c08510e0c1315bebfb71aa1be38ab>
    May 04 02:09:45 controller0 podman[3843]: swift_proxy
    May 04 02:09:49 controller0 systemd[1]: Started swift_proxy container.
    May 04 09:03:38 controller0 systemd[1]: Stopping swift_proxy container...
    May 04 09:03:39 controller0 podman[545094]: 2020-05-04 09:03:39.364704228 +0000 UTC m=+0.794834617 container died e26af4cd565c08510e0c1315bebfb71aa1be38ab>
    May 04 09:03:39 controller0 podman[545094]: 2020-05-04 09:03:39.367234839 +0000 UTC m=+0.797365219 container stop e26af4cd565c08510e0c1315bebfb71aa1be38ab>
    May 04 09:03:39 controller0 podman[545094]: e26a...0e67
    May 04 09:03:39 controller0 systemd[1]: Stopped swift_proxy container.
    [root@controller0 ~]# systemctl start tripleo_swift_proxy
  5. Exit from the controller0 virtual machine.

    [root@controller0 ~]# exit
    [heat-admin@controller0 ~]$ exit
    [student@workstation ~]$

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 intro-services finish

This concludes the guided exercise.

Revision: cl110-16.1-4c76154