Stopping a master host node

Use this procedure to stop the Control Center service (serviced) on the master host in a high-availability deployment.
  1. Use the virtual hostname or virtual IP address of the high-availability cluster to log in to the Control Center master node as root, or as a user with superuser privileges.
  2. Display the public hostname of the current node.
    uname -n
    Make a note of which node (primary or secondary) is the current node, for use in a subsequent step.
  3. Stop the top-level service serviced is managing, if necessary.
    1. Show the status of running services.
      serviced service status
      The top-level service is the service listed immediately below the headings line.
      • If the status of the top-level service and all child services is stopped, proceed to the next step.
      • If the status of the top-level service and all child services is not stopped, perform the remaining substeps.
    2. Stop the top-level service.
      Replace Service with the name or identifier of the top-level service:
      serviced service stop Service
    3. Monitor the stop.
      serviced service status
      When the status of the top-level service and all child services is stopped, proceed to the next step.
  4. Stop Control Center with the cluster management tool.
    pcs cluster standby --all
  5. Monitor the status of cluster resources.
    watch pcs status
    Monitor the status until all resources report Stopped. Resolve any issues before continuing.
  6. Ensure that no containers remain in the local repository.
    1. Start the Docker service.
      systemctl start docker
    2. Display the identifiers of all containers, running and exited.
      docker ps -qa
      If the command returns a result, enter the following command:
      docker ps -qa | xargs --no-run-if-empty docker rm -fv
    3. Stop the Docker service.
      systemctl stop docker
  7. To ensure that no containers remain in both Docker repositories, log in to the other master node as root, or as a user with superuser privileges, and then perform the preceding step.