- 29 4月, 2016 1 次提交
-
-
由 Ben Gray 提交于
FD passing APIs like CreateXMLWithFiles or OpenGraphicsFD will leak file descriptors. The user passes in an fd, which is dup()'d in virNetClientProgramCall. The new fd is what is transfered to the server virNetClientIOWriteMessage. Once all the fds have been written though, the parent msg->fds list is immediately free'd, so the individual fds are never closed. This closes each FD as its send to the server, so all fds have been closed by the time msg->fds is free'd. https://bugzilla.redhat.com/show_bug.cgi?id=1159766
-
- 21 4月, 2016 2 次提交
-
-
由 Michal Privoznik 提交于
After 434de30d the status values are prefixed VIR_NET_ rather than REMOTE_. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
The stream serial number is the serial number of the RPC call that initiated a data transfer. And as such can never be negative. Moreover, when looking up internal state for a stream, the serial numbers are compared. But hey, the serial number in message header is unsigned too! Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 18 4月, 2016 2 次提交
-
-
由 Erik Skultety 提交于
Since threadpool increments the current number of threads according to current load, i.e. how many jobs are waiting in the queue. The count however, is constrained by max and min limits of workers. The logic of this new API works like this: 1) setting the minimum a) When the limit is increased, depending on the current number of threads, new threads are possibly spawned if the current number of threads is less than the new minimum limit b) Decreasing the minimum limit has no possible effect on the current number of threads 2) setting the maximum a) Icreasing the maximum limit has no immediate effect on the current number of threads, it only allows the threadpool to spawn more threads when new jobs, that would otherwise end up queued, arrive. b) Decreasing the maximum limit may affect the current number of threads, if the current number of threads is less than the new maximum limit. Since there may be some ongoing time-consuming jobs that would effectively block this API from killing any threads. Therefore, this API is asynchronous with best-effort execution, i.e. the necessary number of workers will be terminated once they finish their previous job, unless other workers had already terminated, decreasing the limit to the requested value. 3) setting priority workers - both increase and decrease in count of these workers have an immediate impact on the current number of workers, new ones will be spawned or some of them get terminated respectively. Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
由 Erik Skultety 提交于
New API to retrieve current server workerpool specs. Since it uses typed parameters, more specs to retrieve can be further included in the pool of supported ones. Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
- 13 4月, 2016 1 次提交
-
-
由 Cole Robinson 提交于
Trying to reload/SIGUSR1 virtlogd or virtlockd fails with: error : virNetDaemonRun:747 : internal error: Not all servers restored, cannot run server Commit 252610f7 changed the daemon state json to allow tracking multiple servers. However it missed clearing dmn->srvObject after the json is empty, like the previous code paths handled. Later on in virNewDaemonRun, dmn->srvObject is expected to be empty otherwise we throw the above error. https://bugzilla.redhat.com/show_bug.cgi?id=1311013
-
- 11 4月, 2016 1 次提交
-
-
由 Pavel Hrdina 提交于
fdstream.c: In function 'virFDStreamWrite': fdstream.c:390:29: error: logical 'or' of equal expressions [-Werror=logical-op] if (errno == EAGAIN || errno == EWOULDBLOCK) { ^~ Fedora rawhide now uses gcc 6.0 and there is a bug with -Wlogical-op producing false warnings. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69602 Use GCC pragma push/pop and ignore -Wlogical-op for GCC that supports push/pop pragma and also has this bug. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
- 31 3月, 2016 1 次提交
-
-
由 Fabiano Fidêncio 提交于
Compilation for xdg-app failed due to a buggy SASL headers present on the used runtime (org.gnome.Sdk 3.18). In file included from rpc/virnetsaslcontext.h:24:0, from rpc/virnetsaslcontext.c:25: /usr/include/sasl/sasl.h:230:38: error: unknown type name 'size_t' typedef void *sasl_realloc_t(void *, size_t); ^ /usr/include/sasl/sasl.h:235:5: error: unknown type name 'sasl_realloc_t' sasl_realloc_t *, Use the same workaround as commit 1be3dfdf did. Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
- 24 3月, 2016 1 次提交
-
-
由 Michal Privoznik 提交于
The adminDispatchConnectListServers() function is generated by our great perl script. However, it has a tiny flaw: if adminConnectListServers() it calls fails, the control jumps onto cleanup label where we try to free any list of servers built so far. However, in the loop @i is unsigned (size_t) while @nresults is signed (int). Currently, it does no harm because of the check for @result being non-NULL. But if that ever changes in the future, this bug will be hard to chase. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 17 3月, 2016 1 次提交
-
-
由 Cole Robinson 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1271183 We only wait 0.5 seconds for the session daemon to start up and present its socket, which isn't sufficient for many users. Bump up the sleep interval and retry amount so we wait for a total of 5.0 seconds.
-
- 11 3月, 2016 11 次提交
-
-
由 Martin Kletzander 提交于
All other places use VIR_ERR_RPC except this one, let's be consistent, shall we? Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Until now, the script assumed that snapshot name is 'snap', but that's going to change. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Let's call it modern_ret_as_list as opposed to single_ret_as_list. The latter was able to return list of things. However the new, more modern, version came and it is used since listAllDomains till nowadays in ListServers. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
We were using parentheses for grouping admin|remote even though we didn't need to capture what's in it. That caused some changes to be greater than needed and, to be honest, some confusion as well. Let's use it as it should be used. It'll also make future changes more consistent. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
For now it does not matter which ones we return as the code is similarly complex, however it will fit in with other constructs in the future, mainly when we will be able to generate dispatch helpers. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
virHashForEach() returns 0 if everything went nice, so our session daemon was timing out even when there was a client connected. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1315606Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Since servers know their name, there is no need to supply such information twice. Also defeats inconsistencies. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
At first I did not want to do this, but after trying to implement some newer feaures in the admin API I realized we need that to make our lives easier. On the other hand they are not saved redundantly and the virNetServer objects are still kept in a hash table. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 17 2月, 2016 2 次提交
-
-
由 Erik Skultety 提交于
This API is merely a convenience API, i.e. when managing clients connected to daemon's servers, we should know (convenience) which server the specific client is connected to. This implies a client-side representation of a server along with a basic API to let the administrating client know what servers are actually available on the daemon. Signed-off-by: NErik Skultety <eskultet@redhat.com> Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Erik Skultety 提交于
Since the daemon can manage and add (at fresh start) multiple servers, we also should be able to add them from a JSON state file in case of a daemon restart, so post exec restart support for multiple servers is also provided. Patch also updates virnetdaemontest accordingly. Signed-off-by: NErik Skultety <eskultet@redhat.com> Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 11 2月, 2016 1 次提交
-
-
由 Michal Privoznik 提交于
Apparently we are not the only ones with dumb free functions because dbus_message_unref() does not accept NULL either. But if I were to vote, this one is even more evil. Instead of returning an error just like we do it immediately dereference any pointer passed and thus crash you app. Well done DBus! Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7f878ebda700 (LWP 31264)] 0x00007f87be4016e5 in ?? () from /usr/lib64/libdbus-1.so.3 (gdb) bt #0 0x00007f87be4016e5 in ?? () from /usr/lib64/libdbus-1.so.3 #1 0x00007f87be3f004e in dbus_message_unref () from /usr/lib64/libdbus-1.so.3 #2 0x00007f87bf6ecf95 in virSystemdGetMachineNameByPID (pid=9849) at util/virsystemd.c:228 #3 0x00007f879761bd4d in qemuConnectCgroup (driver=0x7f87600a32a0, vm=0x7f87600c7550) at qemu/qemu_cgroup.c:909 #4 0x00007f87976386b7 in qemuProcessReconnect (opaque=0x7f87600db840) at qemu/qemu_process.c:3386 #5 0x00007f87bf6edfff in virThreadHelper (data=0x7f87600d5580) at util/virthread.c:206 #6 0x00007f87bb602334 in start_thread (arg=0x7f878ebda700) at pthread_create.c:333 #7 0x00007f87bb3481bd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109 (gdb) frame 2 #2 0x00007f87bf6ecf95 in virSystemdGetMachineNameByPID (pid=9849) at util/virsystemd.c:228 228 dbus_message_unref(reply); (gdb) p reply $1 = (DBusMessage *) 0x0 Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 08 2月, 2016 1 次提交
-
-
由 Joao Martins 提交于
Commit 8cd1d546 consolidates both daemon and remote driver typed param serialization functions. The consolidation now enforces client to use VIR_TYPED_PARAM_STRING_OKAY flag to properly serialize string parameters, which server has used for quite some time now. And this caused an issue, since the commit had not adjusted client remote calls appropriately, thus causing a failure in blkiotune, numatune and migration APIs (as per Xen CI tests). This patch adjusts both remote_driver.c and gendispatch.pl to properly address this issue. http://lists.xenproject.org/archives/html/xen-devel/2016-02/msg01012.htmlSigned-off-by: NJoao Martins <joao.m.martins@oracle.com> Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
- 03 2月, 2016 3 次提交
-
-
由 Erik Skultety 提交于
Same as for deserializer, this method might get handy for admin one day. The major reason for this patch is to stay consistent with idea, i.e. when deserializer can be shared, why not serializer as well. The only problem to be solved was that the daemon side serializer uses a code snippet which handles sparse arrays returned by some APIs as well as removes any string parameters that can't be returned to older clients. This patch makes of the new virTypedParameterRemote datatype introduced by one of the pvious patches.
-
由 Erik Skultety 提交于
Since the method is static to remote_driver, it can't even be used by our daemon. Other than that, it would be useful to be able to use it with admin as well. This patch uses the new virTypedParameterRemote datatype introduced in one of previous patches.
-
由 Erik Skultety 提交于
Currently, the deserializer is hardcoded into remote_driver which makes it impossible for admin to use it. One way to achieve a shared implementation (besides moving the code to another module) would be pass @ret_params_val as a void pointer as opposed to the remote_typed_param pointer and add a new extra argument specifying which of those two protocols is being used and typecast the pointer at the function entry. An example from remote_protocol: struct remote_typed_param_value { int type; union { int i; u_int ui; int64_t l; uint64_t ul; double d; int b; remote_nonnull_string s; } remote_typed_param_value_u; }; typedef struct remote_typed_param_value remote_typed_param_value; struct remote_typed_param { remote_nonnull_string field; remote_typed_param_value value; }; That would leave us with a bunch of if-then-elses that needed to be used across the method. This patch takes the other approach using the new datatype introduced in one of earlier commits.
-
- 29 1月, 2016 1 次提交
-
-
由 Michal Privoznik 提交于
In our generator for some code we put empty lines in the output to separate blocks of code. However, in some cases we put couple of spaces on the empty line too. It's not bug, it just isn't nice. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 20 1月, 2016 1 次提交
-
-
由 Cole Robinson 提交于
The generated output is dependent on perl hashtable ordering, which gives different results for i686 and x86_64. Fix this by sorting the hash keys before iterating over them https://bugzilla.redhat.com/show_bug.cgi?id=1173641
-
- 12 1月, 2016 6 次提交
-
-
由 Cole Robinson 提交于
On every socket connect(2) attempt we were re-launching session libvirtd, up to 100 times in 5 seconds. This understandably caused some weird load races and intermittent qemu:///session startup failures https://bugzilla.redhat.com/show_bug.cgi?id=1271183
-
由 Cole Robinson 提交于
When we autolaunch libvirtd for session URIs, we spin in a retry loop waiting for the daemon to start and the connect(2) to succeed. However if we exceed the retry count, we don't explicitly raise an error, which can yield a slew of different error messages elsewhere in the code. Explicitly raise the last connect(2) failure if we run out of retries.
-
由 Cole Robinson 提交于
- Add some debugging - Make the loop dependent only on retries - Make it explicit that connect(2) success exits the loop - Invert the error checking logic
-
由 Ben Gray 提交于
When we are receiving data in smaller chunks it might happen that virNetServerClientDispatchRead() will be called multiple times. And as that happens, if it is a message that also transfer headers, we decode the number of them every single time and, unfortunately, also allocate the memory for them. That causes a leak, in the best scenario. Best viewed with '-w'. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
Some of the protocol files already include handing of the missing int types such as xdr_uint64_t, some don't. To fix it everywhere, move out of the appropriate defines to the utils/virxdrdefs.h file and include it where needed. Signed-off-by: NRoman Bogorodskiy <bogorodskiy@gmail.com>
-
OpenBSD uses 'struct sockpeercred' instead of 'struct ucred'. Add a configure check that detects its presence and use if in the code that could be compiled on OpenBSD. Signed-off-by: NRoman Bogorodskiy <bogorodskiy@gmail.com>
-
- 21 12月, 2015 1 次提交
-
-
由 Erik Skultety 提交于
Commmit df8192aa introduced admin related rename and some minor (caused by automated approach, aka sed) and some more severe isues along with it. First reason to revert is the inconsistency with libvirt library. Although we deal with the daemon directly rather than with a specific hypervisor, we still do have a connection. That being said, contributors might get under the impression that AdmDaemonNew would spawn/start a new daemon (since it's admin API, why not...), or AdmDaemonClose would do the exact opposite or they might expect DaemonIsAlive report overall status of the daemon which definitely isn't the case. The second reason to revert this patch is renaming virt-admin client. The client tool does not necessarily have to reflect the names of the API's it's using in his internals. An example would be 's/vshAdmConnect/vshAdmDaemon' where noone can be certain of what the latter function really does. The former is quite expressive about some connection magic it performs, but the latter does not say anything, especially when vshAdmReconnect and vshAdmDisconnect were left untouched.
-
- 01 12月, 2015 1 次提交
-
-
由 Martin Kletzander 提交于
virAdmConnect was named after virConnect, but after some discussions, most of the APIs called will be working with remote daemon and starting them virAdmDaemon will make more sense. Only possibly controversal name is CloseCallback (de)registration, and connecting to the daemon (which will still be Open/Close), but even this makes sense if one thinks about the daemon being opened and closed, e.g. as file, etc. This way all the APIs working with the daemon will start with virAdmDaemon prefix, they will accept virAdmDaemonPtr as first parameter and that will better suit with other namings as well (virDomain*, virAdmServer*, etc.). Because in virt-admin, the connection name does not refer to a struct that would have a connect in its name, also adjust 'connname' in clients. And because it is not used anywhere in the vsh code, move it from there into each client. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 30 11月, 2015 1 次提交
-
-
由 Erik Skultety 提交于
Introduce a new API to get libvirt version. It is worth noting, that libvirt-admin and libvirt share the same version number. Unfortunately, our existing API isn't generic enough to be used with virAdmConnectPtr as well. Also this patch wires up this API to the virt-admin client as a generic cmdVersion command.
-
- 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>
-