diff options
author | Guido Günther <agx@sigxcpu.org> | 2013-08-29 18:03:40 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2013-08-29 18:03:40 +0200 |
commit | a3b140a4518ef729107497675c80b923b19ea6d8 (patch) | |
tree | 7df33eb8222a514190fc6904183250e04589cac9 /daemon | |
parent | 58c2a296d9378f246f58b5abb2ec75d70ae2be78 (diff) |
New upstream version 1.1.2~rc1
Diffstat (limited to 'daemon')
-rw-r--r-- | daemon/Makefile.am | 5 | ||||
-rw-r--r-- | daemon/Makefile.in | 9 | ||||
-rw-r--r-- | daemon/libvirtd-config.c | 1 | ||||
-rw-r--r-- | daemon/libvirtd-config.h | 1 | ||||
-rw-r--r-- | daemon/libvirtd.8.in | 5 | ||||
-rw-r--r-- | daemon/libvirtd.aug | 1 | ||||
-rw-r--r-- | daemon/libvirtd.c | 35 | ||||
-rw-r--r-- | daemon/libvirtd.conf | 6 | ||||
-rw-r--r-- | daemon/libvirtd.pod.in | 4 | ||||
-rw-r--r-- | daemon/libvirtd.service.in | 1 | ||||
-rw-r--r-- | daemon/lxc_dispatch.h | 2 | ||||
-rw-r--r-- | daemon/qemu_dispatch.h | 2 | ||||
-rw-r--r-- | daemon/remote_dispatch.h | 2 | ||||
-rw-r--r-- | daemon/test_libvirtd.aug.in | 1 |
14 files changed, 52 insertions, 23 deletions
diff --git a/daemon/Makefile.am b/daemon/Makefile.am index ad7544c4d..e34868b07 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -125,9 +125,12 @@ libvirtd_CFLAGS = \ -DQEMUD_PID_FILE="\"$(QEMUD_PID_FILE)\"" libvirtd_LDFLAGS = \ + $(RELRO_LDFLAGS) \ $(PIE_LDFLAGS) \ $(RELRO_LDFLAGS) \ - $(COVERAGE_LDFLAGS) + $(COVERAGE_LDFLAGS) \ + $(NO_INDIRECT_LDFLAGS) \ + $(NULL) libvirtd_LDADD = \ $(LIBXML_LIBS) \ diff --git a/daemon/Makefile.in b/daemon/Makefile.in index c5e38af23..a199f7b0d 100644 --- a/daemon/Makefile.in +++ b/daemon/Makefile.in @@ -347,6 +347,7 @@ am__aclocal_m4_deps = $(top_srcdir)/gnulib/m4/00gnulib.m4 \ $(top_srcdir)/m4/virt-curl.m4 $(top_srcdir)/m4/virt-dbus.m4 \ $(top_srcdir)/m4/virt-fuse.m4 $(top_srcdir)/m4/virt-hal.m4 \ $(top_srcdir)/m4/virt-lib.m4 \ + $(top_srcdir)/m4/virt-linker-no-indirect.m4 \ $(top_srcdir)/m4/virt-linker-relro.m4 \ $(top_srcdir)/m4/virt-netcf.m4 \ $(top_srcdir)/m4/virt-numactl.m4 \ @@ -1342,6 +1343,7 @@ HAVE__BOOL = @HAVE__BOOL@ HAVE__EXIT = @HAVE__EXIT@ HOSTENT_LIB = @HOSTENT_LIB@ HTML_DIR = @HTML_DIR@ +IFCONFIG_PATH = @IFCONFIG_PATH@ INCLUDE_NEXT = @INCLUDE_NEXT@ INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ INET_NTOP_LIB = @INET_NTOP_LIB@ @@ -1523,6 +1525,7 @@ NEXT_WCHAR_H = @NEXT_WCHAR_H@ NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ NM = @NM@ NMEDIT = @NMEDIT@ +NO_INDIRECT_LDFLAGS = @NO_INDIRECT_LDFLAGS@ NUMACTL_CFLAGS = @NUMACTL_CFLAGS@ NUMACTL_LIBS = @NUMACTL_LIBS@ NUMAD = @NUMAD@ @@ -1837,6 +1840,7 @@ VGREMOVE = @VGREMOVE@ VGS = @VGS@ VGSCAN = @VGSCAN@ VIRSH_LIBS = @VIRSH_LIBS@ +VIR_TEST_EXPENSIVE_DEFAULT = @VIR_TEST_EXPENSIVE_DEFAULT@ WARN_CFLAGS = @WARN_CFLAGS@ WARN_PYTHON_CFLAGS = @WARN_PYTHON_CFLAGS@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ @@ -1995,9 +1999,12 @@ QEMU_PROTOCOL = $(top_srcdir)/src/remote/qemu_protocol.x @WITH_LIBVIRTD_TRUE@ -DQEMUD_PID_FILE="\"$(QEMUD_PID_FILE)\"" @WITH_LIBVIRTD_TRUE@libvirtd_LDFLAGS = \ +@WITH_LIBVIRTD_TRUE@ $(RELRO_LDFLAGS) \ @WITH_LIBVIRTD_TRUE@ $(PIE_LDFLAGS) \ @WITH_LIBVIRTD_TRUE@ $(RELRO_LDFLAGS) \ -@WITH_LIBVIRTD_TRUE@ $(COVERAGE_LDFLAGS) +@WITH_LIBVIRTD_TRUE@ $(COVERAGE_LDFLAGS) \ +@WITH_LIBVIRTD_TRUE@ $(NO_INDIRECT_LDFLAGS) \ +@WITH_LIBVIRTD_TRUE@ $(NULL) # This must be added last, since functions it provides/replaces diff --git a/daemon/libvirtd-config.c b/daemon/libvirtd-config.c index 107a9cf7a..c816fda64 100644 --- a/daemon/libvirtd-config.c +++ b/daemon/libvirtd-config.c @@ -414,6 +414,7 @@ daemonConfigLoadOptions(struct daemonConfig *data, GET_CONF_INT(conf, filename, min_workers); GET_CONF_INT(conf, filename, max_workers); GET_CONF_INT(conf, filename, max_clients); + GET_CONF_INT(conf, filename, max_queued_clients); GET_CONF_INT(conf, filename, prio_workers); diff --git a/daemon/libvirtd-config.h b/daemon/libvirtd-config.h index 973e0eab7..a24d5d273 100644 --- a/daemon/libvirtd-config.h +++ b/daemon/libvirtd-config.h @@ -63,6 +63,7 @@ struct daemonConfig { int min_workers; int max_workers; int max_clients; + int max_queued_clients; int prio_workers; diff --git a/daemon/libvirtd.8.in b/daemon/libvirtd.8.in index 6a35bcf48..a727d6d12 100644 --- a/daemon/libvirtd.8.in +++ b/daemon/libvirtd.8.in @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "LIBVIRTD 8" -.TH LIBVIRTD 8 "2012-08-15" "libvirt-1.1.1" "Virtualization Support" +.TH LIBVIRTD 8 "2013-08-28" "libvirt-1.1.2" "Virtualization Support" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -170,6 +170,9 @@ defined. Any guests whose \s-1XML\s0 configuration has not been defined will be from the configuration. .SH "OPTIONS" .IX Header "OPTIONS" +.IP "\fB\-h, \-\-help\fR" 4 +.IX Item "-h, --help" +Display command line help usage then exit. .IP "\fB\-d, \-\-daemon\fR" 4 .IX Item "-d, --daemon" Run as a daemon & write \s-1PID\s0 file. diff --git a/daemon/libvirtd.aug b/daemon/libvirtd.aug index 7c56a4111..70fce5c08 100644 --- a/daemon/libvirtd.aug +++ b/daemon/libvirtd.aug @@ -56,6 +56,7 @@ module Libvirtd = let processing_entry = int_entry "min_workers" | int_entry "max_workers" | int_entry "max_clients" + | int_entry "max_queued_clients" | int_entry "max_requests" | int_entry "max_client_requests" | int_entry "prio_workers" diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c index 9f7fd8a27..c9cd1a16d 100644 --- a/daemon/libvirtd.c +++ b/daemon/libvirtd.c @@ -485,6 +485,7 @@ static int daemonSetupNetworking(virNetServerPtr srv, NULL, #endif false, + config->max_queued_clients, config->max_client_requests))) goto error; if (sock_path_ro) { @@ -497,6 +498,7 @@ static int daemonSetupNetworking(virNetServerPtr srv, NULL, #endif true, + config->max_queued_clients, config->max_client_requests))) goto error; } @@ -522,6 +524,7 @@ static int daemonSetupNetworking(virNetServerPtr srv, NULL, #endif false, + config->max_queued_clients, config->max_client_requests))) goto error; @@ -562,6 +565,7 @@ static int daemonSetupNetworking(virNetServerPtr srv, config->auth_tls, ctxt, false, + config->max_queued_clients, config->max_client_requests))) { virObjectUnref(ctxt); goto error; @@ -1034,12 +1038,13 @@ daemonUsage(const char *argv0, bool privileged) " %s [options]\n" "\n" "Options:\n" + " -h | --help Display program help:\n" " -v | --verbose Verbose messages.\n" " -d | --daemon Run as a daemon & write PID file.\n" " -l | --listen Listen for TCP/IP connections.\n" " -t | --timeout <secs> Exit after timeout period.\n" " -f | --config <file> Configuration file.\n" - " | --version Display version information.\n" + " -V | --version Display version information.\n" " -p | --pid-file <file> Change name of PID file.\n" "\n" "libvirt management daemon:\n"), @@ -1094,10 +1099,6 @@ daemonUsage(const char *argv0, bool privileged) } } -enum { - OPT_VERSION = 129 -}; - #define MAX_LISTEN 5 int main(int argc, char **argv) { virNetServerPtr srv = NULL; @@ -1119,14 +1120,14 @@ int main(int argc, char **argv) { mode_t old_umask; struct option opts[] = { - { "verbose", no_argument, &verbose, 1}, - { "daemon", no_argument, &godaemon, 1}, - { "listen", no_argument, &ipsock, 1}, + { "verbose", no_argument, &verbose, 'v'}, + { "daemon", no_argument, &godaemon, 'd'}, + { "listen", no_argument, &ipsock, 'l'}, { "config", required_argument, NULL, 'f'}, { "timeout", required_argument, NULL, 't'}, { "pid-file", required_argument, NULL, 'p'}, - { "version", no_argument, NULL, OPT_VERSION }, - { "help", no_argument, NULL, '?' }, + { "version", no_argument, NULL, 'V' }, + { "help", no_argument, NULL, 'h' }, {0, 0, 0, 0} }; @@ -1169,7 +1170,7 @@ int main(int argc, char **argv) { int c; char *tmp; - c = getopt_long(argc, argv, "ldf:p:t:v", opts, &optidx); + c = getopt_long(argc, argv, "ldf:p:t:vVh", opts, &optidx); if (c == -1) { break; @@ -1215,17 +1216,17 @@ int main(int argc, char **argv) { } break; - case OPT_VERSION: + case 'V': daemonVersion(argv[0]); - return 0; + exit(EXIT_SUCCESS); - case '?': + case 'h': daemonUsage(argv[0], privileged); - return 2; + exit(EXIT_SUCCESS); + case '?': default: - VIR_ERROR(_("%s: internal error: unknown flag: %c"), - argv[0], c); + daemonUsage(argv[0], privileged); exit(EXIT_FAILURE); } } diff --git a/daemon/libvirtd.conf b/daemon/libvirtd.conf index af4493e63..53539275f 100644 --- a/daemon/libvirtd.conf +++ b/daemon/libvirtd.conf @@ -257,6 +257,12 @@ # over all sockets combined. #max_clients = 20 +# The maximum length of queue of connections waiting to be +# accepted by the daemon. Note, that some protocols supporting +# retransmission may obey this so that a later reattempt at +# connection succeeds. +#max_queued_clients = 1000 + # The minimum limit sets the number of workers to start up # initially. If the number of active clients exceeds this, diff --git a/daemon/libvirtd.pod.in b/daemon/libvirtd.pod.in index 930b75236..9901ecfe5 100644 --- a/daemon/libvirtd.pod.in +++ b/daemon/libvirtd.pod.in @@ -36,6 +36,10 @@ from the configuration. =over +=item B<-h, --help> + +Display command line help usage then exit. + =item B<-d, --daemon> Run as a daemon & write PID file. diff --git a/daemon/libvirtd.service.in b/daemon/libvirtd.service.in index aa5913bc1..25979efd3 100644 --- a/daemon/libvirtd.service.in +++ b/daemon/libvirtd.service.in @@ -15,6 +15,7 @@ EnvironmentFile=-/etc/sysconfig/libvirtd ExecStart=@sbindir@/libvirtd $LIBVIRTD_ARGS ExecReload=/bin/kill -HUP $MAINPID KillMode=process +Restart=on-failure # Override the maximum number of opened files #LimitNOFILE=2048 diff --git a/daemon/lxc_dispatch.h b/daemon/lxc_dispatch.h index fad9f2f6c..1d62eeab1 100644 --- a/daemon/lxc_dispatch.h +++ b/daemon/lxc_dispatch.h @@ -1,4 +1,4 @@ -/* Automatically generated by gendispatch.pl. +/* Automatically generated from ../src/remote/lxc_protocol.x by gendispatch.pl. * Do not edit this file. Any changes you make will be lost. */ static int lxcDispatchDomainOpenNamespace( diff --git a/daemon/qemu_dispatch.h b/daemon/qemu_dispatch.h index ba97ee5c4..ff9d217b6 100644 --- a/daemon/qemu_dispatch.h +++ b/daemon/qemu_dispatch.h @@ -1,4 +1,4 @@ -/* Automatically generated by gendispatch.pl. +/* Automatically generated from ../src/remote/qemu_protocol.x by gendispatch.pl. * Do not edit this file. Any changes you make will be lost. */ static int qemuDispatchDomainAgentCommand( diff --git a/daemon/remote_dispatch.h b/daemon/remote_dispatch.h index 97e2304dc..875a464c0 100644 --- a/daemon/remote_dispatch.h +++ b/daemon/remote_dispatch.h @@ -1,4 +1,4 @@ -/* Automatically generated by gendispatch.pl. +/* Automatically generated from ../src/remote/remote_protocol.x by gendispatch.pl. * Do not edit this file. Any changes you make will be lost. */ static int remoteDispatchAuthList( diff --git a/daemon/test_libvirtd.aug.in b/daemon/test_libvirtd.aug.in index 4e3b8789f..a7e8515c6 100644 --- a/daemon/test_libvirtd.aug.in +++ b/daemon/test_libvirtd.aug.in @@ -35,6 +35,7 @@ module Test_libvirtd = { "2" = "fred@EXAMPLE.COM" } } { "max_clients" = "20" } + { "max_queued_clients" = "1000" } { "min_workers" = "5" } { "max_workers" = "20" } { "prio_workers" = "5" } |