8.3. Clusters and Gluster Hooks

8.3.1. Managing Gluster Hooks

Gluster hooks are volume life cycle extensions. You can manage Gluster hooks from the Manager. The content of the hook can be viewed if the hook content type is Text.
Through the Manager, you can perform the following:
  • View a list of hooks available in the hosts.
  • View the content and status of hooks.
  • Enable or disable hooks.
  • Resolve hook conflicts.

8.3.2. Listing Hooks

Summary

List the Gluster hooks in your environment.

Procedure 8.12. Listing a Hook

  1. Use the Cluster resource tab, tree mode, or the search function to find and select a cluster in the results list.
  2. Select the Gluster Hooks sub-tab to list the hooks in the details pane.
Result

You have listed the Gluster hooks in your environment.

8.3.3. Viewing the Content of Hooks

Summary

View the content of a Gluster hook in your environment.

Procedure 8.13. Viewing the Content of a Hook

  1. Use the Cluster resource tab, tree mode, or the search function to find and select a cluster in the results list.
  2. Select the Gluster Hooks sub-tab to list the hooks in the details pane.
  3. Select a hook with content type Text and click the View Content button to open the Hook Content window.
Result

You have viewed the content of a hook in your environment.

8.3.4. Enabling or Disabling Hooks

Summary

Toggle the activity of a Gluster hook by enabling or disabling it.

Procedure 8.14. Enabling or Disabling a Hook

  1. Use the Cluster resource tab, tree mode, or the search function to find and select a cluster in the results list.
  2. Select the Gluster Hooks sub-tab to list the hooks in the details pane.
  3. Select a hook and click one of the Enable or Disable buttons. The hook is enabled or disabled on all nodes of the cluster.
Result

You have toggled the activity of a Gluster hook in your environment.

8.3.5. Refreshing Hooks

Summary

By default, the Manager checks the status of installed hooks on the engine and on all servers in the cluster and detects new hooks by running a periodic job every hour. You can refresh hooks manually by clicking the Sync button.

Procedure 8.15. Refreshing a Hook

  1. Use the Cluster resource tab, tree mode, or the search function to find and select a cluster in the results list.
  2. Select the Gluster Hooks sub-tab to list the hooks in the details pane.
  3. Click the Sync button.
Result

The hooks are synchronized and updated in the details pane.

8.3.6. Resolving Conflicts

The hooks are displayed in the Gluster Hooks sub-tab of the Cluster tab. Hooks causing a conflict are displayed with an exclamation mark. This denotes either that there is a conflict in the content or the status of the hook across the servers in the cluster, or that the hook script is missing in one or more servers. These conflicts can be resolved via the Manager. The hooks in the servers are periodically synchronized with engine database and the following conflicts can occur for the hooks:
  • Content Conflict - the content of the hook is different across servers.
  • Missing Conflict - one or more servers of the cluster do not have the hook.
  • Status Conflict - the status of the hook is different across servers.
  • Multiple Conflicts - a hook has a combination of two or more of the aforementioned conflicts.

8.3.7. Resolving Content Conflicts

Summary

A hook that is not consistent across the servers and engine will be flagged as having a conflict. To resolve the conflict, you must select a version of the hook to be copied across all servers and the engine.

Procedure 8.16. Resolving a Content Conflict

  1. Use the Cluster resource tab, tree mode, or the search function to find and select a cluster in the results list.
  2. Select the Gluster Hooks sub-tab to list the hooks in the details pane.
  3. Select the conflicting hook and click the Resolve Conflicts button to open the Resolve Conflicts window.
  4. Select the engine or a server from the list of sources to view the content of that hook and establish which version of the hook to copy.

    Note

    The content of the hook will be overwritten in all servers and in the engine.
  5. Use the Use content from drop-down menu to select the preferred server or the engine.
  6. Click OK to resolve the conflict and close the window.
Result

The hook from the selected server is copied across all servers and the engine to be consistent across the environment.

8.3.8. Resolving Missing Hook Conflicts

Summary

A hook that is not present on all the servers and the engine will be flagged as having a conflict. To resolve the conflict, either select a version of the hook to be copied across all servers and the engine, or remove the missing hook entirely.

Procedure 8.17. Resolving a Missing Hook Conflict

  1. Use the Cluster resource tab, tree mode, or the search function to find and select a cluster in the results list.
  2. Select the Gluster Hooks sub-tab to list the hooks in the details pane.
  3. Select the conflicting hook and click the Resolve Conflicts button to open the Resolve Conflicts window.
  4. Select any source with a status of Enabled to view the content of the hook.
  5. Select the appropriate radio button, either Copy the hook to all the servers or Remove the missing hook. The latter will remove the hook from the engine and all servers.
  6. Click OK to resolve the conflict and close the window.
Result

Depending on your chosen resolution, the hook has either been removed from the environment entirely, or has been copied across all servers and the engine to be consistent across the environment.

8.3.9. Resolving Status Conflicts

Summary

A hook that does not have a consistent status across the servers and engine will be flagged as having a conflict. To resolve the conflict, select a status to be enforced across all servers in the environment.

Procedure 8.18. Resolving a Status Conflict

  1. Use the Cluster resource tab, tree mode, or the search function to find and select a cluster in the results list.
  2. Select the Gluster Hooks sub-tab to list the hooks in the details pane.
  3. Select the conflicting hook and click the Resolve Conflicts button to open the Resolve Conflicts window.
  4. Set Hook Status to Enable or Disable.
  5. Click OK to resolve the conflict and close the window.
Result

The selected status for the hook is enforced across the engine and the servers to be consistent across the environment.

8.3.10. Resolving Multiple Conflicts

Summary

A hook may have a combination of two or more conflicts. These can all be resolved concurrently or independently through the Resolve Conflicts window. This procedure will resolve all conflicts for the hook so that it is consistent across the engine and all servers in the environment.

Procedure 8.19. Resolving Multiple Conflicts

  1. Use the Cluster resource tab, tree mode, or the search function to find and select a cluster in the results list.
  2. Select the Gluster Hooks sub-tab to list the hooks in the details pane.
  3. Select the conflicting hook and click the Resolve Conflicts button to open the Resolve Conflicts window.
  4. Choose a resolution to each of the affecting conflicts, as per the appropriate procedure.
  5. Click OK to resolve the conflicts and close the window.
Result

You have resolved all of the conflicts so that the hook is consistent across the engine and all servers.

8.3.11. Managing Gluster Sync

The Gluster Sync feature periodically fetches the latest cluster configuration from GlusterFS and syncs the same with the engine DB. This process can be performed through the Manager. When a cluster is selected, the user is provided with the option to import hosts or detach existing hosts from the selected cluster. You can perform Gluster Sync if there is a host in the cluster.

Note

The Manager continuously monitors if hosts are added to or removed from the storage cluster. If the addition or removal of a host is detected, an action item is shown in the General tab for the cluster, where you can either to choose to Import the host into or Detach the host from the cluster.