- 03 10月, 2016 1 次提交
-
-
由 Martin Kletzander 提交于
When building using -Og, gcc sees that some variables can be used uninitialized It can be debatable whether it is possible with our codeflow, but functions should be self-contained and initializations are always good. The return instead of goto is due to actualType being used in the cleanup. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com> (cherry picked from commit 3470cd86)
-
- 05 12月, 2015 1 次提交
-
-
由 Daniel P. Berrange 提交于
The log file descriptor associated with the virRotatingFile struct should be marked close-on-exec, as even when virtlogd re-exec's itself it expect to open the log file fresh. It does not need to preserve the logfile handles, only the network client FDs. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 02 12月, 2015 1 次提交
-
-
由 Ian Campbell 提交于
Commit 0f7436ca "network: wait for DAD to finish for bridge IPv6 addresses" results in: CC util/libvirt_util_la-virnetdevmacvlan.lo util/virnetdev.c: In function 'virNetDevParseDadStatus': util/virnetdev.c:1319:188: error: cast increases required alignment of target type [-Werror=cast-align] util/virnetdev.c:1332:41: error: cast increases required alignment of target type [-Werror=cast-align] util/virnetdev.c:1334:92: error: cast increases required alignment of target type [-Werror=cast-align] cc1: all warnings being treated as errors on at least ARM platforms. The three macros involved (NLMSG_NEXT, IFA_RTA and RTA_NEXT) all appear to correctly take care of alignment, therefore suppress Wcast-align around their uses. Signed-off-by: NIan Campbell <ian.campbell@citrix.com> Cc: Maxim Perevedentsev <mperevedentsev@virtuozzo.com> Cc: Laine Stump <laine@laine.org> Cc: Dario Faggioli <dario.faggioli@citrix.com> Cc: Jim Fehlig <jfehlig@suse.com>
-
- 30 11月, 2015 5 次提交
-
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Michal Privoznik 提交于
Our domain_conf.* files are big enough. Not only they contain XML parsing code, but they served as a storage of all functions whose name is virDomain prefixed. This is just wrong as it gathers not related functions (and modules) into one big file which is then harder to maintain. Split virDomainObjList module into a separate file called virdomainobjlist.[ch]. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Pavel Hrdina 提交于
If for some reason there is an existing log file, that is larger then max length of log file, we need to rollover that file immediately. Trying to figure out how much data we could write will resolve in overflow of unsigned variable 'towrite' and this leads to segfault. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Erik Skultety 提交于
As we need to provide support for URI aliases in libvirt-admin as well, URI alias matching needs to be internally visible. Since virConnectOpenResolveURIAlias does have a compatible signature, it could be easily reused by libvirt-admin. This patch moves URI alias matching to util, renaming it accordingly.
-
由 Erik Skultety 提交于
virConnectGetConfig and virConnectGetConfigPath were static libvirt methods, merely because there hasn't been any need for having them internally exported yet. Since libvirt-admin also needs to reference its config file, 'xGetConfig' should be exported. Besides moving, this patch also renames the methods accordingly, as they are libvirt config specific.
-
- 27 11月, 2015 1 次提交
-
-
由 Martin Kletzander 提交于
Machine name escaping follows the same rules as serice name escape, except that '.' and '-' must not be escaped in machine names, due to a bug in systemd-machined. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1282846Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 26 11月, 2015 3 次提交
-
-
由 Daniel P. Berrange 提交于
Copy the virtlockd codebase across to form the initial virlogd code. Simple search & replace of s/lock/log/ and gut the remote protocol & dispatcher. This gives us a daemon that starts up and listens for connections, but does nothing with them. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Add virRotatingFileReader and virRotatingFileWriter objects which allow reading & writing from/to files with automation rotation to N backup files when a size limit is reached. This is useful for guest logging when a guaranteed finite size limit is required. Use of external tools like logrotate is inadequate since it leaves the possibility for guest to DOS the host in between invokations of logrotate. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Martin Kletzander 提交于
According to the documentation, CreateMachine accepts only 7bit ASCII characters in the machinename parameter, so let's make sure we can start machines with unicode names with systemd. We already have a function for that, we just forgot to use it. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1062943 Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1282846Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 25 11月, 2015 1 次提交
-
-
由 Laine Stump 提交于
A PCI device may have the capability to setup virtual functions (VFs) but have them currently all disabled. Prior to this patch, if that was the case the the node device XML for the device wouldn't report any virtual_functions capability. With this patch, if a file called "sriov_totalvfs" is found in the device's sysfs directory, its contents will be interpreted as a decimal number, and that value will be reported as "maxCount" in a capability element of the device's XML, e.g.: <capability type='virtual_functions' maxCount='7'/> This will be reported regardless of whether or not any VFs are currently enabled for the device. NB: sriov_numvfs (the number of VFs currently active) is also available in sysfs, but that value is implied by the number of items in the list that is inside the capability element, so there is no reason to explicitly provide it as an attribute. sriov_totalvfs and sriov_numvfs are available in kernels at least as far back as the 2.6.32 that is in RHEL6.7, but in the case that they simply aren't there, libvirt will behave as it did prior to this patch - no maxCount will be displayed, and the virtual_functions capability will be absent from the device's XML when 0 VFs are enabled.
-
- 24 11月, 2015 1 次提交
-
-
由 Christian Loehle 提交于
Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
- 20 11月, 2015 1 次提交
-
-
由 Andrea Bolognani 提交于
This can be useful for debugging.
-
- 19 11月, 2015 1 次提交
-
-
由 Joao Martins 提交于
Introduce a new helper function "virDiskNameParse" which extends virDiskNameToIndex but handling both disk index and partition index. Also rework virDiskNameToIndex to be based on virDiskNameParse. A test is also added for this function testing both valid and invalid disk names. Signed-off-by: NJoao Martins <joao.m.martins@oracle.com>
-
- 18 11月, 2015 2 次提交
-
-
由 Richard Weinberger 提交于
The LXC driver uses virSetUIDGID() to become UID/GID 0. It passes an empty groups list to virSetUIDGID() to get rid of all supplementary groups from the host side. But virSetUIDGID() calls setgroups() only if the supplied list is larger than 0. This leads to a container root with unrelated supplementary groups. In most cases this issue is unoticed as libvirtd runs as UID/GID 0 without any supplementary groups. Signed-off-by: NRichard Weinberger <richard@nod.at> Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Stefan Berger 提交于
This patch addresses BZ 1244895. Adapt the sysfs TPM command cancel path for the TPM driver that does not use a miscdevice anymore since Linux 4.0. Support old and new paths and check their availability. Add a mockup for the test cases to avoid the testing for availability of the cancel path. Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
-
- 16 11月, 2015 1 次提交
-
-
由 Chen Hanxiao 提交于
Use toadd->use directly. Signed-off-by: NChen Hanxiao <chenhanxiao@gmail.com>
-
- 07 11月, 2015 2 次提交
-
-
由 John Ferlan 提交于
Use virNetDevSetupControl instead of open coding using socket(AF_LOCAL...) and clearing virIfreq. By using virNetDevSetupControl, the socket is then opened using AF_PACKET which requires being privileged (effectively root) in order to complete successfully. Since that's now a requirement, then the ioctl(SIOCETHTOOL) should not fail with EPERM, thus it is removed from the filtered listed of failure codes. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Since the SIOCETHTOOL ioctl only works for privileged daemons, if called when not root, then virNetDevGetFeatures will VIR_DEBUG a message and return 0 as if the functions were not available for the architecture. This effectively returns an empty bitmap indicating no features available. Introduced by commit id 'c9027d8f' Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
- 06 11月, 2015 3 次提交
-
-
由 John Ferlan 提交于
In commit id 'c9027d8f' when updating the posted patch to generate a bitmap instead of an array of named feature bits, adjustment of the args was missed
-
由 John Ferlan 提交于
Recently reverted commit id '6f2a0198' showed a need to add extra comments when dealing with filtering of potential "non-issues". Scanning through upstream patch postings indicates early on the reasons for the filtering of specific ioctl failures were provided; however, when converted from causing an error to VIR_DEBUG's the reasons were missing. A future read/change of the code incorrectly assumed they could or should be removed.
-
由 Daniel P. Berrange 提交于
This reverts commit 6f2a0198. This commit removed error reporting from virNetDevSendEthtoolIoctl pushing responsibility onto the callers. This is wrong, however, since virNetDevSendEthtoolIoctl calls virNetDevSetupControl which can still report errors. So as a result virNetDevSendEthtoolIoctl may or may not report errors depending on which bit of it fails, and as a result callers now overwrite some errors. It also introduced a regression causing unprivileged libvirtd to spew error messages to the console due to inability to query the NIC features, an error which was previously ignored. virNetDevSetupControlFull:148 : Cannot open network interface control socket: Operation not permitted virNetDevFeatureAvailable:3062 : Cannot get device wlp3s0 flags: Operation not permitted virNetDevSetupControlFull:148 : Cannot open network interface control socket: Operation not permitted virNetDevFeatureAvailable:3062 : Cannot get device wlp3s0 flags: Operation not permitted virNetDevSetupControlFull:148 : Cannot open network interface control socket: Operation not permitted virNetDevFeatureAvailable:3062 : Cannot get device wlp3s0 flags: Operation not permitted virNetDevSetupControlFull:148 : Cannot open network interface control socket: Operation not permitted virNetDevFeatureAvailable:3062 : Cannot get device wlp3s0 flags: Operation not permitted Looking back at the original posting I see no explanation of why thsi refactoring was needed, so reverting the clearly broken error reporting logic looks like the best option. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 05 11月, 2015 2 次提交
-
-
由 John Ferlan 提交于
Commit id '0f7436ca' added virNetDevWaitDadFinish using ATTRIBUTE_NONNULL for both arguments, although one is a non-null argument. A Coverity build balks at that.
-
由 John Ferlan 提交于
Rather than "if (virNetDevFeatureAvailable(ifname, &cmd))" change the success criteria to "if (virNetDevFeatureAvailable(ifname, &cmd) == 1)". The called helper returns -1 on failure, 0 on not found, and 1 on found. Thus a failure was setting bits. Introduced by commit ac3ed208 which changed the helper's return values without adjusting its callers Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
- 04 11月, 2015 1 次提交
-
-
由 Jiri Denemark 提交于
VIR_DEBUG and VIR_WARN will automatically add a new line to the message, having "\n" at the end or at the beginning of the message results in empty lines. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 30 10月, 2015 2 次提交
-
-
由 Laine Stump 提交于
This was originally set to 5 seconds, but times of 5.5 to 7 seconds were experienced. Since it's an arbitrary number intended to prevent an infinite hang, having it a bit too high won't hurt anything, and 20 seconds looks to be adequate (i.e. I think/hope we don't need to make it tunable in libvirtd.conf)
-
由 Luyao Huang 提交于
If DAD not finished in 5 seconds, user will get an unknown error like this: # virsh net-start ipv6 error: Failed to start network ipv6 error: An error occurred, but the cause is unknown Call virReportError to set an error. Signed-off-by: NLuyao Huang <lhuang@redhat.com>
-
- 29 10月, 2015 3 次提交
-
-
由 Roman Bogorodskiy 提交于
Build on non-Linux fails because the virNetDevWaitDadFinish() stub has unused parameters. Fix by adding appropriate ATTRIBUTE_UNUSED for these parameters. Pushing under build-breaker rule.
-
由 Maxim Perevedentsev 提交于
commit db488c79 assumed that dnsmasq would complete IPv6 DAD before daemonizing, but in reality it doesn't wait, which creates problems when libvirt's bridge driver sets the matching "dummy tap device" to IFF_DOWN prior to DAD completing. This patch waits for DAD completion by periodically polling the kernel using netlink to check whether there are any IPv6 addresses assigned to bridge which have a 'tentative' state (if there are any in this state, then DAD hasn't yet finished). After DAD is finished, execution continues. To avoid an endless hang in case something was wrong with the kernel's DAD, we wait a maximum of 5 seconds.
-
由 Maxim Perevedentsev 提交于
Such messages do not have NLMSG_ERROR or NLMSG_DONE type but they are valid responses. We test 'multi-partness' by looking for NLM_F_MULTI flag.
-
- 28 10月, 2015 1 次提交
-
-
由 Pino Toscano 提交于
Use the virProcessGetStartTime implementation also when only the kernel is FreeBSD, such as on GNU/kFreeBSD.
-
- 26 10月, 2015 1 次提交
-
-
由 Andrea Bolognani 提交于
The new name, virHostdevUpdateActiveDomainDevices(), follows the same naming conventions used by the rest of the module. No functional changes.
-
- 22 10月, 2015 3 次提交
-
-
由 Luyao Huang 提交于
Commit id '1c24cfe9' added error messages for virNumaSetPagePoolSize; however, virNumaGetHugePageInfo also uses virNumaGetHugePageInfoPath in order to build the path, but it never checked upon return if the built path exists which could lead to an error message as follows: $ virsh freepages 0 1 error: Failed to open file '/sys/devices/system/node/node0/hugepages/hugepages-1kB/free_hugepages': No such file or directory Rather than add the same message for the other two callers, adjust the virNumaGetHugePageInfoPath in order not only build the path, but also check if the built path exists. If the path does not exist, then generate the error message and return failure. Signed-off-by: NLuyao Huang <lhuang@redhat.com>
-
由 Luyao Huang 提交于
Commit id '1c24cfe9' added new checks and error messaes for failure scenarios. Let's adjust those error messages to after the call to virNumaGetHugePageInfoPath in order to provide a more specific error message depending on node and page_size After this patch: # virsh allocpages --pagesize 2047 --pagecount 1 --cellno 0 error: operation failed: page size 2047 is not available on node 0 # virsh allocpages --pagesize 2047 --pagecount 1 error: operation failed: page size 2047 is not available Signed-off-by: NLuyao Huang <lhuang@redhat.com>
-
由 Luyao Huang 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1265114 Refactor helper virNumaGetHugePageInfoPath to handle returning a directory path when passed a page_size of 0 and suffix == NULL into a new helper virNumaGetHugePageInfoDir which will only be called when a directory path is expected to be returned. This solves the issue where the helper was called with page_size == 0 expecting a file path in return, but instead got a directory path and failed in virFileReadAll with: error : virFileReadAll:1358 : Failed to read file '/sys/devices/system/node/node0/hugepages/': Is a directory Since virNumaGetPages API expects to return a directory by passing page_size == 0 and suffix == NULL, it will now call the new helper. Callers to virNumaGetHugePageInfoPath expect to return a file path which could then be used in the call to virFileReadAll. Signed-off-by: NLuyao Huang <lhuang@redhat.com>
-
- 21 10月, 2015 1 次提交
-
-
由 Ishmanpreet Kaur Khera 提交于
We have macros for both positive and negative string matching. Therefore there is no need to use !STREQ or !STRNEQ. At the same time as we are dropping this, new syntax-check rule is introduced to make sure we won't introduce it again. Signed-off-by: NIshmanpreet Kaur Khera <khera.ishman@gmail.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 16 10月, 2015 1 次提交
-
-
由 Dominik Perpeet 提交于
Event implementations need to be registered before a connection to the Hypervisor is opened, otherwise event handling can be impaired (e.g. delayed messages). This fact is referenced in an e-mail [1], but should also be noted in the documentation of the registration functions. [1] https://www.redhat.com/archives/libvirt-users/2014-April/msg00011.html
-
- 14 10月, 2015 1 次提交
-
-
由 John Ferlan 提交于
After a successful creation of a directory, if some other call results in returning a failure, let's remove the directory we created to prevent another round trip or confusion in the caller. In particular, this function can be called during a storage backend buildVol, so in order to ensure that caller doesn't need to distinguish between failed create or some other failure after create, just remove the directory we created. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-