- 12 10月, 2011 1 次提交
-
-
由 Osier Yang 提交于
This is a regression introduced by new RPC codes, previously we advertise the service via ssh even if the daemon doesn't listen on TLS port (TCP is not choosed). Now the service is only advertised when it listens on TLS or TCP port. This breaks upper layer apps which intends to discover the service, such as virt-manager.
-
- 20 9月, 2011 1 次提交
-
-
由 Osier Yang 提交于
Silently setting "timeout" as -1 if the specified value is invalid is a bit confused.
-
- 13 9月, 2011 1 次提交
-
-
由 Daniel Veillard 提交于
This is a bit painful for example when starting virt-manager it tends to clutter libvirtd.log with invalid operation on cpu pinning for defined but not running domains. A priori those kind of errors don't indicate an error when executing the command but on a precondition for running the API, and honnestly while the application should report it, logging it as an error in libvirtd.log is not really useful, Related bug: https://bugzilla.redhat.com/show_bug.cgi?id=590807 * daemon/libvirtd.c: extend daemonErrorLogFilter() to filter out errors of type VIR_ERR_OPERATION_INVALID
-
- 06 9月, 2011 1 次提交
-
-
由 Michal Privoznik 提交于
This patch annotates APIs with low or high priority. In low set MUST be all APIs which might eventually access monitor (and thus block indefinitely). Other APIs may be marked as high priority. However, some must be (e.g. domainDestroy). For high priority calls (HPC), there are some high priority workers (HPW) created in the pool. HPW can execute only HPC, although normal worker can process any call regardless priority. Therefore, only those APIs which are guaranteed to end in reasonable small amount of time can be marked as HPC. The size of this HPC pool is static, because HPC are expected to end quickly, therefore jobs assigned to this pool will be served quickly. It can be configured in libvirtd.conf via prio_workers variable. Default is set to 5. To mark API with low or high priority, append priority:{low|high} to it's comment in src/remote/remote_protocol.x. This is similar to autogen|skipgen. If not marked, the generator assumes low as default.
-
- 02 9月, 2011 1 次提交
-
-
由 Xu He Jie 提交于
When libvirtd is running at non-root user, it won't create ${HOME}/.libvirt. It will show error message: 17:44:16.838: 7035: error : virPidFileAcquirePath:322 : Failed to open pid file Signed-off-by: NXu He Jie <xuhj@linux.vnet.ibm.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 25 8月, 2011 1 次提交
-
-
由 Michal Privoznik 提交于
My previous patch 74c75671 introduced a regression by removing TLS initialization from client.
-
- 24 8月, 2011 1 次提交
-
-
由 Eric Blake 提交于
* src/qemu/qemu_driver.c (qemuDomainSaveInternal): Fix typo. * src/conf/domain_event.c (virDomainEventDispatchMatchCallback): Likewise. * daemon/libvirtd.c (daemonRunStateInit): Likewise. * src/lxc/lxc_container.c (lxcContainerChildMountSort): Likewise. * src/util/virterror.c (virCopyError, virRaiseErrorFull): Likewise. * src/xenxs/xen_sxpr.c (xenParseSxprSound): Likewise.
-
- 19 8月, 2011 1 次提交
-
-
由 Michal Privoznik 提交于
When spice_tls is set but listen_tls is not, we don't initialize GnuTLS library. So any later gnutls call (e.g. during migration, where we initialize a certificate) will access uninitialized GnuTLS internal structs and throws an error. Although, we might now initialize GnuTLS twice, it is safe according to the documentation: This function can be called many times, but will only do something the first time. This patch creates 2 functions: virNetTLSInit and virNetTLSDeinit with respect to written above.
-
- 17 8月, 2011 1 次提交
-
-
由 Peter Krempa 提交于
Early errors during start of libvirtd didn't have an error reporting mechanism and caused libvirtd to exit silently (only the return value indicated an error). Libvirt logging is initialized very early using enviroment variables and the internal error reporting API is used to report early errors. v2 changes: - print errors unconditionaly before logging starts - fix message to US spelling v2.5 changes: - initialize logging from enviroment - log all early errors using VIR_ERROR v3 changes: - move virSetLogFromEnv() after virInitialize() fixes: https://bugzilla.redhat.com/show_bug.cgi?id=728654
-
- 15 8月, 2011 1 次提交
-
-
由 Osier Yang 提交于
This is introduced by commit df0b57a9, which forgot to add signal handler for SIGHUP. A simple reproduce method: 1) Create a domain XML under /etc/libvirt/qemu 2) % kill -SIGHUP $(pidof libvirtd) 3) % virsh list --all (the new created domain XML is not listed)
-
- 13 8月, 2011 1 次提交
-
-
由 Daniel P. Berrange 提交于
Remove the current libvirtd pidfile handling code, in favour of calling out to the new APIs. This ensures libvirtd's pidfile handling is crashsafe This also means that the non-root libvirtd instances (for handling qemu:///session URIs) can now safely use pidfiles without racing * daemon/libvirtd.c: Switch to use virPidFileAcquire and virPidFileRelease
-
- 04 8月, 2011 1 次提交
-
-
由 Osier Yang 提交于
This patch introduces a internal RPC API "virNetServerClose", which is standalone with "virNetServerFree". it closes all the socket fds, and unlinks the unix socket paths, regardless of whether the socket is still referenced or not. This is to address regression bug: https://bugzilla.redhat.com/show_bug.cgi?id=725702
-
- 22 7月, 2011 3 次提交
-
-
由 Daniel P. Berrange 提交于
When libvirtd starts it it will sanity check its own certs, and before libvirt clients connect to a remote server they will sanity check their own certs. This patch allows such sanity checking to be skipped. There is no strong reason to need to do this, other than to bypass possible libvirt bugs in sanity checking, or for testing purposes. libvirt.conf gains tls_no_sanity_certificate parameter to go along with tls_no_verify_certificate. The remote driver client URIs gain a no_sanity URI parameter * daemon/test_libvirtd.aug, daemon/libvirtd.conf, daemon/libvirtd.c, daemon/libvirtd.aug: Add parameter to allow cert sanity checks to be skipped * src/remote/remote_driver.c: Add no_sanity parameter to skip cert checks * src/rpc/virnettlscontext.c, src/rpc/virnettlscontext.h: Add new parameter for skipping sanity checks independantly of skipping session cert validation checks
-
由 Daniel P. Berrange 提交于
If the virStateInitialize call fails we must shutdown libvirtd since drivers will not be available. Just free'ing the virNetServer is not sufficient, we must send a SIGTERM to ourselves so that we interrupt the event loop and trigger a orderly shutdown * daemon/libvirtd.c: Kill ourselves if state init fails * src/rpc/virnetserver.c: Add some debugging to event loop
-
由 Eric Blake 提交于
In preparation for a future patch adding new virFile APIs. * src/util/files.h, src/util/files.c: Move... * src/util/virfile.h, src/util/virfile.c: ...here, and rename functions to virFile prefix. Macro names are intentionally left alone. * *.c: All '#include "files.h"' uses changed. * src/Makefile.am (UTIL_SOURCES): Reflect rename. * cfg.mk (exclude_file_name_regexp--sc_prohibit_close): Likewise. * src/libvirt_private.syms: Likewise. * docs/hacking.html.in: Likewise. * HACKING: Regenerate.
-
- 12 7月, 2011 2 次提交
-
-
由 Jim Fehlig 提交于
V2: Remove policy kit references from virNetServer and use DBus APIs directly, if available.
-
由 Eric Blake 提交于
* src/util/virtaudit.[ch]: Rename... * src/util/viraudit.[ch]: ...to match virAudit* API. * src/Makefile.am (UTIL_SOURCES): Reflect rename. * daemon/libvirtd.c: Likewise. * po/POTFILES.in: Likewise. * src/libvirt_private.syms: Likewise. * src/qemu/qemu_audit.c: Likewise.
-
- 09 7月, 2011 1 次提交
-
-
由 Eric Blake 提交于
Fixes test regression introduced in commit 8e2e4780. * daemon/libvirtd.c (daemonConfigLoad): Add argument. (main): Update caller.
-
- 08 7月, 2011 1 次提交
-
-
由 Daniel P. Berrange 提交于
It is common for the $HOME/.libvirt/libvirtd.conf file to not exist. Treat this situation as non-fatal since we can carry on with our default settings just fine. * daemon/libvirtd.c: Treat ENOENT as non-fatal when loading config
-
- 02 7月, 2011 1 次提交
-
-
由 Eric Blake 提交于
Detected by Coverity; only strikes on OOM so not serious. * daemon/libvirtd.c (daemonPidFilePath): Plug leak.
-
- 01 7月, 2011 2 次提交
-
-
由 Daniel P. Berrange 提交于
* daemon/libvirtd.c, daemon/remote.c: Add #if HAVE_SASL and suitable function stubs to allow build without SASL
-
由 Daniel P. Berrange 提交于
The virNetServerClient object had a hardcoded limit of 10 requests per client. Extend constructor to allow it to be passed in as a configurable variable. Wire this up to the 'max_client_requests' config parameter in libvirtd * daemon/libvirtd.c: Pass max_client_requests into services * src/rpc/virnetserverservice.c, src/rpc/virnetserverservice.h: Pass nrequests_client_max to clients * src/rpc/virnetserverclient.c, src/rpc/virnetserverclient.h: Allow configurable request limit
-
- 29 6月, 2011 2 次提交
-
-
由 Jiri Denemark 提交于
-
由 Daniel P. Berrange 提交于
This guts the libvirtd daemon, removing all its networking and RPC handling code. Instead it calls out to the new virServerPtr APIs for all its RPC & networking work As a fallout all libvirtd daemon error reporting now takes place via the normal internal error reporting APIs. There is no need to call separate error reporting APIs in RPC code, nor should code use VIR_WARN/VIR_ERROR for reporting fatal problems anymore. * daemon/qemu_dispatch_*.h, daemon/remote_dispatch_*.h: Remove old generated dispatcher code * daemon/qemu_dispatch.h, daemon/remote_dispatch.h: New dispatch code * daemon/dispatch.c, daemon/dispatch.h: Remove obsoleted code * daemon/remote.c, daemon/remote.h: Rewrite for new dispatch APIs * daemon/libvirtd.c, daemon/libvirtd.h: Remove all networking code * daemon/stream.c, daemon/stream.h: Update for new APIs * daemon/Makefile.am: Link to libvirt-net-rpc-server.la
-
- 21 6月, 2011 1 次提交
-
-
由 Cole Robinson 提交于
Since we virEventRegisterDefaultImpl is now a public API, callers need a way to invoke the default registered Handle and Timeout functions. We already have general functions for these internally, so promote them to the public API. v2: Actually add APIs to libvirt.h
-
- 08 6月, 2011 1 次提交
-
-
由 Eric Blake 提交于
Detected by Coverity. Commit ef21beda was incomplete; it solved a leak one one path, but not on the other. * daemon/libvirtd.c (qemudSetLogging): Avoid leak on success.
-
- 03 6月, 2011 1 次提交
-
-
由 Eric Blake 提交于
Spotted by Coverity. Only possible on an OOM condition, so unlikely to bite in the wild. * daemon/libvirtd.c (qemudSetLogging): Don't leak memory.
-
- 16 5月, 2011 1 次提交
-
-
由 Daniel P. Berrange 提交于
Extend the QEMU migration cookie structure to allow information about the destination host graphics setup to be passed by to the source host. This will enable seamless migration of any connected graphics clients * src/qemu/qemu_migration.c: Add graphics info to migration cookies * daemon/libvirtd.c: Always initialize gnutls to enable x509 cert parsing in QEMU
-
- 12 5月, 2011 2 次提交
-
-
由 Eric Blake 提交于
We were 31/73 on whether to translate; since less than 50% translated and since VIR_INFO is less than VIR_WARN which also doesn't translate, this makes sense. * cfg.mk (sc_prohibit_gettext_markup): Add VIR_INFO, since it falls between WARN and DEBUG. * daemon/libvirtd.c (qemudDispatchSignalEvent, remoteCheckAccess) (qemudDispatchServer): Adjust offenders. * daemon/remote.c (remoteDispatchAuthPolkit): Likewise. * src/network/bridge_driver.c (networkReloadIptablesRules) (networkStartNetworkDaemon, networkShutdownNetworkDaemon) (networkCreate, networkDefine, networkUndefine): Likewise. * src/qemu/qemu_driver.c (qemudDomainDefine) (qemudDomainUndefine): Likewise. * src/storage/storage_driver.c (storagePoolCreate) (storagePoolDefine, storagePoolUndefine, storagePoolStart) (storagePoolDestroy, storagePoolDelete, storageVolumeCreateXML) (storageVolumeCreateXMLFrom, storageVolumeDelete): Likewise. * src/util/bridge.c (brProbeVnetHdr): Likewise. * po/POTFILES.in: Drop src/util/bridge.c.
-
由 Lai Jiangshan 提交于
These VIR_XXXX0 APIs make us confused, use the non-0-suffix APIs instead. How do these coversions works? The magic is using the gcc extension of ##. When __VA_ARGS__ is empty, "##" will swallow the "," in "fmt," to avoid compile error. example: origin after CPP high_level_api("%d", a_int) low_level_api("%d", a_int) high_level_api("a string") low_level_api("a string") About 400 conversions. 8 special conversions: VIR_XXXX0("") -> VIR_XXXX("msg") (avoid empty format) 2 conversions VIR_XXXX0(string_literal_with_%) -> VIR_XXXX(%->%%) 0 conversions VIR_XXXX0(non_string_literal) -> VIR_XXXX("%s", non_string_literal) (for security) 6 conversions Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
-
- 05 4月, 2011 1 次提交
-
-
由 Matthias Bolte 提交于
Move the buffers to the heap allocated client/private data structs.
-
- 28 3月, 2011 1 次提交
-
-
由 Daniel P. Berrange 提交于
The Open Nebula driver has been unmaintained since it was first introduced. The only commits have been for tree-wide cleanups. It also has a major design flaw, in that it only knows about guests that it has created itself, which makes it of very limited use. Discussions wrt evolution of the VMWare ESX driver, concluded that it should limit itself to single-node ESX operation and not try to manage the multi-node architecture of VirtualCenter. Open Nebula is a cluster like Virtual Center, not a single node system, so the same reasoning applies. The DeltaCloud project includes an Open Nebula driver and is a much better fit architecturally, since it is explicitly targetting the distributed multihost cluster scenario. Thus this patch deletes the libvirt Open Nebula driver with the recommendation that people use DeltaCloud for managing it instead. * configure.ac: Remove probe for xmlrpc & --with-one arg * daemon/Makefile.am, daemon/libvirtd.c, src/Makefile.am: Remove ONE driver build * src/opennebula/one_client.c, src/opennebula/one_client.h, src/opennebula/one_conf.c, src/opennebula/one_conf.h, src/opennebula/one_driver.c, src/opennebula/one_driver.c: Delete files * autobuild.sh, libvirt.spec.in, mingw32-libvirt.spec.in: Remove build rules for Open Nebula * docs/drivers.html.in, docs/sitemap.html.in: Remove reference to OpenNebula * docs/drvone.html.in: Delete file
-
- 18 3月, 2011 1 次提交
-
-
由 Jim Fehlig 提交于
Add a new xen driver based on libxenlight [1], which is the primary toolstack starting with Xen 4.1.0. The driver is stateful and runs privileged only. Like the existing xen-unified driver, the libxenlight driver is accessed with xen:// URI. Driver selection is based on the status of xend. If xend is running, the libxenlight driver will not load and xen:// connections are handled by xen-unified. If xend is not running *and* the libxenlight driver is available, xen:// connections are deferred to the libxenlight driver. V6: - Address several code style issues noted by Daniel Veillard - Make drive work with xen:/// URI - Hold domain object reference while domain is injected in libvirt event loop. Race found and fixed by Markus Groß. V5: - Ensure events are unregistered when domain private data is destroyed. Discovered and fixed by Markus Groß. V4: - Handle restart of libvirtd, reconnecting to previously started domains - Rebased to current master - Tested against Xen 4.1 RC7-pre (c/s 22961:c5d121fd35c0) V3: - Reserve vnc port within driver when autoport=yes V2: - Update to Xen 4.1 RC6-pre (c/s 22940:5a4710640f81) - Rebased to current master - Plug memory leaks found by Stefano Stabellini and valgrind - Handle SHUTDOWN_crash domain death event [1] http://lists.xensource.com/archives/html/xen-devel/2009-11/msg00436.html
-
- 15 3月, 2011 1 次提交
-
-
由 Daniel Veillard 提交于
This is the part allowing to dynamically resize the debug log buffer from it's default 64kB size. The buffer is now dynamically allocated. It adds a new API virLogSetBufferSize() which resizes the buffer If passed a zero size, the buffer is deallocated and we do the small optimization of not formatting messages which are not output anymore. On the daemon side, it just adds a new option log_buffer_size to libvirtd.conf and call virLogSetBufferSize() if needed * src/util/logging.h src/util/logging.c src/libvirt_private.syms: make buffer dynamic and add virLogSetBufferSize() internal API * daemon/libvirtd.conf: document the new log_buffer_size option * daemon/libvirtd.c: read and use the new log_buffer_size option
-
- 11 3月, 2011 1 次提交
-
-
由 Guido Günther 提交于
-
- 09 3月, 2011 1 次提交
-
-
由 Guido Günther 提交于
otherwise the user might not have enough permissions to access the socket if root's umask is 077. http://bugs.debian.org/614210
-
- 07 3月, 2011 3 次提交
-
-
由 Daniel P. Berrange 提交于
Not all applications have an existing event loop they need to integrate with. Forcing them to implement the libvirt event loop integration APIs is an undue burden. This just exposes our simple poll() based implementation for apps to use. So instead of calling virEventRegister(....callbacks...) The app would call virEventRegisterDefaultImpl() And then have a thread somewhere calling static bool quit = false; .... while (!quit) virEventRunDefaultImpl() * daemon/libvirtd.c, tools/console.c, tools/virsh.c: Convert to public event loop APIs * include/libvirt/libvirt.h.in, src/libvirt_private.syms: Add virEventRegisterDefaultImpl and virEventRunDefaultImpl * src/util/event.c: Implement virEventRegisterDefaultImpl and virEventRunDefaultImpl using poll() event loop * src/util/event_poll.c: Add full error reporting * src/util/virterror.c, include/libvirt/virterror.h: Add VIR_FROM_EVENTS
-
由 Daniel P. Berrange 提交于
The event loop implementation is used by more than just the daemon, so move it into the shared area. * daemon/event.c, src/util/event_poll.c: Renamed * daemon/event.h, src/util/event_poll.h: Renamed * tools/Makefile.am, tools/console.c, tools/virsh.c: Update to use new virEventPoll APIs * daemon/mdns.c, daemon/mdns.c, daemon/Makefile.am: Update to use new virEventPoll APIs
-
由 Daniel P. Berrange 提交于
The daemon code calls virEventAddHandleImpl directly instead of calling the wrapper virEventAddHandle. * tools/console.c, daemon/libvirtd.c, daemon/mdns.c: Convert to use primary event APIs
-
- 04 3月, 2011 1 次提交
-
-
由 Daniel Veillard 提交于
In case of imminent crash or upon request (signal USR2), dump the logging buffer to the libvirtd.log file for post-mortem analysis * daemon/libvirtd.c: create a sig_fatal() handler connected to SIGFPE SIGSEGV SIGILL SIGABRT SIGBUS and SIGUSR2, just dumping the log buffer using virLogEmergencyDumpAll
-