- 12 1月, 2017 1 次提交
-
-
由 Michal Privoznik 提交于
Other drivers (like qemu) would like to know if the namespaces are available therefore it makes sense to move this function to a shared module. At the same time, this function had some default namespaces that are checked with every call. It is not necessary - let callers pass just those namespaces they are interested in. With the move the function is renamed to virProcessNamespaceAvailable. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 09 1月, 2017 2 次提交
-
-
由 Daniel P. Berrange 提交于
When changing the metadata via virDomainSetMetadata, we now emit an event to notify the app of changes. This is useful when co-ordinating different applications read/write of custom metadata. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Currently when spawning containers with systemd, the container PID 1 will get moved into the systemd machine slice. Libvirt then manually moves the libvirt_lxc and qemu-nbd processes into the cgroups associated with the slice, but skips the systemd controller cgroup. This means that from systemd's POV, libvirt_lxc and qemu-nbd are still part of the libvirtd.service unit. On systemctl daemon-reload, it will notice that libvirt_lxc & qemu-nbd are in the libvirtd.service unit for the systemd controller, but in the machine cgroups for resources. Systemd will thus move them back into the libvirtd.service resource cgroups next time libvirtd is restarted. This causes libvirtd to kill off the container due to incorrect cgroup placement. The solution is to ensure that when moving libvirt_lxc & qemu-nbd, we also move the systemd cgroup controller placement. Normally this is not something we ever want todo, but this is a special case as we are intentionally wanting to move them to a different systemd unit. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 15 12月, 2016 2 次提交
-
-
由 Michal Privoznik 提交于
This part of code that LXC currently uses will be reused so move to a generic function. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
This part of code that LXC currently uses will be reused so move to a generic function. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 09 12月, 2016 2 次提交
-
-
由 Mehdi Abaakouk 提交于
This is just a code move of virstat.c to virnetdevtap.c
-
由 Mehdi Abaakouk 提交于
In preparation to the code move to virnetdevtap.c, this change: * renames virNetInterfaceStats to virNetDevTapInterfaceStats * changes 'path' to 'ifname', to use the same vocable as other method in virnetdevtap.c. * Add the attributes checker
-
- 08 12月, 2016 1 次提交
-
-
由 Cédric Bosdonnat 提交于
If the monitor doesn't hold a reference to the domain object the object may be destroyed before the monitor actually stops.
-
- 25 11月, 2016 1 次提交
-
-
由 Michal Privoznik 提交于
We have couple of functions that operate over NULL terminated lits of strings. However, our naming sucks: virStringJoin virStringFreeList virStringFreeListCount virStringArrayHasString virStringGetFirstWithPrefix We can do better: virStringListJoin virStringListFree virStringListFreeCount virStringListHasString virStringListGetFirstWithPrefix Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 22 11月, 2016 1 次提交
-
-
由 Sławek Kapłoński 提交于
New line character in name of domain is now forbidden because it mess virsh output and can be confusing for users. Validation of name is done in drivers, after parsing XML to avoid problems with dissappeared domains which was already created with new-line char in name. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 10 11月, 2016 1 次提交
-
-
由 Michal Privoznik 提交于
There's one copy paste error where a comment mentions QEMU instead of LXC driver. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 27 10月, 2016 1 次提交
-
-
由 Sławek Kapłoński 提交于
When user tries to resume already running domain (Qemu or LXC) VIR_ERR_OPERATION_INVALID error should be raised with message that domain is already running. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1009008
-
- 22 10月, 2016 1 次提交
-
-
由 John Ferlan 提交于
Change the virDomainChrDef to use a pointer to 'source' and allocate that pointer during virDomainChrDefNew. This has tremendous "fallout" in the rest of the code which mainly has to change source.$field to source->$field. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
- 20 10月, 2016 1 次提交
-
-
由 John Ferlan 提交于
Modeled after the qemuDomainHostdevPrivatePtr (commit id '27726d8c'), create a privateData pointer in the _virDomainChardevDef to allow storage of private data for a hypervisor in order to at least temporarily store secret data for usage during qemuBuildCommandLine. NB: Since the qemu_parse_command (qemuParseCommandLine) code is not expecting to restore the secret data, there's no need to add code code to handle this new structure there. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
- 14 10月, 2016 1 次提交
-
-
由 Michal Privoznik 提交于
This function for some weird reason returns integer instead of virDomainNetType type. It is important to return the correct type so that we know what values we can expect. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 13 10月, 2016 1 次提交
-
-
由 Michal Privoznik 提交于
This initially started as a fix of some debug printing in virCgroupDetect. However it turned out that other places suffer from the similar problem. While dealing with pids, esp. in cases where we cannot use pid_t for ABI stability reasons, we often chose an unsigned integer type. This makes no sense as pid_t is signed. Also, new syntax-check rule is introduced so we won't repeat this mistake. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 12 10月, 2016 1 次提交
-
-
由 Martin Kletzander 提交于
This way we get reference counting and we can get rid of locking function. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 26 9月, 2016 3 次提交
-
-
由 Michal Privoznik 提交于
Just like virDomainDefPostParseCallback has gained new parseOpaque argument, we need to follow the logic with virDomainDeviceDefPostParse. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
We want to pass the proper opaque pointer instead of NULL to virDomainDefParse and subsequently virDomainDefParseNode too. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
Some callers might want to pass yet another pointer to opaque data to post parse callbacks. The driver generic one is not enough because two threads executing post parse callback might want to see different data (e.g. domain object pointer that domain def belongs to). Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 09 9月, 2016 1 次提交
-
-
由 Jiri Denemark 提交于
The code for replacing domain's transient definition with the persistent one is repeated in several places and we'll need to add one more. Let's make a nice helper for it. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 06 9月, 2016 1 次提交
-
-
由 Michal Privoznik 提交于
In the latest glibc, major() and minor() functions are marked as deprecated (glibc commit dbab6577): CC util/libvirt_util_la-vircgroup.lo util/vircgroup.c: In function 'virCgroupGetBlockDevString': util/vircgroup.c:768:5: error: '__major_from_sys_types' is deprecated: In the GNU C Library, `major' is defined by <sys/sysmacros.h>. For historical compatibility, it is currently defined by <sys/types.h> as well, but we plan to remove this soon. To use `major', include <sys/sysmacros.h> directly. If you did not intend to use a system-defined macro `major', you should #undef it after including <sys/types.h>. [-Werror=deprecated-declarations] if (virAsprintf(&ret, "%d:%d ", major(sb.st_rdev), minor(sb.st_rdev)) < 0) ^~ In file included from /usr/include/features.h:397:0, from /usr/include/bits/libc-header-start.h:33, from /usr/include/stdio.h:28, from ../gnulib/lib/stdio.h:43, from util/vircgroup.c:26: /usr/include/sys/sysmacros.h:87:1: note: declared here __SYSMACROS_DEFINE_MAJOR (__SYSMACROS_FST_IMPL_TEMPL) ^ Moreover, in the glibc commit, there's suggestion to keep ordering of including of header files as implemented here. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 17 8月, 2016 1 次提交
-
-
由 Andrea Bolognani 提交于
The first argument should be const char ** instead of char **, because this is a search function and as such it doesn't, and shouldn't, alter the haystack in any way. This change means we no longer have to cast arrays of immutable strings to arrays of mutable strings; we still have to do the opposite, though, but that's reasonable.
-
- 16 8月, 2016 2 次提交
-
-
由 Daniel P. Berrange 提交于
<filesystem type='ram' accessmode='passthrough'> <source usage='524288' units='KiB'/> <target dir='/dev/shm'/> </filesystem> would lead to lxcContainerMountAllFS calling STRPREFIX on a NLL pointer because it failed to check if fs->src->path was non-NULL. This is a regression caused by commit da665fbd Author: Olga Krishtal <okrishtal@virtuozzo.com> Date: Thu Jul 14 16:52:38 2016 +0300 filesystem: adds possibility to use storage pool as fs source Signed-off-by: NOlga Krishtal <okrishtal@virtuozzo.com> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
<filesystem type='ram' accessmode='passthrough'> <source usage='524288' units='KiB'/> <target dir='/dev/shm'/> </filesystem> would lead to lxcContainerResolveSymlinks calling access(NULL) because it failed to check if fs->src->path was non-NULL. This is a regression caused by commit da665fbd Author: Olga Krishtal <okrishtal@virtuozzo.com> Date: Thu Jul 14 16:52:38 2016 +0300 filesystem: adds possibility to use storage pool as fs source Signed-off-by: NOlga Krishtal <okrishtal@virtuozzo.com> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 05 8月, 2016 1 次提交
-
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1363773 Imagine that you're creating a transient domain, but for some reason, starting it fails. That is virLXCProcessStart() returns an error. With current code, in the error handling code the domain object is removed from the domain object list, @vm is set to NULL and controls jump to enjob label where virLXCDomainObjEndJob() is called which dereference vm leading to instant crash. The fix is to end the job in the error handling code and only after that remove the domain from the list and jump onto cleanup label instead of endjob. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 24 7月, 2016 1 次提交
-
-
由 Martin Kletzander 提交于
So commit 306b3a85 tried mimicking behaviour of commit 540c339a, but added a virObjectRef(vm) only after virDomainObjListAdd() in lxcDomainDefineXMLFlags() and not in lxcDomainCreateXMLWithFiles(). That way undefining a domain that was started with different XML than defined will leave the domain object in a state with not enough references to then remove it. Hence any lxcDomainDestroyFlags() called afterwards crashes the daemon. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1351057Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 22 7月, 2016 1 次提交
-
-
由 Katerina Koukiou 提交于
This patch forces container's init process, to become a session leader, that is its session ID is made the same as its process ID. That might seem unnecessary in general, but if we want to checkpoint a container with CRIU, which is needed for container migration, we must ensure that the SID of each process inside the container points to a process that lives in the same PID namespace as the container. Therefore, we force that the session leader is the init. Signed-off-by: NKaterina Koukiou <k.koukiou@gmail.com>
-
- 19 7月, 2016 3 次提交
-
-
由 Cédric Bosdonnat 提交于
Any error happening after the hand shake in the lxc controller will not result in a failure as errors are checked during the handshake. Move the handshake after the last possible error.
-
由 Erik Skultety 提交于
Commit da665fbd introduced the following condition to virLXCProcessEnsureRootFS and openvzReadFSConf: if (!(<some_var> = virDomainFSDefNew()) < 0) which broke the build on fedora with GCC 5.3.1: "logical not is only applied to the left hand side of comparison". Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
由 Olga Krishtal 提交于
Signed-off-by: NOlga Krishtal <okrishtal@virtuozzo.com>
-
- 12 7月, 2016 1 次提交
-
-
由 Daniel P. Berrange 提交于
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 11 7月, 2016 1 次提交
-
-
由 Peter Krempa 提交于
Allow to store driver specific data on a per-vcpu basis. Move of the virDomainDef*Vcpus* functions was necessary as virDomainXMLOptionPtr was declared below this block and I didn't want to split the function headers.
-
- 07 7月, 2016 2 次提交
-
-
由 Peter Krempa 提交于
Few arguments of the function are not necessary any more which leads to some cleanups. The 'uri' argument had a stray ATTRIBUTE_UNUSED.
-
由 Peter Krempa 提交于
The impls are identical and I don't have a reasonable idea where to extract it. This also kills yet another use of virDomainLiveConfigHelperMethod.
-
- 02 7月, 2016 2 次提交
-
-
由 Laine Stump 提交于
(This patch had been pushed earlier in commit cd5c9f21, but was reverted in commit 1549f168 because it had been accidentally pushed during the freeze for release 2.0.0)
-
由 Laine Stump 提交于
This patch takes the code out of lxcContainerRenameAndEnableInterfaces() that adds all IP addresses and IP routes to the interface, and puts it into a utility function virNetDevIPInfoAddToDev() in virnetdevip.c so that it can be used by anyone. One small change in functionality - lxcContainerRenameAndEnableInterfaces() previously would add all IP addresses to the interface while it was still offline, then set the interface online, and then add the routes. Because I don't want the utility function to set the interface online, I've moved this up so the interface is first set online, then IP addresses and routes are added. This is the same order that the network service from initscripts (in ifup-ether) does it, so it shouldn't pose any problem (and hasn't, in the tests that I've run). (This patch had been pushed earlier in commit f1e0d0da, but was reverted in commit 05eab475 because it had been accidentally pushed during the freeze for release 2.0.0)
-
- 27 6月, 2016 3 次提交
-
-
由 Laine Stump 提交于