- 04 2月, 2019 1 次提交
-
-
由 Cole Robinson 提交于
Missing semicolon at the end of macros can confuse some analyzers (like cppcheck <filename>), and we have a mix of semicolon and non-semicolon usage through the code. Let's standardize on using a semicolon for VIR_ENUM_DECL calls. Drop the semicolon from the final statement of the macro, so the compiler will require callers to add a semicolon. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
- 18 12月, 2018 1 次提交
-
-
由 Michal Privoznik 提交于
The driver is unmaintained, untested and severely broken for quite some time now. Since nobody even reported any issue with it let us drop it. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 14 12月, 2018 1 次提交
-
-
由 Daniel P. Berrangé 提交于
In many files there are header comments that contain an Author: statement, supposedly reflecting who originally wrote the code. In a large collaborative project like libvirt, any non-trivial file will have been modified by a large number of different contributors. IOW, the Author: comments are quickly out of date, omitting people who have made significant contribitions. In some places Author: lines have been added despite the person merely being responsible for creating the file by moving existing code out of another file. IOW, the Author: lines give an incorrect record of authorship. With this all in mind, the comments are useless as a means to identify who to talk to about code in a particular file. Contributors will always be better off using 'git log' and 'git blame' if they need to find the author of a particular bit of code. This commit thus deletes all Author: comments from the source and adds a rule to prevent them reappearing. The Copyright headers are similarly misleading and inaccurate, however, we cannot delete these as they have legal meaning, despite being largely inaccurate. In addition only the copyright holder is permitted to change their respective copyright statement. Reviewed-by: NErik Skultety <eskultet@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 20 9月, 2018 1 次提交
-
-
由 Erik Skultety 提交于
All of the ones being removed are pulled in by internal.h. The only exception is sanlock which expects the application to include <stdint.h> before sanlock's headers, because sanlock prototypes use fixed width int, but they don't include stdint.h themselves, so we have to leave that one in place. Signed-off-by: NErik Skultety <eskultet@redhat.com> Acked-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 13 8月, 2018 1 次提交
-
-
由 Ján Tomko 提交于
This reverts commit 3251fc9c. Jansson cannot parse QEMU's quirky JSON. Revert back to yajl. https://bugzilla.redhat.com/show_bug.cgi?id=1614569Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 01 8月, 2018 1 次提交
-
-
由 Peter Krempa 提交于
Explicitly call virJSONInitialize at startup of the libvirt daemon so that we are sure that the symbols in the compat library are properly loaded. This will prevent any random failure from happening later on when the daemon would want to use the JSON parser. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
- 27 6月, 2018 1 次提交
-
-
由 Daniel P. Berrangé 提交于
Remove the callbacks that the nwfilter driver registers with the domain object config layer. Instead make the current helper methods call into the public API for creating/deleting nwfilter bindings. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 05 6月, 2018 1 次提交
-
-
由 Michal Privoznik 提交于
Now that GnuTLS is a requirement, we can drop a lot of conditionally built code. However, not all ifdef-s can go because we still want libvirt_setuid to build without gnutls. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 25 4月, 2018 2 次提交
-
-
由 Daniel P. Berrangé 提交于
The libvirtd daemon currently ignores the return status of virDriverLoadModule entirely. This is way too loose, resulting in many important problems going undiagnosed, resulting in a libvirtd that may never work correctly. We should only ignore a non-existant module, and pass back any fatal errors. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Currently the driver module loading code does not report an error if the driver module is physically missing on disk. This is useful for distro packaging optional pieces. When the daemons are split up into one daemon per driver, we will expect module loading to always succeed. If a driver is not desired, the entire daemon should not be installed. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 24 4月, 2018 1 次提交
-
-
由 Daniel P. Berrangé 提交于
The Xen driver was recently deleted, but libvirtd has left over code that tries to use it. Fortunately this is dead code because WITH_XEN will never be defined anymore. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 23 3月, 2018 1 次提交
-
-
由 Daniel P. Berrangé 提交于
The libvirtd daemon has some arbitrary logic to drop privileges, but only on Solaris platforms. This was added during Xen days, when Xen was the only driver running in libvirtd. There's no expectation or testing that this works with the new libxl stack, nor whether dropping privileges breaks any of the secondary drivers. Finally, we'll be splitting drivers out into their own independant daemons, so this won't be applicable to libvirtd in future anyway. The remote driver client meanwhile arbitrarily disables daemon auto-spawn when connecting as non-root, breaking a key feature of libvirt unprivileged connections. Since we've not had any contributions for Solaris since circa 2012 and we don't do any CI testing we should consider this platform unmaintained and thus reasonable to remove this cruft. If someone steps forward to maintain Solaris again, this code would need re-evaluating to come up with something more targetted. There's various __sun conditionals in the Xen driver code, but those are not touched. This is all for the legacy Xen driver, which will be entirely removed at some point in future, so not benefit to hacking out just the Solaris parts. Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 16 3月, 2018 1 次提交
-
-
由 Marc Hartmayer 提交于
Remove unneeded global variables and convert them into local variables where they're needed. Signed-off-by: NMarc Hartmayer <mhartmay@linux.vnet.ibm.com> Reviewed-by: NBjoern Walk <bwalk@linux.vnet.ibm.com> Reviewed-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 13 3月, 2018 1 次提交
-
-
由 Jim Fehlig 提交于
It is possible to deadlock libvirtd when concurrently starting a domain and restarting the daemon. Threads involved in the deadlock are Thread 4 (Thread 0x7fc13b53e700 (LWP 64084)): /lib64/libpthread.so.0 at util/virthread.c:154 at qemu/qemu_monitor.c:1083 cmd=0x7fc110017700, scm_fd=-1, reply=0x7fc13b53d318) at qemu/qemu_monitor_json.c:305 cmd=0x7fc110017700, reply=0x7fc13b53d318) at qemu/qemu_monitor_json.c:335 at qemu/qemu_monitor_json.c:1298 at qemu/qemu_monitor.c:1697 vm=0x7fc110003d00, asyncJob=QEMU_ASYNC_JOB_START) at qemu/qemu_process.c:1763 vm=0x7fc110003d00, asyncJob=6, logCtxt=0x7fc1100089c0) at qemu/qemu_process.c:1835 vm=0x7fc110003d00, asyncJob=6, logCtxt=0x7fc1100089c0) at qemu/qemu_process.c:2180 driver=0x7fc12004e1e0, vm=0x7fc110003d00, asyncJob=QEMU_ASYNC_JOB_START, incoming=0x0, snapshot=0x0, vmop=VIR_NETDEV_VPORT_PROFILE_OP_CREATE, flags=17) at qemu/qemu_process.c:6111 driver=0x7fc12004e1e0, vm=0x7fc110003d00, updatedCPU=0x0, asyncJob=QEMU_ASYNC_JOB_START, migrateFrom=0x0, migrateFd=-1, migratePath=0x0, snapshot=0x0, vmop=VIR_NETDEV_VPORT_PROFILE_OP_CREATE, flags=17) at qemu/qemu_process.c:6334 xml=0x7fc110000ed0 "<!--\nWARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE\nOVERWRITTEN AND LOST. Changes to this xml configuration should be made using:\n virsh edit testvv\nor other applicati"..., flags=0) at qemu/qemu_driver.c:1776 ... Thread 1 (Thread 0x7fc143c66880 (LWP 64081)): /lib64/libpthread.so.0 at util/virthread.c:122 conf/nwfilter_conf.c:159 sig=0x7ffe0a831e30, opaque=0x0) at remote/remote_daemon.c:724 opaque=0x558c5328b230) at rpc/virnetdaemon.c:654 at util/vireventpoll.c:508 rpc/virnetdaemon.c:858 remote/remote_daemon.c:1496 (gdb) thr 1 [Switching to thread 1 (Thread 0x7fc143c66880 (LWP 64081))] /lib64/libpthread.so.0 (gdb) f 1 at util/virthread.c:122 122 pthread_rwlock_wrlock(&m->lock); (gdb) p updateLock $1 = {lock = {__data = {__lock = 0, __nr_readers = 1, __readers_wakeup = 0, __writer_wakeup = 0, __nr_readers_queued = 0, __nr_writers_queued = 1, __writer = 0, __shared = 0, __rwelision = 0 '\000', __pad1 = "\000\000\000\000\000\000", __pad2 = 0, __flags = 0}, __size = "\000\000\000\000\001", '\000' <repeats 15 times>, "\001", '\000' <repeats 34 times>, __align = 4294967296}} Reloading of the nwfilter driver is stuck waiting for a write lock, which already has a reader (from qemuDomainCreateXML) in the critical section. Since the reload occurs in the context of the main event loop thread, libvirtd becomes deadlocked. The deadlock can be avoided by offloading the reload work to a thread. Signed-off-by: NJim Fehlig <jfehlig@suse.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 22 2月, 2018 1 次提交
-
-
由 Daniel P. Berrangé 提交于
Having a daemon/ directory makes little sense from a code structure point of view, as 90% of the code that is built into libvirtd already lives in the src/ directory. The virtlockd and virlogd daemons also live entirely in src/{locking,logging} directories. This moves the source code for libvirtd into src/remote/, alongside the client code. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 31 1月, 2018 2 次提交
-
-
由 Daniel P. Berrange 提交于
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The admin server functionality is a generic concept that should be wired up into all libvirt daemons, but is currently integrated with the libvirtd code. Move it all into the src/admin directory to prepare for broader reuse. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 13 12月, 2017 1 次提交
-
-
由 Marc Hartmayer 提交于
Replace the error message during startup of libvirtd with an info message if audit_level < 2 and audit is not supported by the kernel. Audit is not supported by the current kernel if the kernel does not have audit compiled in or if audit is disabled (e.g. by the kernel cmdline). Signed-off-by: NMarc Hartmayer <mhartmay@linux.vnet.ibm.com> Reviewed-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 18 11月, 2017 3 次提交
-
-
由 John Ferlan 提交于
Current cleanup processing is ad-hoc at best - it's led to a couple of strange and hard to diagnose timing problems and crashes. So rather than perform cleanup in a somewhat random order, let's perform cleanup in the exact opposite order of startup. NB: It is possible that virNetlinkEventServerStart fails and we jump to cleanup before driversInitialized has been set. That could leave things inconsistent; however, resolution of that possibility is perhaps more trouble than it's worth to handle. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Let's be sure we can get a Daemon object before the server object. This is a more "orderly" way to do things since the svr object would be added to the dmn object afterwards.
-
由 John Ferlan 提交于
Once we have forked the daemon successfully, let's claim the pidfile immediately rather than waiting for setup of run_dir.
-
- 28 8月, 2017 1 次提交
-
-
由 Erik Skultety 提交于
Commit 94c465d0 refactored the logging setup phase but introduced an issue, where the daemon ignores verbose mode when there are no outputs defined and the default must be used. The problem is that the default output was determined too early, thus ignoring the potential '--verbose' option taking effect. This patch postpones the creation of the default output to the very last moment when nothing else can change. Since the default output is only created during the init phase, it's safe to leave the pointer as NULL for a while, but it will be set eventually, thus not affecting runtime. Patch also adjusts both the other daemons. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1442947Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
- 27 7月, 2017 1 次提交
-
-
由 Peter Krempa 提交于
Driver modules proved to be reliable for a long time. Since support for not building modules complicates the code and makefiles drop it. Reviewed-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 05 7月, 2017 1 次提交
-
-
由 Daniel P. Berrange 提交于
The DBus conditional was renamed way back: commit da77f04e Author: Daniel P. Berrange <berrange@redhat.com> Date: Thu Sep 20 15:05:39 2012 +0100 Convert HAVE_DBUS to WITH_DBUS but the shutdown inhibit code was not updated. Thus libvirt was never inhibiting shutdown by a logged in user when VMs are running. Reviewed-by: NPavel Hrdina <phrdina@redhat.com> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 13 6月, 2017 2 次提交
-
-
由 Michal Privoznik 提交于
Right now, there is a lot of exit points from the function. Depending on their position they need to copy the same free calls. This goes against our style where we usually have just one exit point from the function which also does the necessary free. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Yi Wang 提交于
@rundir, allocated by virGetUserRuntimeDirectory, is leaked in case virFileMakePath fails. Signed-off-by: NXi Xu <xu.xi8@zte.com.cn> Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
- 02 6月, 2017 1 次提交
-
-
由 Peter Krempa 提交于
SASL context would be initialized even if the corresponding TCP or TLS sockets are not enabled. fe772f24 attempted to fix the symptom by commenting out the settings, but that did not fix the root cause. 3c647ee4 later reverted those changes so that the more secure algorithm is used. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1450095
-
- 16 3月, 2017 1 次提交
-
-
由 Daniel P. Berrange 提交于
When providing explicit x509 cert/key paths in libvirtd.conf, the user must provide all three. If one or more is missed, this leads to obscure errors at runtime when negotiating the TLS session Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 21 2月, 2017 1 次提交
-
-
由 Peter Krempa 提交于
Pass the registration function name to virDriverLoadModule so that we can later call specific functions if necessary (e.g. for testing purposes). This gets rid of the rather ugly automatic name generator and unifies the code to load/initialize the modules. It's also clear which registration function gets called.
-
- 09 2月, 2017 1 次提交
-
-
由 Boris Fiuczynski 提交于
Since a successful completion of the calls to openvswitch is expected a longer timeout should be able to be chosen to account for loaded systems. Therefore this patch provides the ability to specify the timeout value for openvswitch calls in the libvirtd configuration file. Signed-off-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com> Reviewed-by: NBjoern Walk <bwalk@linux.vnet.ibm.com>
-
- 15 12月, 2016 2 次提交
-
-
由 Erik Skultety 提交于
Now that virLog{Get,Set}DefaultOutput routines are introduced we can wire them up to the daemon's logging initialization code. Also, change the order of operations a bit so that we still strictly honor our precedence of settings: cmdline > env > config now that outputs and filters are not appended anymore. Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
由 Erik Skultety 提交于
Along with an empty string, it should also be possible for users to pass NULL to the public APIs which in turn would trigger a routine(future work) responsible for defining an appropriate default logging output given the current circumstances. Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
- 28 10月, 2016 1 次提交
-
-
由 Nikolay Shirokovskiy 提交于
Do not dereference the 'dmn' until after the virStateCleanup is completed. During initialization, virStateInitialize requires/uses the "dmn" as the argument to/for the daemonInhibitCallback functions. Thus, cleanup cannot dereference 'dmn' until after calling the virStateCleanup which calls the the daemonInhibitCallback using 'dmn'; otherwise, the following crash occurs: backtrace (shortened a bit) 1 0x00007fd3a791b2e6 in virCondWait (c=<optimized out>, m=<optimized out>) at util/virthread.c:154 2 0x00007fd3a791bcb0 in virThreadPoolFree (pool=0x7fd38024ee00) at util/virthreadpool.c:266 3 0x00007fd38edaa00e in qemuStateCleanup () at qemu/qemu_driver.c:1116 4 0x00007fd3a79abfeb in virStateCleanup () at libvirt.c:808 5 0x00007fd3a85f2c9e in main (argc=<optimized out>, argv=<optimized out>) at libvirtd.c:1660 Thread 1 (Thread 0x7fd38722d700 (LWP 32256)): 0 0x00007fd3a7900910 in virClassIsDerivedFrom (klass=0xdfd36058d4853, parent=0x7fd3a8f394d0) at util/virobject.c:169 1 0x00007fd3a7900c4e in virObjectIsClass (anyobj=anyobj@entry=0x7fd3a8f2f850, klass=<optimized out>) at util/virobject.c:365 2 0x00007fd3a7900c74 in virObjectLock (anyobj=0x7fd3a8f2f850) at util/virobject.c:317 3 0x00007fd3a7a24d5d in virNetDaemonRemoveShutdownInhibition (dmn=0x7fd3a8f2f850) at rpc/virnetdaemon.c:547 4 0x00007fd38ed722cf in qemuProcessStop (driver=driver@entry=0x7fd380103810, vm=vm@entry=0x7fd38025b6d0, reason=reason@entry=VIR_DOMAIN_SHUTOFF_SHUTDOWN, asyncJob=asyncJob@entry=QEMU_ASYNC_JOB_NONE, flags=flags@entry=0) at qemu/qemu_process.c:5786 5 0x00007fd38edd9428 in processMonitorEOFEvent (vm=0x7fd38025b6d0, driver=0x7fd380103810) at qemu/qemu_driver.c:4588 6 qemuProcessEventHandler (data=<optimized out>, opaque=0x7fd380103810) at qemu/qemu_driver.c:4632 7 0x00007fd3a791bb55 in virThreadPoolWorker (opaque=opaque@entry=0x7fd3a8f1e4c0) at util/virthreadpool.c:145
-
- 10 10月, 2016 3 次提交
-
-
由 Erik Skultety 提交于
Similar to outputs, parser should do parsing only, thus the 'define' logic is going to be stripped from virLogParseAndDefineFilters by replacing calls to this method to virLogSetFilters instead. Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
由 Erik Skultety 提交于
Since virLogParseAndDefineOutputs is going to be stripped from 'output defining' logic, replace all relevant occurrences with virLogSetOutputs call to make the change transparent to all original callers (daemons mostly). Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
由 Erik Skultety 提交于
Right now virLogParse* functions are doing both parsing and defining of filters and outputs which should be two separate operations. Since the naming is apparently a bit poor this patch renames these functions to virLogParseAndDefine* which eventually will be replaced by virLogSet*. Additionally, virLogParse{Filter,Output} will be later (after the split) reused, so that these functions do exactly what the their name suggests. Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
- 26 6月, 2016 1 次提交
-
-
由 Erik Skultety 提交于
This patch enables admin socket creation in daemon's code, bumps the library version in libvirt_admin_public.syms, and performs all necessary modifications to our makefiles so that admin API can finally be included in the tarball, and eventually become part of an rpm package (a patch later in this series). Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
- 08 6月, 2016 2 次提交
-
-
由 Daniel P. Berrange 提交于
Add a "tls_priority" config option to /etc/libvirt/libvirtd.conf to allow the administrator to override the built-in default setting. This only affects the server side configuration. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Extend the virNetTLSContextNew* constructors to allow the TLS priority string to be passed in, overriding the compile time default. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 20 5月, 2016 1 次提交
-
-
由 Jovanka Gulicoska 提交于
Convert to virGetLastErrorMessage() in the rest of the code
-