2.6. Testing the Configuration


The specifics of a procedure for testing your cluster configuration will depend on the high availability application you are running in the cluster, but in general you can check whether the application is running and whether it fails over as follows.
  1. Verify that the service you created is running with the clustat command, which you can run on either cluster node. In this example, the service example_apache is running on node1.example.com.
    # clustat
    Cluster Status for exampleHA @ Thu Sep 29 12:17:39 2011
    Member Status: Quorate
    
    Member Name                             ID   Status
    ------ ----                             ---- ------
    node1.example.com                       1 Online, Local
    node2.example.com                       2 Online
    
    Service Name                   Owner (Last)                   State
    ------ ----                   ----- ------                   -----
    service:example_apache         node-01.example.com            started
    
  2. Check whether the service is operational. How you do this depends on the application. For example, if you are running an Apache web server, point a browser to the URL you defined for the server to see if the display is correct.
  3. Shut down the cluster software on the node on which the service is running, which you can determine from the clustat display.
    1. Click on the cluster name beneath Manage Clusters from the menu on the left side of the luci Homebase page. This displays the nodes that constitute the cluster.
    2. Select the node you want to leave the cluster by clicking the check box for that node.
    3. Select the Leave Cluster function from the menu at the top of the page. This causes a message to appear at the top of the page indicating that the node is being stopped.
    4. Refresh the page to see the updated status of the node.
  4. Run the clustat command again to see if the service is now running on the other cluster node. If it is, check again to see if the service is still operational. For example, if you are running an apache web server, check whether you can still display the website.
  5. Make sure you have the node you disabled rejoin the cluster by returning to the cluster node display, selecting the node, and selecting Join Cluster.
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.