Updating delegate hosts

The default configuration of delegate hosts sets the value of the SERVICED_ZK variable to the master host only. Use this procedure to update the setting to include all of the hosts in the ZooKeeper ensemble. Perform this procedure on each delegate host in a Control Center cluster that is not an ensemble node.
  1. Log in to the delegate host as root, or as a user with superuser privileges.
  2. Define the IP address variables for each node in the ZooKeeper ensemble.
    Replace Master with the IP address or hostname of the Control Center master host, and replace Delegate-A and Delegate-B with the IP addresses or hostnames of the delegate hosts to include in the ensemble:
    node1=Master
    node2=Delegate-A
    node3=Delegate-B
  3. Specify the nodes in the ZooKeeper ensemble.
    You can copy the following text and paste it in your console:
    echo "SERVICED_ZK=${node1}:2181,${node2}:2181,${node3}:2181" \
      >> /etc/default/serviced
  4. Update the variable.
    1. Open /etc/default/serviced in a text editor.
    2. Navigate to the end of the file, and cut the line that contains the SERVICED_ZK variable declaration at that location.
      The value of this declaration specifies three endpoints.
    3. Locate the SERVICED_ZK variable near the beginning of the file, and then delete the line it is on.
      The value is just the master host endpoint.
    4. Paste the SERVICED_ZK variable declaration from the end of the file in the location of the just-deleted declaration.
    5. Save the file, and then close the editor.
  5. Verify the setting.
    grep -E '^\b*SERVICED_ZK' /etc/default/serviced
    The following example shows the environment variable for a delegate host that is not a node in the ZooKeeper ensemble:
    SERVICED_ZK=198.51.100.135:2181,198.51.100.136:2181,198.51.100.137:2181
  6. Restart Control Center.
    systemctl restart serviced