Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-3618

SSH fencing option may incorrectly succeed if nc (netcat) command not present

    Details

    • Type: Bug
    • Status: Patch Available
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.0.0-alpha
    • Fix Version/s: None
    • Component/s: auto-failover
    • Labels:
    • Target Version/s:

      Description

      Started NN's and zkfc's in Suse11.
      Suse11 will have netcat installation and netcat -z will work(but nc -z wn't work)..
      While executing following command, got command not found hence rc will be other than zero and assuming that server was down..Here we are ending up without checking whether service is down or not..

      LOG.info(
                  "Indeterminate response from trying to kill service. " +
                  "Verifying whether it is running using nc...");
              rc = execCommand(session, "nc -z " + serviceAddr.getHostName() +
                  " " + serviceAddr.getPort());
              if (rc == 0) {
                // the service is still listening - we are unable to fence
                LOG.warn("Unable to fence - it is running but we cannot kill it");
                return false;
              } else {
                LOG.info("Verified that the service is down.");
                return true;          
              }
      
      

        Attachments

        1. zkfc.txt
          184 kB
          Brahma Reddy Battula
        2. zkfc_threaddump.out
          93 kB
          Brahma Reddy Battula
        3. HDFS-3618-04.patch
          9 kB
          Vinayakumar B
        4. HDFS-3618.patch
          6 kB
          Vinayakumar B
        5. HDFS-3618.patch
          9 kB
          Vinayakumar B
        6. HDFS-3618.patch
          8 kB
          Vinayakumar B

          Issue Links

            Activity

              People

              • Assignee:
                vinayrpet Vinayakumar B
                Reporter:
                brahmareddy Brahma Reddy Battula
              • Votes:
                1 Vote for this issue
                Watchers:
                16 Start watching this issue

                Dates

                • Created:
                  Updated: