- 03 5月, 2016 2 次提交
-
-
由 Nikolay Shirokovskiy 提交于
Daemon config parameter switch between reading host uuid either from smbios or machine-id: host_uuid_source = "smbios|machine-id" Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
-
由 Erik Skultety 提交于
Admin API needs a way of addressing specific clients. Unlike servers, which we are happy to address by names both because its name reflects its purpose (to some extent) and we only have two of them (so far), naming clients doesn't make any sense, since a) each client is an anonymous, i.e. not recognized after a disconnect followed by a reconnect, b) we can't predict what kind of requests it's going to send to daemon, and c) the are loads of them comming and going, so the only viable option is to use an ID which is of a reasonably wide data type. Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
- 15 4月, 2016 1 次提交
-
-
由 Cole Robinson 提交于
Take setlocale/gettext error handling pattern from tools/virsh-* and use it for all standalone binaries via a new shared virGettextInitialize routine. The virsh* pattern differed slightly from other callers. All users now consistently: * Ignore setlocale errors. virsh has done this forever, presumably for good reason. This has been partially responsible for some bug reports: https://bugzilla.redhat.com/show_bug.cgi?id=1312688 https://bugzilla.redhat.com/show_bug.cgi?id=1026514 https://bugzilla.redhat.com/show_bug.cgi?id=1016158 * Report the failed function name * Report strerror
-
- 13 4月, 2016 1 次提交
-
-
由 Maxim Nestratov 提交于
Make it possible to build vz driver as a module and don't link it with libvirt.so statically. Remove registering it on client's side as far as we start relying on daemon Signed-off-by: NMaxim Nestratov <mnestratov@virtuozzo.com>
-
- 11 3月, 2016 2 次提交
-
-
由 Martin Kletzander 提交于
Since servers know their name, there is no need to supply such information twice. Also defeats inconsistencies. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
At first I did not want to do this, but after trying to implement some newer feaures in the admin API I realized we need that to make our lives easier. On the other hand they are not saved redundantly and the virNetServer objects are still kept in a hash table. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 17 2月, 2016 2 次提交
-
-
由 Erik Skultety 提交于
This change is merely because admin_server would contain all the code from dispatchers and helpers to the actual APIs. Admin should have similar structure to the daemon-side remote driver - dispatchers and helpers in a separate module, APIs in a separate module. Best viewed with -M. Signed-off-by: NErik Skultety <eskultet@redhat.com> Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Erik Skultety 提交于
Since the daemon can manage and add (at fresh start) multiple servers, we also should be able to add them from a JSON state file in case of a daemon restart, so post exec restart support for multiple servers is also provided. Patch also updates virnetdaemontest accordingly. Signed-off-by: NErik Skultety <eskultet@redhat.com> Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 10 8月, 2015 1 次提交
-
-
由 Martin Kletzander 提交于
Since its introduction in 2011 (particularly in commit f4324e32), the option doesn't work. It just effectively disables all incoming connections. That's because the client private data that contain the 'keepalive_supported' boolean, are initialized to zeroes so the bool is false and the only other place where the bool is used is when checking whether the client supports keepalive. Thus, according to the server, no client supports keepalive. Removing this instead of fixing it is better because a) apparently nobody ever tried it since 2011 (4 years without one month) and b) we cannot know whether the client supports keepalive until we get a ping or pong keepalive packet. And that won't happen until after we dispatched the ConnectOpen call. Another two reasons would be c) the keepalive_required was tracked on the server level, but keepalive_supported was in private data of the client as well as the check that was made in the remote layer, thus making all other instances of virNetServer miss this feature unless they all implemented it for themselves and d) we can always add it back in case there is a request and a use-case for it. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 15 7月, 2015 1 次提交
-
-
由 Michal Privoznik 提交于
s/priviledged/privileged/ Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 28 6月, 2015 1 次提交
-
-
由 Martin Kletzander 提交于
Don't listen on the admin socket in the daemon and comment out the admin devel files out of specfile. Library is still being compiled and installed in order to link easily without any disturbing modifications to the daemon code. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 19 6月, 2015 1 次提交
-
-
由 Michal Privoznik 提交于
When setting up the daemon networking, new services are created. These services then have sockets to listen on. Once created, the service objects are added to corresponding server object. However, during that process, server increases reference counter of the service object. So, at the end of the function, we should decrease it again. This way the service objects will have only 1 reference, but that's okay since servers are the only objects having a reference. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 18 6月, 2015 1 次提交
-
-
由 Peter Krempa 提交于
If the admin service is disabled it would not be allocated, but the NULL pointer still would be added to the admin server. Since virNetServerAddService would dereference it, the daemon would crash. Move the service registration into the block that allocates it.
-
- 16 6月, 2015 2 次提交
-
-
由 Martin Kletzander 提交于
For this to pe properly separated from other protocols used by the server, there is second server added which allows access to the whole virNetDaemon to its clients. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
This allows to have more servers in one daemon which helps isolating some resources. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 11 6月, 2015 1 次提交
-
-
由 Daniel P. Berrange 提交于
By default, getaddrinfo() will return addresses for both IPv4 and IPv6 if both protocols are enabled, and so the RPC code will listen/connect to both protocols too. There may be cases where it is desirable to restrict this to just one of the two protocols, so add an 'int family' parameter to all the TCP related APIs. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 12 5月, 2015 1 次提交
-
-
由 Peter Krempa 提交于
Similarly to other error codes that notify the user that the object does not exist lower the priority of VIR_ERR_NO_DOMAIN_METADATA to VIR_LOG_DEBUG when writing the log entry.
-
- 02 4月, 2015 2 次提交
-
-
由 Ján Tomko 提交于
In the order of appearance: * MAX_LISTEN - never used added by 23ad665c (qemud) and addec57 (lock daemon) * NEXT_FREE_CLASS_ID - never used, added by 07d1b6b5 * virLockError - never used, added by eb8268a4 * OPENVZ_MAX_ARG, CMDBUF_LEN, CMDOP_LEN unused since the removal of ADD_ARG_LIT in d8b31306 * QEMU_NB_PER_CPU_STAT_PARAM - unused since 897808e7 * QEMU_CMD_PROMPT, QEMU_PASSWD_PROMPT - unused since 1dc10a7b * TEST_MODEL_WORDSIZE - unused since c25c18f7 * TEMPDIR - never used, added by 714bef5b * NSIG - workaround around old headers added by commit 60ed1d2a unused since virExec was moved by commit 02e86910 * DO_TEST_PARSE - never used, added by 9afa0060 * DIFF_MSEC, GETTIMEOFDAY - unused since eee6eb66
- 19 2月, 2015 1 次提交
-
-
由 Pavel Hrdina 提交于
Libvirt could crash with segfault if user issue "service reload" right after "service start". One possible way to crash libvirt is to run reload during initialization of QEMU driver. It could happen when qemu driver will initialize qemu_driver_lock but don't have a time to set it's "config" and the SIGHUP arrives. The reload handler tries to get qemu_drv->config during "virStorageAutostart" and dereference it which ends with segfault. Let's ignore all reload requests until all drivers are initialized. In addition set driversInitialized before we enter virStateCleanup to ignore reload request while we are shutting down. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1179981Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
- 27 1月, 2015 2 次提交
-
-
由 Ján Tomko 提交于
libvirtd.c: In function 'daemonSetupAccessManager': libvirtd.c:730:18: error: declaration of 'driver' shadows a global declaration [-Werror=shadow] const char **driver = (const char **)config->access_drivers; ^ In file included from libvirtd.c:95:0: ../src/node_device/node_device_driver.h:43:36: error: shadowed declaration is here [-Werror=shadow] extern virNodeDeviceDriverStatePtr driver; ^
-
由 Daniel P. Berrange 提交于
For stateless, client side drivers, it is never correct to probe for secondary drivers. It is only ever appropriate to use the secondary driver that is associated with the hypervisor in question. As a result the ESX & HyperV drivers have both been forced to do hacks where they register no-op drivers for the ones they don't implement. For stateful, server side drivers, we always just want to use the same built-in shared driver. The exception is virtualbox which is really a stateless driver and so wants to use its own server side secondary drivers. To deal with this virtualbox has to be built as 3 separate loadable modules to allow registration to work in the right order. This can all be simplified by introducing a new struct recording the precise set of secondary drivers each hypervisor driver wants struct _virConnectDriver { virHypervisorDriverPtr hypervisorDriver; virInterfaceDriverPtr interfaceDriver; virNetworkDriverPtr networkDriver; virNodeDeviceDriverPtr nodeDeviceDriver; virNWFilterDriverPtr nwfilterDriver; virSecretDriverPtr secretDriver; virStorageDriverPtr storageDriver; }; Instead of registering the hypervisor driver, we now just register a virConnectDriver instead. This allows us to remove all probing of secondary drivers. Once we have chosen the primary driver, we immediately know the correct secondary drivers to use. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 15 11月, 2014 1 次提交
-
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 29 10月, 2014 1 次提交
-
-
由 Eric Blake 提交于
We weren't ever using the value for anything other than being non-zero. * src/util/viraudit.h (virAuditLog): Change signature. * src/util/viraudit.c (virAuditLog): Update user. * daemon/libvirtd.c (main): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 15 9月, 2014 2 次提交
-
-
由 John Ferlan 提交于
Coverity complains that the comparison: if (nfds && nfds > ((int)!!sock_path + (int)!!sock_path_ro)) could mean 'sock_path' is NULL. Later in virNetSocketNewListenUNIX there's a direct dereference of path in the error path: if (path[0] != '@') A bit of sleuthing proves that upon entry to daemonSetupNetworking there is no way for 'sock_path' to be NULL since daemonUnixSocketPaths will set up 'sock_file' (although it may not set up 'sock_file_ro') in all 3 paths. Adjusted code to add ATTRIBUTE_NONNULL(3) on incoming path parameter and then fixup the comparison of nfds to be a comparison against 2 or 1 depending on whether sock_path_ro is NULL or not.
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 12 9月, 2014 1 次提交
-
-
由 John Ferlan 提交于
With eblake's help - adjust the checks for stdinfd/stdoutfd to ensure the values are within the range we expect; otherwise the dup2()'s and subsequent VIR_CLOSE() calls cause Coverity to believe there's a resource leak. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
- 27 8月, 2014 1 次提交
-
-
由 Michal Privoznik 提交于
Since times when vbox moved to the daemon (due to some licensing issue) the subdrivers that vbox implements were registered, but not opened since our generic subdrivers took priority. I've tried to fix this in 65b7d553 but it was not correct. Apparently moving vbox driver registration upfront changes the default connection URI which makes some users sad. So, this commit breaks vbox into pieces and register vbox's network and storage drivers first, and vbox driver then at the end. This way, the vbox driver is registered in the order it always was, but its subdrivers are registered prior the generic ones. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 25 8月, 2014 1 次提交
-
-
由 Zhou Yimin 提交于
Introduce by 63fbcc69. When start libvirtd with commandline "/usr/sbin/libvirtd -d -l -v", we expect verbose(info level) log if neither environment variable nor config file about logging controls is set. But in fact we can't get any info priority log in the default output file. The log priority of default output is VIR_LOG_DEFAULT(VIR_LOG_WARN), so the info log is filtered out. To record info priority log we must parse option -v before setting the default output. After this patch, we get all verbose log in the default output file. Signed-off-by: NZhou Yimin <zhouyimin@huawei.com>
-
- 22 8月, 2014 1 次提交
-
-
由 Martin Kletzander 提交于
First FD is the RW unix socket to listen on, second one (if applicable) is the RO unix socket. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 18 8月, 2014 1 次提交
-
-
由 Michal Privoznik 提交于
There are some stateless drivers which implement subdrivers (typically vbox and its own network and storage subdrivers). However, as of ba5f3c7c the vbox driver lives in the daemon, not the client library. This means, in order for vbox (or any stateless domain driver) to use its subdrivers, it must register before the general drivers. Later, when the virConnectOpen function goes through the subdrivers, stateless drivers are searched first. If the connection request is aiming at stateless driver, it will be opened. Otherwise the generic subdriver is opened. The other change done in this commit is moving interface module load a bit earlier to match the ordering in case libvirt is built without driver modules. Reported-by: NTaowei Luo <uaedante@gmail.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 13 8月, 2014 1 次提交
-
-
由 Peter Krempa 提交于
Libvirt is really chatty when the DEBUG log level is enabled. When a host uses journald we'd enable debug logging to journald when only specifying the debug log level. As journald may employ rate throttling this would lock up the daemon until it's able to flush all debug messages. This patch changes the default log level to VIR_LOG_INFO when using the default (unconfigured) log output to journald. To still allow debug logging to journald the user now has to explicitly specify journald as a log output with priority 1 in the "log_outputs" configuration option. This patch also changes the config file template to be explicit about this change and notify the user about the possible consequence of debug logging into journald. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1121955
-
- 07 8月, 2014 1 次提交
-
-
由 Wang Rui 提交于
Signed-off-by: NWang Rui <moon.wangrui@huawei.com>
-
- 25 4月, 2014 4 次提交
-
-
由 Daniel P. Berrange 提交于
Replace use of cpuMapOverride with virFileFindResource to locate CPU map from build dir. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Replace virDriverModuleInitialize with virFileFindResource usage. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Replace virLockManagerSetPluginDir with virFileFindResource usage. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Add calls to virFileActivateDirOverride so that the build dir overrides are activated. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 04 4月, 2014 1 次提交
-
-
由 Nehal J Wani 提交于
Fixes leak introduced by e562e82f ==4937== 64 bytes in 1 blocks are definitely lost in loss record 270 of 405 ==4937== at 0x4A06BE0: realloc (vg_replace_malloc.c:662) ==4937== by 0x6FA41C4: __vasprintf_chk (vasprintf_chk.c:90) ==4937== by 0x50C8D29: virVasprintfInternal (stdio2.h:199) ==4937== by 0x50C8E3A: virAsprintfInternal (virstring.c:362) ==4937== by 0x11D01A: main (libvirtd.c:1170) Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
- 25 3月, 2014 1 次提交
-
-
由 Ján Tomko 提交于
-
- 18 3月, 2014 1 次提交
-
-
由 Daniel P. Berrange 提交于
A earlier commit changed the global log buffer so that it only records messages that are explicitly requested via the log filters setting. This removes the performance burden, and improves the signal/noise ratio for messages in the global buffer. At the same time though, it is somewhat pointless, since all the recorded log messages are already going to be sent to an explicit log output like syslog, stderr or the journal. The global log buffer is thus just duplicating this data on stderr upon crash. The log_buffer_size config parameter is left in the augeas lens to prevent breakage for users on upgrade. It is however completely ignored hereafter. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-