         code_skipped: 1
       , (err, started) ->
         return callback err if err
-        ctx.waitIsOpen [
-          host: ctx.config.host, port: hdfs_namenode_ipc_port
-        ,
-          host: ctx.config.host, port: hdfs_namenode_http_port
-        ], timeout: hdfs_namenode_timeout, (err) ->
-          callback err, started
+        return callback null, false unless started
+        ports = [hdfs_namenode_ipc_port, hdfs_namenode_http_port]
+        ctx.waitIsOpen ctx.config.host, ports, timeout: hdfs_namenode_timeout, (err) ->
+          return callback err if err
+          return callback null, true unless active_nn
+          active_nn_host = active_nn_host.split('.')[0]
+          standby_nn_host = standby_nn_host.split('.')[0]
+          ctx.execute
+            cmd: "if hdfs haadmin -getServiceState #{active_nn_host} | grep standby; then hdfs haadmin -failover #{standby_nn_host} #{active_nn_host}; fi"
+          , (err) ->
+            callback err, true
   nn_stop: (ctx, callback) ->
     {hdfs_user, hadoop_conf_dir} = ctx.config.hdp
     lifecyle.nn_status ctx, (err, running) ->

        code_skipped: 1
      , (err, stopped) ->
        callback err, stopped
  zkfc_status: (ctx, callback) ->
    {hdfs_user, hdfs_pid_dir} = ctx.config.hdp
    ctx.log "ZKFC status"

        code_skipped: 1
      , (err, stopped) ->
        callback err, stopped
  hbase_master_status: (ctx, callback) ->
    {hbase_pid_dir, hbase_user} = ctx.config.hdp
    ctx.log "HBase Master status"
