- 01 12月, 2015 4 次提交
-
-
由 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>
-
由 Martin Kletzander 提交于
The virt-admin binary and its man page should not yet be distributed, but we need libvirt-common.h. RPM build fails without specifying these. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Otherwise all builds from the package will fail. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Wang Yufei 提交于
If VM A is shutdown a by qemu agent at appoximately the same time an agent EOF of VM A happened, there's a chance that deadlock may occur: qemuProcessHandleAgentEOF in main thread A) priv->agent = NULL; //A happened before B //deadlock when we get agent lock which's held by worker thread qemuAgentClose(agent); qemuDomainObjExitAgent called by qemuDomainShutdownFlags in worker thread B) hasRefs = virObjectUnref(priv->agent); // priv->agent is NULL, // return false if (hasRefs) virObjectUnlock(priv->agent); //agent lock will not be released here In order to resolve, during EOF close the agent first, then set priv->agent to NULL to fix the deadlock. This essentially reverts commit id '1020a504'. It's also of note that commit id '362d0477' notes a possible/rare deadlock similar to what was seen in the monitor in commit id '25f582e3'. However, it seems interceding changes including commit id 'd960d06f' should remove the deadlock issue. With this change, if EOF is called: Get VM lock Check if !priv->agent || priv->beingDestroyed, then unlock VM Call qemuAgentClose Unlock VM When qemuAgentClose is called Get Agent lock If Agent->fd open, close it Unlock Agent Unref Agent qemuDomainObjEnterAgent Enter with VM lock Get Agent lock Increase Agent refcnt Unlock VM After running agent command, calling qemuDomainObjExitAgent Enter with Agent lock Unref Agent If not last reference, unlock Agent Get VM lock If we were in the middle of an EnterAgent, call Agent command, and ExitAgent sequence and the EOF code is triggered, then the EOF code can get the VM lock, make it's checks against !priv->agent || priv->beingDestroyed, and call qemuAgentClose. The CloseAgent would wait to get agent lock. The other thread then will eventually call ExitAgent, release the Agent lock and unref the Agent. Once ExitAgent releases the Agent lock, AgentClose will get the Agent Agent lock, close the fd, unlock the agent, and unref the agent. The final unref would cause deletion of the agent. Signed-off-by: NWang Yufei <james.wangyufei@huawei.com> Reviewed-by: NRen Guannan <renguannan@huawei.com>
-
- 30 11月, 2015 28 次提交
-
-
由 Martin Kletzander 提交于
The parameter --disable-dependency-tracking is supposed to speed up one-time build due to the fact that it disables some dependency extractors that, apparently, take longer time to execute. That is a problem for code that is generated into builddir (especially some specific subdirectory) because the directory it should be installed to does not exists in VPATH and without the dependency tracking is not created. Generating such file hence fails with -ENOENT. In order to keep generating files into builddir instead of srcdir, we must create the directory ourselves. This should finally fix the problem that is being fixed multiple times since its introduction in commit a9fe6203 and let us continue with cleaning those parts of Makefiles that depend on generating files into the srcdir rather than builddir as it should be. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Otherwise nobody will be able to include libvirt.h. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Wei Jiangang 提交于
Due to the default of flags is VIR_CONNECT_LIST_DOMAINS_ACTIVE, It doesn't show the domains that have been shutdown when we use 'virsh list' with only --state-shutoff. Signed-off-by: NWei Jiangang <weijg.fnst@cn.fujitsu.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>
-
由 Ján Tomko 提交于
<input type='passthrough' bus='virtio'> <source evdev='/dev/input/event1234'/> </input> results in: -device virtio-input-host-pci,id=input0,evdev=/dev/input/event1234 https://bugzilla.redhat.com/show_bug.cgi?id=1231114
-
-
由 Ján Tomko 提交于
Add functions for setting and restoring the label of input devices to DAC and SELinux drivers. https://bugzilla.redhat.com/show_bug.cgi?id=1231114
-
由 Ján Tomko 提交于
Add xml for the new virtio-input-host-pci device: <input type='passthrough' bus='virtio'> <source evdev='/dev/input/event1234'/> </input> https://bugzilla.redhat.com/show_bug.cgi?id=1231114
-
由 Ján Tomko 提交于
Add QEMU_CAPS_VIRTIO_INPUT_HOST for both virtio-input-host-device and virtio-input-host-pci.
-
由 Ján Tomko 提交于
Add support for these qemu devices: virtio-mouse-{pci,device} virtio-keyboard-{pci,device} virtio-tablet-{pci,device} https://bugzilla.redhat.com/show_bug.cgi?id=1231114
-
由 Ján Tomko 提交于
To be used by the family of virtio input devices: <input type='mouse' bus='virtio'/> <input type='tablet' bus='virtio'/> <input type='keyboard' bus='virtio'/> https://bugzilla.redhat.com/show_bug.cgi?id=1231114
-
由 Ján Tomko 提交于
Add capabilities for virtio-keyboard, virtio-mouse and virtio-tablet devices: name "virtio-keyboard-device", bus virtio-bus name "virtio-keyboard-pci", bus PCI name "virtio-mouse-device", bus virtio-bus name "virtio-mouse-pci", bus PCI name "virtio-tablet-device", bus virtio-bus name "virtio-tablet-pci", bus PCI Map both -device and -pci versions of the device to one capability. https://bugzilla.redhat.com/show_bug.cgi?id=1231114
-
由 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 提交于
-
由 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.
-
由 Erik Skultety 提交于
As we need a client disconnect handler, we also need a mechanism to register such handlers for a client. This patch introduced both the close callbacks and also the client vshAdmCatchDisconnect handler to be registered with it. By registering the handler we still need to make sure the client can react to daemon's events like disconnect or keepalive, so asynchronous I/O event polling is necessary to be enabled too.
-
由 Erik Skultety 提交于
Now that we introduced URI support in libvirt-admin, we should also support URI aliases during connection establishment phase. After applying this patch, virAdmConnectOpen will also support VIR_CONNECT_NO_ALIASES flag.
-
由 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 提交于
Since virt-admin should be able to connect to various admin servers on hosted different daemons, we need to provide URI support to libvirt-admin.
-
由 Erik Skultety 提交于
As we plan to add more and more logic to remote connecting methods, these cannot be generated from admin_protocol.x anymore. Instead, this patch implements these to methods explicitly.
-
由 Erik Skultety 提交于
By moving the remote version into a separate module, we gain a slightly better maintainability in the long run than just by leaving it in one place with the existing libvirt-admin library which can start getting pretty messy later on.
-
由 Erik Skultety 提交于
Since most of our APIs rely on an acive functional connection to a daemon and we have such a mechanism in libvirt already, there's need to have such a way in libvirt-admin as well. By introducing a new public API, this patch provides support to check for an active connection.
-
由 Erik Skultety 提交于
This patch introduces virt-admin client which is based on virsh client, but had to reimplement several methods to meet virt-admin specific needs or remove unnecessary virsh specific logic.
-
由 Erik Skultety 提交于
Unfortunately, client side version retrieval API virGetVersion uses one-time initialization (due to the fact we might not have initialized the library by calling connect prior to this) which is not completely compatible with admin initialization. This API is rather simplistic and reimplementing it for admin might be the preferred method of reusing it. Note that even though the method will be reimplemented, the version number is still the same for both the libvirt and libvirt-admin library.
-
由 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.
-
由 Erik Skultety 提交于
Since libvirt-admin is a separate library, it should also have a separate config file. Available settings are currently the same as for libvirt.conf.
-
由 Erik Skultety 提交于
As it turned out, we need to share some enums and declarations between libvirt.h and libvirt-admin.h, but since our policy forbids direct includes of libvirt*.h, there has to be some header exempt from this rule. This patch moves the relevant part of code from libvirt.h.in to libvirt-common.h.in. Moreover, since there is no need to have libvirt.h generated anymore, introduce a new header libvirt.h which was previosly ignored from git and make the common header ignored and generated instead.
-
- 27 11月, 2015 8 次提交
-
-
由 Marc-André Lureau 提交于
Check if virtio-gpu provides virgl option, and add qemu command line formatter. It is enabled with the existing accel3d attribute: <model type='virtio' heads='1'> <acceleration accel3d='yes'/> </model> Signed-off-by: NMarc-André Lureau <marcandre.lureau@gmail.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Marc-André Lureau 提交于
qemu 2.5 provides virtio video device. It can be used with -device virtio-vga for primary devices, or -device virtio-gpu for non-vga devices. However, only the primary device (VGA) is supported with this patch. Reference: https://bugzilla.redhat.com/show_bug.cgi?id=1195176Signed-off-by: NMarc-André Lureau <marcandre.lureau@gmail.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Marc-André Lureau 提交于
Allowing to have the extra undefined/default state. Signed-off-by: NMarc-André Lureau <marcandre.lureau@gmail.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Marc-André Lureau 提交于
Following the domain XML naming Signed-off-by: NMarc-André Lureau <marcandre.lureau@gmail.com>
-
由 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>
-
由 Martin Kletzander 提交于
The rule for virrotatingfiletest was defined in DBUS-only block even though the test does not use DBus at all. Also DBUS_CFLAGS and DBUS_LIBS are removed from the rules. The original error was: /usr/lib/gcc/x86_64-pc-linux-gnu/5.2.0/../../../../lib64/Scrt1.o: In function `_start': (.text+0x20): undefined reference to `main' Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Daniel P. Berrange 提交于
The libvirt_logd.aug and test_libvirt_logd.aug.in files have never existed so shouldn't be in EXTRA_DIST. It was a copy+paste mistake when closing virtlogd from virtlockd Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
With some versions of GLibC / GCC, a variable called 'daemon' will result in a warning about clashing with the function also named 'daemon'. Rename it to 'dmn' to avoid the clash. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-