def check_ohai(&block)
      ohai = create_ohai
      if ohai[:hostname]
        block.call(ohai)
      else
        Log.warning("Could not determine node name from Ohai, will retry in #{@ohai_retry_delay}s...")
        # Need to execute on defer thread consistent with where ExecutableSequence is running
        # otherwise EM main thread command client activity will block
        EM.add_timer(@ohai_retry_delay) { EM.defer { check_ohai(&block) } }
        @ohai_retry_delay = [2 * @ohai_retry_delay, OHAI_RETRY_MAX_DELAY].min
      end
      true
    end
def check_ohai(&block)
      ohai = create_ohai
      if ohai[:hostname]
        block.call(ohai)
      else
        Log.warning("Could not determine node name from Ohai, will retry in #{@ohai_retry_delay}s...")
        # Need to execute on defer thread consistent with where ExecutableSequence is running
        # otherwise EM main thread command client activity will block
        EM.add_timer(@ohai_retry_delay) { EM.defer { check_ohai(&block) } }
        @ohai_retry_delay = [2 * @ohai_retry_delay, OHAI_RETRY_MAX_DELAY].min
      end
      true
    end
Checks whether Ohai is ready and calls given block with it
 if that's the case otherwise schedules itself to try again
 indefinitely

 === Block
 Given block should take one argument which corresponds to
 ohai instance

 === Return
 true:: Always return true