Revision bebf68d3

b/daemons/ganeti-noded
844 844
  """Main node daemon function, executed with the PID file held.
845 845

  
846 846
  """
847
  utils.Mlockall()
847
  if options.mlock:
848
    utils.Mlockall()
849
    request_executor_class = MlockallRequestExecutor
850
  else:
851
    request_executor_class = http.server.HttpServerRequestExecutor
848 852

  
849 853
  # Read SSL certificate
850 854
  if options.ssl:
......
863 867
  mainloop = daemon.Mainloop()
864 868
  server = NodeHttpServer(mainloop, options.bind_address, options.port,
865 869
                          ssl_params=ssl_params, ssl_verify_peer=True,
866
                          request_executor_class=MlockallRequestExecutor)
870
                          request_executor_class=request_executor_class)
867 871
  server.Start()
868 872
  try:
869 873
    mainloop.Run()
......
879 883
                        usage="%prog [-f] [-d] [-p port] [-b ADDRESS]",
880 884
                        version="%%prog (ganeti) %s" %
881 885
                        constants.RELEASE_VERSION)
886
  parser.add_option("--no-mlock", dest="mlock",
887
                    help="Do not mlock the node memory in ram",
888
                    default=True, action="store_false")
889

  
882 890
  dirs = [(val, constants.RUN_DIRS_MODE) for val in constants.SUB_RUN_DIRS]
883 891
  dirs.append((constants.LOG_OS_DIR, 0750))
884 892
  dirs.append((constants.LOCK_DIR, 1777))
b/man/ganeti-noded.sgml
53 53
    </para>
54 54

  
55 55
    <para>
56
      By default, in order to be able to support features such as node
57
      powercycling even on systems with a very damaged root disk, ganeti-noded
58
      mlocks itself in ram. You can disable this feature by passing in the
59
      <option>--no-mlock</option>.
60
    </para>
61

  
62
    <para>
56 63
      For testing purposes, you can give the <option>-f</option>
57 64
      option and the program won't detach from the running terminal.
58 65
    </para>

Also available in: Unified diff