- 15 11月, 2018 26 次提交
-
-
由 Julio Faracco 提交于
This is a simple removal of a duplicated check of the return of the filter function. There is a nested conditional checking exactly the same thing since commit c9ede1cf removed the (ret > 0) check condition. Signed-off-by: NJulio Faracco <jcfaracco@gmail.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Julio Faracco 提交于
The function qemuDomainGetHostdevPath() is using VIR_FREE to free the paths stored in tmpPaths. Both syntax analyzer are reporting a warning about this. Replacing the old method to function virStringListFreeCount() fixes the warnings/errors. Signed-off-by: NJulio Faracco <jcfaracco@gmail.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Julio Faracco 提交于
This commit includes new test cases to cover LXC version 3.0 and higher. This LXC version rebased some settings entries and deprecated other ones. As we support both, we should include tests to minimize problems with integration between them. Signed-off-by: NJulio Faracco <jcfaracco@gmail.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Julio Faracco 提交于
This patch introduce the new settings for LXC 3.0 or higher. The older versions keep the compatibility to deprecated settings for LXC, but after release 3.0, the compatibility was removed. This commit adds the support to the refactored settings. Signed-off-by: NJulio Faracco <jcfaracco@gmail.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Add a test to fetch the GetMemoryStat output. This only gets data for v1 only right now since the v2 data from commit 61ff6021 is rather useless returning all 0's. The v1 data was originally added in commit d1452470. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Peter Chubb 提交于
Commit 901d2b9c introduced virCgroupGetMemoryStat and replaced the LXC virLXCCgroupGetMemStat logic in commit e634c7cd. However, in doing so the replacement wasn't exact as the LXC logic used getline() to process the cgroup controller data, while the new virCgroupGetMemoryStat used "memory.stat" manual buffer read/ processing which neglected to forward through @line in order to read each line in the output. To fix that, we should be sure to carry forward the @line value for each line read updating it beyond that current @newLine value once we've calculated the values that we want. Signed-off-by: NPeter Chubb <peter.chubb@data61.csiro.au> Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
-
由 John Ferlan 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1631622 If polkit authentication is enabled, an attempt to open the connection failed during virAccessDriverPolkitGetCaller when the call to virIdentityGetCurrent returned NULL resulting in the errors: virAccessDriverPolkitGetCaller:87 : access denied: Policy kit denied action org.libvirt.api.connect.getattr from <anonymous> Because qemuProcessReconnect runs in a thread during daemonRunStateInit processing it doesn't have the thread local identity. Thus when the virGetConnectNWFilter is called as part of the qemuProcessFiltersInstantiate when virDomainConfNWFilterInstantiate is run the attempt to get the idenity fails and results in the anonymous error above. To fix this, let's grab/use the virIdenityPtr of the process that will be creating the thread, e.g. what daemonRunStateInit has set and use that for our thread. That way any other similar processing that uses/requires an identity for any other call that would have previously been successfully run won't fail in a similar manner. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1631606 Changes made to manage and utilize a secondary connection driver to APIs outside the scope of the primary connection driver have resulted in some confusion processing polkit rules since the simple "access denied" error message doesn't provide enough of a clue when combined with the "authentication failed: access denied by policy" as to which connection driver refused or failed the ACL check. In order to provide some context, let's modify the existing "access denied" error returned from the various vir*EnsureACL API's to provide the connection driver name that is causing the failure. This should provide the context for writing the polkit rules that would allow access via the driver, but yet still adhere to the virAccessManagerSanitizeError commentary regarding not telling the user why access was denied. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
This reverts commit ccc72d5c. Based on upstream comment to a follow-up patch, this didn't take the right approach and the right thing to do is revert and rework. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Missed during review and surprisingly my run through Coverity also didn't see this. I only noticed it when reading the code while fixing the build breaker for commit 36780a86. With all those continues we would leak @stats. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Fix a broken non-Linux build to use the !virFileIsDir instead Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Wang Huaqiang 提交于
Refactoring qemuDomainGetStatsCpu, make it possible to add more CPU statistics. Signed-off-by: NWang Huaqiang <huaqiang.wang@intel.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Wang Huaqiang 提交于
Add functions for creating, destroying, reconnecting resctrl monitor in qemu according to the configuration in domain XML. Signed-off-by: NWang Huaqiang <huaqiang.wang@intel.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Wang Huaqiang 提交于
Introducing <monitor> element under <cachetune> to represent a cache monitor. Signed-off-by: NWang Huaqiang <huaqiang.wang@intel.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Wang Huaqiang 提交于
Introduced virDomainResctrlNew to do the most part of virDomainResctrlAppend and move the operation of appending resctrl to @def->resctrls out of function. Rather than rely on virDomainResctrlAppend to perform the allocation, move the onus to the caller and make use of virBitmapNewCopy for @vcpus and virObjectRef for @alloc, thus removing the need to set each to NULL after the call. Signed-off-by: NWang Huaqiang <huaqiang.wang@intel.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Wang Huaqiang 提交于
Add interfaces monitor group to support operations such as GetID, SetID, Remove, SetAlloc, etc. Implement the internal virResctrlMonitorGetStats to fetch all the statistical data and the virResctrlMonitorGetCacheOccupancy in order to fetch the cache specific "llc_occupancy" value. Signed-off-by: NWang Huaqiang <huaqiang.wang@intel.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Wang Huaqiang 提交于
Refactor virResctrlAllocSetID generating an error if an attempt is made to overwrite the existing value. Signed-off-by: NWang Huaqiang <huaqiang.wang@intel.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Wang Huaqiang 提交于
Add interface for creating the resource monitoring group according to '@virResctrlMonitor->path'. Signed-off-by: NWang Huaqiang <huaqiang.wang@intel.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Wang Huaqiang 提交于
The code for creating resctrl allocation group could be reused for monitoring group, refactor it for reuse in the later patch. Signed-off-by: NWang Huaqiang <huaqiang.wang@intel.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Wang Huaqiang 提交于
Add interface for adding task PID to the monitor. Signed-off-by: NWang Huaqiang <huaqiang.wang@intel.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Wang Huaqiang 提交于
The code of adding PID to the allocation could be reused, refactor it for later reuse. Signed-off-by: NWang Huaqiang <huaqiang.wang@intel.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Wang Huaqiang 提交于
Add interface for resctrl monitor to determine the path. Signed-off-by: NWang Huaqiang <huaqiang.wang@intel.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Wang Huaqiang 提交于
The code for determining resctrl allocation path could be reused for monitor. Refactor it for reuse. Signed-off-by: NWang Huaqiang <huaqiang.wang@intel.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Wang Huaqiang 提交于
Cache Monitoring Technology (aka CMT) provides the capability to report cache utilization information of system task. This patch introduces the concept of resctrl monitor through data structure virResctrlMonitor. Signed-off-by: NWang Huaqiang <huaqiang.wang@intel.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Wang Huaqiang 提交于
Refactor schemas and virresctrl to support optional <cache> element in <cachetune>. Later, the monitor entry will be introduced and to be placed under <cachetune>. Either cache entry or monitor entry is an optional element of <cachetune>. An cachetune has no <cache> element is taking the default resource allocating policy defined in '/sys/fs/resctrl/schemata'. Signed-off-by: NWang Huaqiang <huaqiang.wang@intel.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Daniel P. Berrangé 提交于
When no server name is provided in the URI, modern versions of libxml2 will set the port to '-1'. This is a change from behaviour with earlier versions which set it to 0. Libvirt expects the port to be 0 in these cases and as a result we get a bug when connecting to URIs which lack a server name: $ virsh -c test+ssh:///default list error: failed to connect to the hypervisor error: Cannot recv data: Bad port '-1': Connection reset by peer This libxml2 change was attempting to fix another bug identified by libvirt where it didn't roundtrip URIs correctly in: https://github.com/GNOME/libxml2/commit/beb7281055dbf0ed4d041022a67c6c5cfd126f25 Essentially libxml2 was not expecting apps to look at the URI port field when the server name is not provided. This was a reasonable assumption, but none the less libvirt did look at it :-) The fix is to ensure we explicitly set port to 0 when server name is not present, avoiding undefined behaviour for the port field in libxml2. Reviewed-by: NErik Skultety <eskultet@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 14 11月, 2018 5 次提交
-
-
由 Nikolay Shirokovskiy 提交于
This patch introduces a new shutdown reason "daemon" in order to indicate that the daemon needed to force shutdown the domain as the best course of action to take at the moment. This action would occur during reconnection when processing encounters an error once the monitor reconnection is successful. Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Jim Fehlig 提交于
When libvirt configuration includes '--with-apparmor-profiles', the make uninstall target fails make[1]: Entering directory '/home/jim/upstream/libvirt/examples' ( cd '/etc/apparmor.d//abstractions' && rm -f libvirt-qemu libvirt-lxc ) ( cd '/etc/apparmor.d/' && rm -f usr.lib.libvirt.virt-aa-helper usr.sbin.libvirtd ) make[1]: *** No rule to make target 'uninstall-apparmor-local', needed by 'uninstall-local'. Stop. Add missing 'uninstall-apparmor-local' target to the examples Makefile.am. Signed-off-by: NJim Fehlig <jfehlig@suse.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Marc Hartmayer 提交于
Return -1 and report an error message if no transaction is set and virSecuritySELinuxTransactionCommit is called. The function description of virSecuritySELinuxTransactionCommit says: "Also it is considered as error if there's no transaction set and this function is called." Signed-off-by: NMarc Hartmayer <mhartmay@linux.ibm.com> Reviewed-by: NBoris Fiuczynski <fiuczy@linux.ibm.com>
-
由 Michal Privoznik 提交于
In 4674fc6a I've implemented transactions for selinux driver. Well, now that I am working in this area I've noticed a subtle bug: @ret is initialized to 0 instead of -1. Facepalm. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NMarc Hartmayer <mhartmay@linux.ibm.com>
-
由 Andrea Bolognani 提交于
Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
- 13 11月, 2018 3 次提交
-
-
由 Andrea Bolognani 提交于
As it's currently impossible for us to create new automated builds on Docker Hub (see [1]), and quay.io doesn't suffer from the same problem while still having all the feature we need, switch to the latter. [1] https://github.com/docker/hub-feedback/issues/1676Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Erik Skultety 提交于
VFIO AP has a limitation on a single device per domain, however, when commit 11708641 added the support for vfio-ap, check for this limitation was performed as part of the post parse code. Generally, checks like that should be performed within the driver's validation callback to eliminate any slight chance of failing in post parse, which could potentially result in the domain XML config vanishing. Signed-off-by: NErik Skultety <eskultet@redhat.com> Reviewed-by: NBoris Fiuczynski <fiuczy@linux.ibm.com>
-
由 Erik Skultety 提交于
Since we'll need to validate other models apart from VFIO PCI too, having a helper for each model should keep the code base cleaner. Signed-off-by: NErik Skultety <eskultet@redhat.com> Reviewed-by: NBoris Fiuczynski <fiuczy@linux.ibm.com>
-
- 12 11月, 2018 3 次提交
-
-
由 Erik Skultety 提交于
There's a lot of stuff going on in src/conf/nodedev_conf which is sometimes not directly related to config and we're not really consistent with putting only parser/formatter related stuff here, e.g. like we do for domains. So, let's start simply by adding a new module node_device_util containing some of the helpers. Unfortunately, even though these helpers tend to open a secondary driver connection and would be much therefore better suited as a nodedev driver module, we can't do that without pulling headers from the driver into conf/ and that's wrong because we want conf/ to stay driver-agnostic. Signed-off-by: NErik Skultety <eskultet@redhat.com> Acked-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Jiri Denemark 提交于
The gotShutdown bool has been redundant since we started setting VIR_DOMAIN_SHUTDOWN state after receiving SHUTDOWN event from QEMU. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Jiri Denemark 提交于
If gotShutdown is true, the domain state cannot be running because of the following code in qemuProcessHandleShutdown: priv->gotShutdown = true; VIR_DEBUG("Transitioned guest %s to shutdown state", vm->def->name); virDomainObjSetState(vm, VIR_DOMAIN_SHUTDOWN, VIR_DOMAIN_SHUTDOWN_UNKNOWN); Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 09 11月, 2018 2 次提交
-
-
由 Wang Yechao 提交于
On aarch64, lauch vm with the follow configuration: <interface type="hostdev" managed="yes"> <mac address="fa:16:3e:14:41:00"/> <source> <address type="pci" domain="0x0000" bus="0x01" slot="0x0b" function="0x2"/> </source> </interface> libvirtd will crash when accessing net->model. Signed-off-by: NWang Yechao <wang.yechao255@zte.com.cn> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Jim Fehlig 提交于
Signed-off-by: NJim Fehlig <jfehlig@suse.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
- 08 11月, 2018 1 次提交
-
-
由 Eric Blake 提交于
If qemuDomainSnapshotDiscard() fails for any reason (rare, but possible with an ill-timed ENOMEM or if qemuDomainSnapshotForEachQcow2() has problems talking to the qemu guest monitor), then an attempt to retry the snapshot deletion API will crash because we didn't undo the effects of virDomainSnapshotDropParent() temporarily rearranging the internal list structures, and the second attempt to drop parents will dereference NULL. Fix it by instead noting that there are only two callers to qemuDomainSnapshotDiscard(), and only one of the two callers wants the parent to be updated; thus we can move the call to virDomainSnapshotDropParent() into a code path that only gets executed on success. Signed-off-by: NEric Blake <eblake@redhat.com> ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
-