Verify that no fail over is triggered when the NameNode enters the safe mode

This test verifies that the VM is not restarted if the NameNode enters safe mode. This allows administration operations to be performed on a file system in safemode without having to disable HA services.

  1. Start the NameNode VM and SSH to the NameNode VM.

  2. Enter safe mode.

    hadoop dfsadmin -safemode enter
  3. Ensure that you see the following expected results:

    • In the vSphere UI, the NameNode VM should be live.

    • The SSH session should exist and the VM should be live.

  4. Terminate the NameNode process.

    service hadoop-namenode stop
  5. The vSphere should identify the NameNode failure and should restart the VM.

[Note]Note

This test shows that even in safe mode the fail over is triggered if the NameNode process is terminated. To avoid automatic restart for NameNode after performing safe mode operations, use the service hmonitor-namenode-monitor restart to restart the monitor service.