Stopping a delegate host

Use this procedure to stop the Control Center service (serviced) on a delegate host in a multi-host deployment. Repeat this procedure on each delegate host in your deployment.
  1. Log in to the delegate host as root, or as a user with superuser privileges.
  2. Stop the Control Center service.
    systemctl stop serviced
  3. Ensure that no containers remain in the local repository.
    1. Display the identifiers of all containers, running and exited.
      docker ps -qa
      • If the command returns no result, proceed to the next step.
      • If the command returns a result, perform the following substeps.
    2. Remove all remaining containers.
      docker ps -qa | xargs --no-run-if-empty docker rm -fv
      • If the remove command completes, proceed to the next step.
      • If the remove command does not complete, the most likely cause is an NFS conflict. Perform the following substeps.
    3. Stop the NFS and Docker services.
      systemctl stop nfs && systemctl stop docker
    4. Start the NFS and Docker services.
      systemctl start nfs && systemctl start docker
    5. Repeat the attempt to remove all remaining containers.
      docker ps -qa | xargs --no-run-if-empty docker rm -fv
      • If the remove command completes, proceed to the next step.
      • If the remove command does not complete, perform the remaining substeps.
    6. Disable the automatic startup of serviced.
      systemctl disable serviced
    7. Reboot the host.
      reboot
    8. Log in to the delegate host as root, or as a user with superuser privileges.
    9. Enable the automatic startup of serviced.
      systemctl enable serviced
  4. Dismount all filesystems mounted from the Control Center master host.
    This step ensures no stale mounts remain when the storage on the master host is replaced.
    1. Identify filesystems mounted from the master host.
      awk '/serviced/ { print $1, $2 }' < /proc/mounts
      • If the preceding command returns no result, stop. This procedure is complete.
      • If the preceding command returns a result, perform the following substeps.
    2. Force the filesystems to dismount.
      for FS in $(awk '/serviced/ { print $2 }' < /proc/mounts)
      do
        umount -f $FS
      done
    3. Identify filesystems mounted from the master host.
      awk '/serviced/ { print $1, $2 }' < /proc/mounts
      • If the preceding command returns no result, stop. This procedure is complete.
      • If the preceding command returns a result, perform the following substeps.
    4. Perform a lazy dismount.
      for FS in $(awk '/serviced/ { print $2 }' < /proc/mounts)
      do
        umount -f -l $FS
      done
    5. Restart the NFS service.
      systemctl restart nfs
    6. Determine whether any filesystems remain mounted.
      awk '/serviced/ { print $1, $2 }' < /proc/mounts
      • If the preceding command returns no result, stop. This procedure is complete.
      • If the preceding command returns a result, perform the remaining substeps.
    7. Disable the automatic startup of serviced.
      systemctl disable serviced
    8. Reboot the host.
      reboot
    9. Log in to the delegate host as root, or as a user with superuser privileges.
    10. Enable the automatic startup of serviced.
      systemctl enable serviced