Merge branch 'devel-2.1'
authorMichael Hanselmann <hansmi@google.com>
Mon, 1 Feb 2010 13:01:20 +0000 (14:01 +0100)
committerMichael Hanselmann <hansmi@google.com>
Mon, 1 Feb 2010 13:01:20 +0000 (14:01 +0100)
* devel-2.1:
  Bump version to 2.1.0~rc5
  Makefile.am: Targets used directly should depend on BUILT_SOURCES
  Make the snapshot decision based on disk type
  Three small typos in man pages
  Fix missing bridge for xen instances
  Fix flipping MC flag bug
  ganeti-watcher: ensure confd is running as well
  Add capability to use syslog for logging
  node daemon: allow working with broken queue dir
  utils.FileLock: handle init errors properly
  daemon-utils: remove usage of here-docs
  Fix typo in ganeti-os-interface(7)
  locking: add/fix @type information
  Fix __slots__ definitions
  Fix the mocks.py for 2.0 unittests
  Add a crude disable for DRBD barriers
  LURemoveNode safety in face of wrong node list
  Fix an unsafe formatting bug
  Ensure all int/float conversions are handled right

Conflicts:
lib/daemon.py: Trivial

1  2 
Makefile.am
daemons/ganeti-noded
lib/cli.py
lib/cmdlib.py
lib/constants.py
lib/daemon.py
lib/http/__init__.py

diff --cc Makefile.am
Simple merge
Simple merge
diff --cc lib/cli.py
Simple merge
diff --cc lib/cmdlib.py
Simple merge
Simple merge
diff --cc lib/daemon.py
@@@ -253,21 -245,26 +253,27 @@@ def GenericMain(daemon_name, optionpars
    optionparser.add_option("-d", "--debug", dest="debug",
                            help="Enable some debug messages",
                            default=False, action="store_true")
+   optionparser.add_option("--syslog", dest="syslog",
+                           help="Enable logging to syslog (except debug"
+                           " messages); one of 'no', 'yes' or 'only' [%s]" %
+                           constants.SYSLOG_USAGE,
+                           default=constants.SYSLOG_USAGE,
+                           choices=["no", "yes", "only"])
 +
    if daemon_name in constants.DAEMONS_PORTS:
 -    # for networked daemons we also allow choosing the bind port and address.
 -    # by default we use the port provided by utils.GetDaemonPort, and bind to
 -    # 0.0.0.0 (which is represented by and empty bind address.
 -    port = utils.GetDaemonPort(daemon_name)
 +    default_bind_address = "0.0.0.0"
 +    default_port = utils.GetDaemonPort(daemon_name)
 +
 +    # For networked daemons we allow choosing the port and bind address
      optionparser.add_option("-p", "--port", dest="port",
 -                            help="Network port (%s default)." % port,
 -                            default=port, type="int")
 +                            help="Network port (default: %s)" % default_port,
 +                            default=default_port, type="int")
      optionparser.add_option("-b", "--bind", dest="bind_address",
 -                            help="Bind address",
 -                            default="", metavar="ADDRESS")
 +                            help=("Bind address (default: %s)" %
 +                                  default_bind_address),
 +                            default=default_bind_address, metavar="ADDRESS")
  
 -  if daemon_name in constants.DAEMONS_SSL:
 -    default_cert, default_key = constants.DAEMONS_SSL[daemon_name]
 +  if default_ssl_key is not None and default_ssl_cert is not None:
      optionparser.add_option("--no-ssl", dest="ssl",
                              help="Do not secure HTTP protocol with SSL",
                              default=True, action="store_false")
      utils.SetupLogging(logfile=constants.DAEMONS_LOGFILES[daemon_name],
                         debug=options.debug,
                         stderr_logging=not options.fork,
-                        multithreaded=multithreaded)
 -                       multithreaded=multithread,
++                       multithreaded=multithreaded,
+                        program=daemon_name,
+                        syslog=options.syslog)
      logging.info("%s daemon startup", daemon_name)
      exec_fn(options, args)
    finally:
Simple merge