- 14 12月, 2018 6 次提交
-
-
由 Peter Krempa 提交于
Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Peter Krempa 提交于
Simplify wording of the error string for VIR_ERR_OPEN_FAILED and VIR_ERR_CALL_FAILED. The error codes itself are currently unused so it will not impact any client. This will simplify upcomming patch which refactors how we convert these. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Peter Krempa 提交于
Few error codes were missing the version of the message with additional info. In case of the modified messages it's not very likely they'll ever report any additional data, but for the sake of consistency we should provide them. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Peter Krempa 提交于
Additional information for an error message is either in form of a string or empty. Fix two offenders. One used %d as the format modifier and the second one always expected a string. Thankfully, neither of the offenders are currently in effect. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Peter Krempa 提交于
We do have one for the error domain but not for the error number itself. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Daniel P. Berrangé 提交于
In many files there are header comments that contain an Author: statement, supposedly reflecting who originally wrote the code. In a large collaborative project like libvirt, any non-trivial file will have been modified by a large number of different contributors. IOW, the Author: comments are quickly out of date, omitting people who have made significant contribitions. In some places Author: lines have been added despite the person merely being responsible for creating the file by moving existing code out of another file. IOW, the Author: lines give an incorrect record of authorship. With this all in mind, the comments are useless as a means to identify who to talk to about code in a particular file. Contributors will always be better off using 'git log' and 'git blame' if they need to find the author of a particular bit of code. This commit thus deletes all Author: comments from the source and adds a rule to prevent them reappearing. The Copyright headers are similarly misleading and inaccurate, however, we cannot delete these as they have legal meaning, despite being largely inaccurate. In addition only the copyright holder is permitted to change their respective copyright statement. Reviewed-by: NErik Skultety <eskultet@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 15 11月, 2018 1 次提交
-
-
由 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>
-
- 05 11月, 2018 1 次提交
-
-
由 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 returne 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. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 24 9月, 2018 1 次提交
-
-
由 Shi Lei 提交于
This patch just fixes misaligned arguments and misaligned conditions of src/util/*.c. Signed-off-by: NShi Lei <shi_lei@massclouds.com>
-
- 20 9月, 2018 2 次提交
-
-
由 Erik Skultety 提交于
All of the ones being removed are pulled in by internal.h. The only exception is sanlock which expects the application to include <stdint.h> before sanlock's headers, because sanlock prototypes use fixed width int, but they don't include stdint.h themselves, so we have to leave that one in place. Signed-off-by: NErik Skultety <eskultet@redhat.com> Acked-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Erik Skultety 提交于
It doesn't really make sense for us to have stdlib.h and string.h but not stdio.h in the internal.h header. Signed-off-by: NErik Skultety <eskultet@redhat.com> Acked-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 27 7月, 2018 1 次提交
-
-
由 Sukrit Bhatnagar 提交于
Using the new VIR_DEFINE_AUTOPTR_FUNC macro defined in src/util/viralloc.h, define a new wrapper around an existing cleanup function which will be called when a variable declared with VIR_AUTOPTR macro goes out of scope. Also, drop the redundant viralloc.h include, since that has moved from the source module into the header. When a variable of type virErrorPtr is declared using VIR_AUTOPTR, the function virFreeError will be run automatically on it when it goes out of scope. Signed-off-by: NSukrit Bhatnagar <skrtbhtngr@gmail.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
- 19 7月, 2018 1 次提交
-
-
由 Nikolay Shirokovskiy 提交于
virCopyLastError is intended to be used after last error is set. However due to virLastErrorObject failures (very unlikely though as thread local error is allocated on first use) we can have zero fields in a copy as a result. In particular code field can be set to VIR_ERR_OK. In some places (qemu monitor, qemu agent and qemu migaration code for example) we use copy result as a flag and this leads to bugs. Let's set OOM-like error in copy in case of virLastErrorObject failures. Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
-
- 26 6月, 2018 1 次提交
-
-
由 Daniel P. Berrangé 提交于
When the daemons are split there will need to be a way for the virt drivers and/or network driver to create and delete bindings between network ports and network filters. This defines a set of public APIs that are suitable for managing this facility. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 06 6月, 2018 1 次提交
-
-
由 ramyelkest 提交于
Many places in the code call virGetLastError() just to check the raised error code, or domain. However virGetLastError() can return NULL, so the code has to check for that first. This patch therefore introduces virGetLasError{Code,Domain} functions which always return a valid error code or domain respectively, thus dropping the need to perform any checks on the error object. Signed-off-by: NRamy Elkest <ramyelkest@gmail.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
- 01 2月, 2018 1 次提交
-
-
由 Chen Hanxiao 提交于
Add new error code to be able to allow consumers (such as Nova) to be able to key of a specific error code rather than needing to search the error message." Signed-off-by: NChen Hanxiao <chenhanxiao@gmail.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 07 12月, 2017 1 次提交
-
-
由 Chen Hanxiao 提交于
Since commit 5e5019bf, we've no longer use VIR_ERR_AGENT_UNSYNCED anymore. Mark it as DEPRECATED. Signed-off-by: NChen Hanxiao <chenhanxiao@gmail.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 23 11月, 2017 1 次提交
-
-
由 Jiri Denemark 提交于
And use it instead of a magic 1024 constant. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
-
- 15 9月, 2017 1 次提交
-
-
由 Peter Krempa 提交于
Some cleanup paths overwrite a usefull error message with a less useful one and we then try to preserve the original message. The handlers added in this patch will simplify the operations since they are designed right for the purpose.
-
- 14 8月, 2017 1 次提交
-
-
由 Martin Kletzander 提交于
It doesn't access anything from conf/ and ti will be needed to use from other util/ places. This split makes the separation clearer. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 15 11月, 2016 1 次提交
-
-
由 Pino Toscano 提交于
Add a new error domain and number for a new libssh-based transport.
-
- 07 9月, 2016 1 次提交
-
-
由 Yuri Pudgorodskiy 提交于
A separate error code will help recognize real failures from necessity to try again Signed-off-by: NMaxim Nestratov <mnestratov@virtuozzo.com>
-
- 12 5月, 2016 1 次提交
-
-
由 Erik Skultety 提交于
Both virGetLastError and virGetLastErrorMessage call virLastErrorObject method that returns a thread-local error object. However, if a direct call to malloc or pthread_setspecific (probably also due to malloc, since it sets ENOMEM) fail, virLastErrorObject returns NULL which, although incorrectly interpreted by virGetLastError as no error, still requires the caller to check for NULL pointer. This isn't the case with virGetLastErrorMessage that also treated it incorrectly as no error, but returned the literal "no error". This patch tweaks the checks in the virGetLastErrorMessage function, so that if virLastErrorObject failed, it returned "unknown error" which is equivalent to the current approach with virGetLastError and if it returned NULL, "unknown error" was set. Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
- 03 5月, 2016 1 次提交
-
-
由 Erik Skultety 提交于
Just like with server-related APIs, before any of client-based APIs can be called, a reference to a client-side client object needs to be obtained. For this purpose, a lookup method should exist. Apart from the client retrieval logic, a new error code for non-existent client had to be added as well. Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
- 29 3月, 2016 1 次提交
-
-
由 Qiaowei Ren 提交于
This patch implement a set of interfaces for perf event. Based on these interfaces, we can implement internal driver API for perf, and get the results of perf conuter you care about. Signed-off-by: NQiaowei Ren <qiaowei.ren@intel.com> Message-id: 1459171833-26416-4-git-send-email-qiaowei.ren@intel.com
-
- 11 3月, 2016 1 次提交
-
-
由 Martin Kletzander 提交于
This serves the same purpose as VIR_ERR_NO_xxx where xxx is any object that API can be called upon. Only this particular one is used for daemon's servers. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 01 3月, 2016 1 次提交
-
-
由 John Ferlan 提交于
When there isn't a ssh -X type session running and a user has not been added to the libvirt group, attempts to run 'virsh -c qemu:///system' commands from an otherwise unprivileged user will fail with rather generic or opaque error message: "error: authentication failed: no agent is available to authenticate" This patch will adjust the error code and message to help reflect the situation that the problem is the requested mechanism is UNAVAILABLE and a slightly more descriptive error. The result on a failure then becomes: "error: authentication unavailable: no polkit agent available to authenticate action 'org.libvirt.unix.manage'" A bit more history on this - at one time a failure generated the following type message when running the 'pkcheck' as a subprocess: "error: authentication failed: polkit\56retains_authorization_after_challenge=1 Authorization requires authentication but no agent is available." but, a patch was generated to adjust the error message to help provide more details about what failed. This was pushed as commit id '96a108c9'. That patch prepended a "polkit: " to the output. It really didn't solve the problem, but gave a hint. After some time it was deemed using DBus API calls directly was a better way to go (since pkcheck calls them anyway). So, commit id '1b854c76' (more or less) copied the code from remoteDispatchAuthPolkit and adjusted it. Then commit id 'c7542573' adjusted the remote.c code to call the new API (virPolkitCheckAuth). Finally, commit id '308c0c5a' altered the code to call DBus APIs directly. In doing so, it reverted the failing error message to the generic message that would have been received from DBus anyway.
-
- 15 2月, 2016 1 次提交
-
-
由 Ján Tomko 提交于
Replace all occurrences of VMWare outside the news.
-
- 22 1月, 2016 1 次提交
-
-
由 Jim Fehlig 提交于
Add "Xen XL Config" to the virErrorDomain enum and use it in src/xenconfig/xen_xl.c.
-
- 26 11月, 2015 1 次提交
-
-
由 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>
-
- 10 7月, 2015 2 次提交
-
-
由 Jiri Denemark 提交于
virDomainMigrateFinish* APIs were unfortunately designed to return the pointer to the domain on destination and NULL on error. This looks OK in normal cases but the same API is also called when we know migration failed and thus we expect Finish to return NULL even if it actually did all it was supposed to do without any error. The call is defined to return nonnull domain pointer over RPC, which means returning NULL will always result in an error being send. If this was not in fact an error, the API itself wouldn't set anything to the thread local virError, which makes the RPC layer come up with it's own "Library function returned error but did not set virError" error. This is quite confusing and also hard to detect by the caller. This patch adds a special error code which can be used to check that Finish successfully aborted migration. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
A helper function for copying error objects. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 16 6月, 2015 1 次提交
-
-
由 Martin Kletzander 提交于
Just the addition of VIR_FROM_ADMIN to the enum of error domains. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 15 4月, 2015 2 次提交
-
-
由 Martin Kletzander 提交于
It already had a virMutex inside, so this is just a cleanup. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Jiri Denemark 提交于
When acquiring resource via sanlock fails, we would report it as VIR_ERR_INTERNAL_ERROR, which is not very friendly to applications using libvirt. Moreover, the lockd driver would report the same failure as VIR_ERR_RESOURCE_BUSY, which looks better. Unfortunately, in sanlock driver we don't really know if acquiring the resource failed because it was already locked or there was another reason behind. But the end result is the same and I think using VIR_ERR_RESOURCE_BUSY reason for all acquire failures is still better than what we have now. https://bugzilla.redhat.com/show_bug.cgi?id=1165119Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 25 3月, 2015 1 次提交
-
-
由 Jiri Denemark 提交于
Each thread can use a thread local variable to keep the name of a job which is currently running in the job. The virThreadJobSetWorker API is supposed to be called once by any thread which is used as a worker, i.e., it is waiting in a pool, woken up to do a job, and returned back to the pool. The virThreadJobSet/virThreadJobClear APIs are to be called at the beginning/end of each job. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 26 1月, 2015 1 次提交
-
-
由 Daniel P. Berrange 提交于
The virDBusMethodCall method has a DBusError as one of its parameters. If the caller wants to pass a non-NULL value for this, it immediately makes the calling code require DBus at build time. This has led to breakage of non-DBus builds several times. It is desirable that only the virdbus.c file should need WITH_DBUS conditionals, so we must ideally remove the DBusError parameter from the method. We can't simply raise a libvirt error, since the whole point of this parameter is to give the callers a way to check if the error is one they want to ignore, without having the logs polluted with an error message. So, we add a virErrorPtr parameter which the caller can then either ignore or raise using the new virReportErrorObject method. This new method is distinct from virSetError in that it ensures the logging hooks are run. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 15 1月, 2015 1 次提交
-
-
由 Daniel P. Berrange 提交于
Add a helper method that can validate an XML document against an RNG schema
-
- 24 9月, 2014 1 次提交
-
-
由 Daniel P. Berrange 提交于
There are now two places in libvirt which use polkit. Currently they use pkexec, which is set to be replaced by direct DBus API calls. Add a common API which they will both be able to use for this purpose. No tests are added at this time, since the impl will be gutted in favour of a DBus API call shortly. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 26 6月, 2014 1 次提交
-
-
由 Jiri Denemark 提交于
When CPU comparison APIs return VIR_CPU_COMPARE_INCOMPATIBLE, the caller has no clue why the CPU is considered incompatible with host CPU. And in some cases, it would be nice to be able to get such info in a client rather than having to look in logs. To achieve this, the APIs can be told to return VIR_ERR_CPU_INCOMPATIBLE error for incompatible CPUs and the reason will be described in the associated error message. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-