Product SiteDocumentation Site

3.9. Adding a Cluster Service to the Cluster

To add a cluster service to the cluster, follow the steps in this section.
  1. From the cluster-specific page, you can add services to that cluster by clicking on Services along the top of the cluster display. This displays the services that have been configured for that cluster. (From the Services page, you can also start, restart, and disable a service, as described in Section 4.4, “Managing High-Availability Services”.)
  2. Click Add. This displays the Add a service window.
  3. On the Add a Service window, at the Service name text box, type the name of the service.

    Note

    Use a descriptive name that clearly distinguishes the service from other services in the cluster.
  4. Check the Automatically start this service checkbox if you want the service to start automatically when a cluster is started and running. If the checkbox is not checked, the service must be started manually any time the cluster comes up from the stopped state.
  5. Check the Run exclusive checkbox to set a policy wherein the service only runs on nodes that have no other services running on them.
  6. If you have configured failover domains for the cluster, you can use the dropdown menu of the Failover domain parameter to select a failover domain for this service. For information on configuring failover domains, see Section 3.7, “Configuring a Failover Domain”.
  7. Use the Recovery policy drop-down box to select a recovery policy for the service. The options are to relocate, restart, or disable the service.
    If you select Restart as the recovery policy for the service, you can specify the maximum number of restart failures before relocating and the length of time in seconds after which to forget a restart.
  8. To add a resource to the service, click Add a resource. Clicking Add a resource causes the display of a drop-down box that allows you to add an existing Global resource or to add a new resource that is available only to this service.
  9. To add an existing Global resource, click on the name of the existing resource from the Add a resource to this service drop-down box. This displays the resource and its parameters on the Services page for the service you are configuring. You cannot edit the parameters of a Global resource from this screen. For information on adding or modifying Global resources, see Section 3.8, “Configuring Global Cluster Resources”).
  10. To add a new resource that is available only to this service, select the type of resource to configure from the Add a resource drop-down box and enter the resource parameters for the resource you are adding. Appendix B, HA Resource Parameters describes resource parameters.

    Note

    If you are adding a Samba-service resource, connect a Samba-service resource directly to the service, not to a resource within a service.
  11. If you want to add child resources to the resource you are defining, click Add a child resource. Clicking Add a child resource causes the display of the Add a resource to this service drop-down box, from which you can add an existing Global resource or add a new resource that is available only to this service. You can continue adding children resources to the resource to suit your requirements.
  12. When you have completed adding resources to the service, and have completed adding children resources to resources, click Submit. Clicking Submit returns to the Services page displaying the added service (and other services).

Note

To verify the existence of the IP service resource used in a cluster service, you must use the /sbin/ip addr list command on a cluster node. The following output shows the /sbin/ip addr list command executed on a node running a cluster service:
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1356 qdisc pfifo_fast qlen 1000
    link/ether 00:05:5d:9a:d8:91 brd ff:ff:ff:ff:ff:ff
    inet 10.11.4.31/22 brd 10.11.7.255 scope global eth0
    inet6 fe80::205:5dff:fe9a:d891/64 scope link
    inet 10.11.4.240/22 scope global secondary eth0
       valid_lft forever preferred_lft forever
To modify an existing service, perform the following steps.
  1. From the luci Services page, click on the name of the service to modify. This displays the parameters and resources that have been configured for that service.
  2. Edit the service parameters.
  3. Click Submit.
To delete an existing resource, perform the following steps.
  1. From the luci Services page, click the checkbox for any services to delete.
  2. Click Delete.