- 10 9月, 2019 1 次提交
-
-
由 Michal Privoznik 提交于
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
-
- 27 8月, 2019 1 次提交
-
-
由 Daniel P. Berrangé 提交于
All code using LOCALSTATEDIR "/run" is updated to use RUNSTATEDIR instead. The exception is the remote driver client which still uses LOCALSTATEDIR "/run". The client needs to connect to remote machines which may not be using /run, so /var/run is more portable due to the /var/run -> /run symlink. Some duplicate paths in the apparmor code are also purged. There's no functional change by default yet since both expressions expand to the same value. Reviewed-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 10 4月, 2019 2 次提交
-
-
由 Peter Krempa 提交于
This reverts commit a5e16020. Getting rid of unistd.h from our headers will require more work than just fixing the broken mingw build. Revert it until I have a more complete proposal. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Peter Krempa 提交于
util/virutil.h bogously included unistd.h. Drop it and replace it by including it directly where needed. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 14 3月, 2019 1 次提交
-
-
由 Andrea Bolognani 提交于
According to the official documentation for autoconf[1], the correct names for these variables are abs_top_{src,build}dir rather than abs_top{src,build}dir; in fact, we're already using the correct names in various places, so let's just make everything nice and consistent. [1] https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Preset-Output-Variables.htmlSigned-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 01 2月, 2019 1 次提交
-
-
由 John Ferlan 提交于
Alter the code to use the virStorageFileGetSCSIKey helper to fetch the unique key for the SCSI disk. Alter the logic to follow the former code which would return a duplicate of @dev when either the virCommandRun succeeded, but returned an empty string or when WITH_UDEV was not true. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> ACKed-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 16 11月, 2018 6 次提交
-
-
由 Michal Privoznik 提交于
This reverts commit 21c34b86. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
This reverts commit 22baf6e0. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
This reverts commit aaf34cb9. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
This reverts commit 997283b5. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
This reverts commit 385eb839. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
This reverts commit 35b5b244. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 18 9月, 2018 6 次提交
-
-
由 Michal Privoznik 提交于
In some cases we might want to not load the lock driver config. Alter virLockManagerPluginNew() and the lock drivers to cope with this fact. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
Soon there will be a virtlockd client that wants to either lock all the resources or none (in order to avoid virtlockd killing the client on connection close). Because on the RPC layer we can only acquire one resource at a time, we have to perform a rollback once we hit a resource that can't be acquired. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
This is a new type of object that lock drivers can handle. Currently, it is supported by lockd driver only. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
The fact whether domain has or doesn't have RW disks is specific to VIR_LOCK_MANAGER_OBJECT_TYPE_DOMAIN and therefore should reside in union specific to it. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
We will want virtlockd to lock files on behalf of libvirtd and not qemu process, because it is libvirtd that needs an exclusive access not qemu. This requires new lock context. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
This flag causes virtlockd to use different offset when locking the file. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 05 9月, 2018 4 次提交
-
-
由 Michal Privoznik 提交于
This will help in future expansions of the code when it is be harder to track if @newName and/or @newLockspace were already allocated or not and thus whether it is safe to 'return' or we need to 'goto error'. By using the 'cleanup' label those two cases merge into a single one. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
If drvNew callback fails, nobody calls drvFree and thus private data of the driver might leak. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
The if() is completely useless since args.path is set to NULL in the line just above. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
On daemon deinit only fileLockSpaceDir is freed. The other two (scsiLockSpaceDir and lvmLockSpaceDir) are missing even though they are allocated in virLockManagerLockDaemonLoadConfig(). Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 06 6月, 2018 1 次提交
-
-
由 ramyelkest 提交于
Replace instances where we previously called virGetLastError just to either get the code or to check if an error exists with virGetLastErrorCode to avoid a validity pre-check. Signed-off-by: NRamy Elkest <ramyelkest@gmail.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
- 25 9月, 2017 1 次提交
-
-
由 Daniel P. Berrange 提交于
Seeing a log message saying 'flags=93' is ambiguous & confusing unless you happen to know that libvirt always prints flags as hex. Change our debug messages so that they always add a '0x' prefix when printing flags, and '0' prefix when printing mode. A few other misc places gain a '0x' prefix in error messages too. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 12 7月, 2016 1 次提交
-
-
由 Daniel P. Berrange 提交于
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 18 1月, 2016 1 次提交
-
-
由 Martin Kletzander 提交于
When building with gcc-5 (particularly gcc-5.3.0 now) and having pdwtags installed (package dwarves) make check fails with the following error: $ make lock_protocol-struct GEN lock_protocol-struct --- lock_protocol-structs 2016-01-13 15:04:59.318809607 +0100 +++ lock_protocol-struct-t3 2016-01-13 15:05:17.703501234 +0100 @@ -26,10 +26,6 @@ virLockSpaceProtocolNonNullString name; u_int flags; }; -enum virLockSpaceProtocolAcquireResourceFlags { - VIR_LOCK_SPACE_PROTOCOL_ACQUIRE_RESOURCE_SHARED = 1, - VIR_LOCK_SPACE_PROTOCOL_ACQUIRE_RESOURCE_AUTOCREATE = 2, -}; struct virLockSpaceProtocolAcquireResourceArgs { virLockSpaceProtocolNonNullString path; virLockSpaceProtocolNonNullString name; Makefile:10415: recipe for target 'lock_protocol-struct' failed make: *** [lock_protocol-struct] Error 1 That happens because without any specific options gcc doesn't keep enum information in the resulting binary object. I managed to isolate the parameters of gcc that caused this issue to disappear, however I remember that they influenced the resulting binaries quite a bit and were definitely not something we would want to add as mandatory to the build process. So to deal with this cleanly, let's take that enum and separate it out to its own header file. Since it is only used in the lockd driver and the protocol, lock_driver_lockd.h feels like a suitable name. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 26 11月, 2015 1 次提交
-
-
由 Daniel P. Berrange 提交于
Fix memory leaks, failure to restore umask and missing man page docs. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 23 4月, 2015 1 次提交
-
-
由 Jim Fehlig 提交于
Some hypervisors like Xen do not have PIDs associated with domains. Relax the requirement for PID != 0 in the locking code so it can be used by hypervisors that do not represent domains as a process running on the host. Signed-off-by: NJim Fehlig <jfehlig@suse.com>
-
- 02 4月, 2015 1 次提交
-
-
由 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
-
- 09 3月, 2015 2 次提交
-
-
由 Jiri Denemark 提交于
Commit v1.2.4-52-gda879e59 fixed issues with domains started before sanlock driver was enabled by checking whether a running domain is registered with sanlock and if it's not, sanlock driver is basically ignored for the domain. However, it was checking this even for domain which has just been started and no sanlock_* API was called for them yet. This results in cmd 9 target pid 2135544 not found error messages to appear in sanlock.log whenever we start a new domain. This patch avoids this useless check for freshly started domains. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
virLockManager*New APIs are never called with VIR_LOCK_MANAGER_USES_STATE. Moreover, lockd driver does not maintain any state that would need to be transferred during migration and thus it should not mention VIR_LOCK_MANAGER_USES_STATE at all. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 19 2月, 2015 1 次提交
-
-
由 Jiri Denemark 提交于
Not all files we want to find using virFileFindResource{,Full} are generated when libvirt is built, some of them (such as RNG schemas) are distributed with sources. The current API was not able to find source files if libvirt was built in VPATH. Both RNG schemas and cpu_map.xml are distributed in source tarball. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 15 12月, 2014 1 次提交
-
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1160995 In our config files users are expected to pass several integer values for different configuration knobs. However, majority of them expect a nonnegative number and only a few of them accept a negative number too (notably keepalive_interval in libvirtd.conf). Therefore, a new type to config value is introduced: VIR_CONF_ULONG that is set whenever an integer is positive or zero. With this approach knobs accepting VIR_CONF_LONG should accept VIR_CONF_ULONG too. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 29 10月, 2014 1 次提交
-
-
由 Eric Blake 提交于
C guarantees that static variables are zero-initialized. Some older compilers (and also gcc -fno-zero-initialized-in-bss) create larger binaries if you explicitly zero-initialize a static variable. * src/conf/nwfilter_conf.c: Fix initialization. * src/cpu/cpu_x86.c: Likewise. * src/interface/interface_backend_netcf.c: Likewise. * src/locking/lock_daemon.c: Likewise. * src/locking/lock_driver_lockd.c: Likewise. * src/locking/lock_driver_sanlock.c: Likewise. * src/network/bridge_driver.c: Likewise. * src/node_device/node_device_udev.c: Likewise. * src/nwfilter/nwfilter_learnipaddr.c: Likewise. * src/rpc/virnetserver.c: Likewise. * src/security/security_selinux.c (virSecuritySELinuxGenSecurityLabel): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 22 8月, 2014 1 次提交
-
-
由 Michal Privoznik 提交于
On some places in the libvirt code we have: f(a,z) instead of f(a, z) This trivial patch fixes couple of such occurrences. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 16 7月, 2014 1 次提交
-
-
由 Michal Privoznik 提交于
In many places we define a variable as a 'const char *' when in fact we modify it just a few lines below. Or even free it. We should not do that. There's one exception though, in xenSessionFree() xenapi_utils.c. We are freeing the xen_session structure which is defined in xen/api/xen_common.h public header. The structure contains session_id which is type of 'const char *' when in fact it should have been just 'char *'. So I'm leaving this unmodified, just noticing the fact in comment. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 07 7月, 2014 1 次提交
-
-
由 Ján Tomko 提交于
Commits e18a80a3 and 57e5c3c2 switched from a getenv wrapper which does not allocate a string to virFileFindResource which does not, without freeing it. https://bugzilla.redhat.com/show_bug.cgi?id=1116427
-
- 28 4月, 2014 1 次提交
-
-
由 Daniel P. Berrange 提交于
Make the lock plugin use virFileFindResource to find the virtlockd daemon path, so that it executes the in-builddir daemon if run from source tree. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 25 3月, 2014 1 次提交
-
-
由 Ján Tomko 提交于
-
- 18 3月, 2014 1 次提交
-
-
由 Daniel P. Berrange 提交于
Any source file which calls the logging APIs now needs to have a VIR_LOG_INIT("source.name") declaration at the start of the file. This provides a static variable of the virLogSource type. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-