Re: [libvirt] [openstack-dev] [nova] The risk of hanging when shutdown instance.
by zhang bo
On 2015/3/28 18:06, Rui Chen wrote:
> Thank you for reply, Chris.
>
>
> 2015-03-27 23:15 GMT+08:00 Chris Friesen <chris.friesen(a)windriver.com <mailto:chris.friesen@windriver.com>>:
>
> On 03/26/2015 07:44 PM, Rui Chen wrote:
>
> Yes, you are right, but we found our instance hang at first dom.shutdown() call,
> if the dom.shutdown() don't return, there is no chance to execute dom.destroy(),
> right?
>
>
> Correct. The code is written assuming dom.shutdown() cannot block indefinitely.
>
> The libvirt docs at "https://libvirt.org/html/__libvirt-libvirt-domain.html#__virDomainShutdown <https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainShutdown>" say "...this command returns as soon as the shutdown request is issued rather than blocking until the guest is no longer running."
>
> If dom.shutdown() blocks indefinitely, then that's a libvirt bug.
>
>
> Chris
The API virDomainShutdown's description is out of date, it's not correct.
In fact, virDomainShutdown would block or not, depending on its mode. If it's in mode *agent*, then it would be blocked until qemu founds that the guest actually got down.
Otherwise, if it's in mode *acpi*, then it would return immediately.
Thus, maybe further more work need to be done in Openstack.
What's your opinions, Michal and Daniel (from libvirt.org), and Chris (from openstack.org) :)
9 years, 7 months
[libvirt] [PATCHv2.5 00/10] Add support for memory hotplug
by Peter Krempa
Rebased version after changes to the prequel series.
This applies on top of http://www.redhat.com/archives/libvir-list/2015-March/msg00134.html
Convenience branch to pull from:
git fetch git://pipo.sk/pipo/libvirt.git memory-hotplug-2.5
Peter Krempa (10):
conf: Add support for parsing and formatting max memory and slot count
qemu: Implement setup of memory hotplug parameters
conf: Add device address type for dimm devices
conf: Add interface to parse and format memory device information
qemu: memdev: Add infrastructure to load memory device information
qemu: migration: Forbid migration with memory modules lacking info
qemu: add support for memory devices
qemu: conf: Add support for memory device cold(un)plug
qemu: Implement memory device hotplug
qemu: Implement memory device hotunplug
docs/formatdomain.html.in | 98 ++++
docs/schemas/domaincommon.rng | 76 +++
src/bhyve/bhyve_domain.c | 9 +-
src/conf/domain_conf.c | 564 ++++++++++++++++++++-
src/conf/domain_conf.h | 60 +++
src/libvirt_private.syms | 7 +
src/libxl/libxl_domain.c | 8 +
src/lxc/lxc_domain.c | 8 +
src/openvz/openvz_driver.c | 14 +-
src/parallels/parallels_driver.c | 6 +-
src/phyp/phyp_driver.c | 6 +-
src/qemu/qemu_command.c | 166 +++++-
src/qemu/qemu_command.h | 15 +
src/qemu/qemu_domain.c | 80 +++
src/qemu/qemu_domain.h | 5 +
src/qemu/qemu_driver.c | 29 ++
src/qemu/qemu_hotplug.c | 177 +++++++
src/qemu/qemu_hotplug.h | 6 +
src/qemu/qemu_migration.c | 14 +
src/qemu/qemu_monitor.c | 42 ++
src/qemu/qemu_monitor.h | 14 +
src/qemu/qemu_monitor_json.c | 122 +++++
src/qemu/qemu_monitor_json.h | 5 +
src/qemu/qemu_process.c | 4 +
src/uml/uml_driver.c | 9 +-
src/vbox/vbox_common.c | 6 +-
src/vmware/vmware_driver.c | 6 +-
src/vmx/vmx.c | 6 +-
src/xen/xen_driver.c | 7 +
src/xenapi/xenapi_driver.c | 9 +-
tests/domainschemadata/maxMemory.xml | 19 +
.../qemuxml2argv-memory-hotplug-dimm.args | 11 +
.../qemuxml2argv-memory-hotplug-dimm.xml | 50 ++
.../qemuxml2argv-memory-hotplug-nonuma.xml | 22 +
.../qemuxml2argv-memory-hotplug.args | 6 +
.../qemuxml2argv-memory-hotplug.xml | 34 ++
tests/qemuxml2argvtest.c | 6 +
tests/qemuxml2xmltest.c | 4 +
38 files changed, 1707 insertions(+), 23 deletions(-)
create mode 100644 tests/domainschemadata/maxMemory.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-memory-hotplug-dimm.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-memory-hotplug-dimm.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-memory-hotplug-nonuma.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-memory-hotplug.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-memory-hotplug.xml
--
2.2.2
9 years, 7 months
[libvirt] [PATCH 0/3] Fix some storage issues
by John Ferlan
Patch 1 & 3 are bz based, while Patch 2 was determined while working on
Patch 3. Details in each commit message
John Ferlan (3):
storage: Fix issues in storageVolResize
storage: Need to update freeExtent at delete primary partition
storage: Don't duplicate efforts of backend driver
src/storage/storage_backend_disk.c | 9 +++--
src/storage/storage_driver.c | 67 ++++++++++++++++++++++++++++++--------
2 files changed, 59 insertions(+), 17 deletions(-)
--
2.1.0
9 years, 7 months
[libvirt] securityselinuxlabeltest test fails on v1.2.5
by Scott Sullivan
I am trying to build v1.2.5-maint, however I have one test failing
causing the build to fail:
TEST: securityselinuxlabeltest
!!!. 4 FAIL
PASS: virsh-undefine
=======================================
1 of 112 tests failed
Please report to libvir-list(a)redhat.com
=======================================
make[2]: *** [check-TESTS] Error 1
make[2]: Leaving directory `/home/rpmbuild/packages/libvirt/tests'
make[1]: *** [check-am] Error 2
make[1]: Leaving directory `/home/rpmbuild/packages/libvirt/tests'
make: *** [check-recursive] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.UGNUaq (%build)
Is anyone else having this problem? Im building on CentOS 6.5. Im happy
to provide any further information as needed.
9 years, 7 months
[libvirt] [PATCH v2 0/3] A few NUMA fixes
by Michal Privoznik
diff to v1:
-reworked to follow Jan's review. Hopefully.
Michal Privoznik (3):
vircgroup: Introduce virCgroupControllerAvailable
qemuProcessHook: Call virNuma*() iff needed
virLXCControllerSetupResourceLimits: Call virNuma*() iff needed
src/libvirt_private.syms | 1 +
src/lxc/lxc_controller.c | 22 ++++++++++++++++------
src/qemu/qemu_process.c | 21 +++++++++++++++++----
src/util/vircgroup.c | 19 +++++++++++++++++++
src/util/vircgroup.h | 1 +
tests/vircgrouptest.c | 31 +++++++++++++++++++++++++++++++
6 files changed, 85 insertions(+), 10 deletions(-)
--
2.0.5
9 years, 7 months
[libvirt] [PATCH 0/3] qemu: fix broken block job handling
by Peter Krempa
Block job handling violates our usage of domain jobs and changes disk source
definition behind our back.
Peter Krempa (3):
qemu: process: Export qemuProcessFindDomainDiskByAlias
qemu: event: Don't fiddle with disk backing trees without a job
qemu: Disallow concurrent block jobs on a single disk
src/conf/domain_conf.h | 1 +
src/qemu/qemu_domain.c | 23 +++++++
src/qemu/qemu_domain.h | 4 ++
src/qemu/qemu_driver.c | 170 +++++++++++++++++++++++++++++++++++++++++++-----
src/qemu/qemu_process.c | 131 +++++++------------------------------
src/qemu/qemu_process.h | 3 +
6 files changed, 211 insertions(+), 121 deletions(-)
--
2.2.2
9 years, 7 months
[libvirt] [PATCH 0/4] Various bugfixes for cancelled VM migrations
by Michael Chapman
This patch series contains fixes for several bugs I encountered while deliberately forcing a VM migration to abort by killing the libvirt client. My VM has storage on local disk, which needs to be mirrored during the migration, and this gives ample time for this abort to take place. The particular bug I encountered depended on precisely which phase the migration had made it to (e.g. whether disk mirroring had actually commenced).
Patch 1 fixes a crash on the destination libvirt daemon due to a use-after-free of the domain object. Patches 2 and 4 fix some bugs related to the close callback handling on the source libvirt side. Patch 3 ensures that the VM on the source libvirt does not get into an invalid state if its migration is aborted during disk mirroring.
All patches are independent of one another and can be applied separately.
Michael Chapman (4):
qemu: fix crash in qemuProcessAutoDestroy
qemu: fix error propagation in qemuMigrationBegin
qemu: fix race between disk mirror fail and cancel
util: fix removal of callbacks in virCloseCallbacksRun
src/qemu/qemu_domain.c | 5 +++++
src/qemu/qemu_migration.c | 12 +++++++++++-
src/qemu/qemu_process.c | 4 +++-
src/util/virclosecallbacks.c | 10 ++++++----
4 files changed, 25 insertions(+), 6 deletions(-)
--
2.1.0
9 years, 7 months
[libvirt] [PATCH 0/2] fail out if enable userns but disable netns
by Chen Hanxiao
Chen Hanxiao (2):
Revert "LXC: create a bind mount for sysfs when enable userns but
disable netns"
LXC: make sure netns been enabled when trying to enable userns
src/lxc/lxc_container.c | 45 ++++++++++++++++-----------------------------
1 file changed, 16 insertions(+), 29 deletions(-)
--
2.1.0
9 years, 7 months
[libvirt] [RFC PATCH 0/2] Vbox: Add support for virDomainSendKey
by Dawid Zamirski
Hello,
Those small patches implement virDomainSendKey support in VBOX driver. However,
the VBOX SDK does not support "holdtime" so I used usleep to wait for that time
before sending "key-up" scancodes. This makes it behave similarly to QEMU
driver, however I'm not sure if that way of handling this would be preferred.
Another option, would be to ignore holdtime argument and make virDomainSendKey
work the same as via VBoxManage cli tool where one has to send
"key-down" scancodes followed by "key-up" scancodes. For this RFC paches, I've
choosen to make it work as close to the public API documentation.
Dawid Zamirski (2):
vbox: Register IKeyboard with the unified API.
vbox: Implement virDomainSendKey
src/vbox/vbox_common.c | 107 ++++++++++++++++++++++++++++++++++++++++++
src/vbox/vbox_common.h | 1 +
src/vbox/vbox_tmpl.c | 27 +++++++++++
src/vbox/vbox_uniformed_api.h | 8 ++++
4 files changed, 143 insertions(+)
--
2.3.3
9 years, 7 months
[libvirt] [libvirt-cmdref PATCH] Adding Documentation for cd
by Swaathi Ramesh
The documentation for command cd did not have information about the command. Added the required information.
---
source/cd.xml | 38 ++++++++++++++++++++++++++++++++++----
1 file changed, 34 insertions(+), 4 deletions(-)
diff --git a/source/cd.xml b/source/cd.xml
index 78a13df..d15c74c 100644
--- a/source/cd.xml
+++ b/source/cd.xml
@@ -9,16 +9,46 @@
</text>
</description>
- <options />
+ <options>
+ <parameter requirement="optional">
+ <keyword requirement="optional">--dir</keyword>
+ <value type="string" requirement="optional">path</value>
+ <description>
+ <text>
+ directory to switch to (default: home or else root)
+ </text>
+ <text>
+ --dir itself is optional
+ </text>
+ </description>
+ </parameter>
+ </options>
<availability from="0.7.0" />
<notes />
- <examples type="usage" />
+ <examples type="usage" >
+ <example>
+ <terminal>
+virsh # <bold> cd </bold> <value>/tmp</value> </terminal>
+ <text>
+ Changes the current working directory to <value> /tmp </value>
+ </text>
+ </example>
+ </examples>
<examples type="fullcontext" />
- <reference type="seealso" />
-
+ <reference type="seealso" >
+ <item>
+ <link type="internal" href="pwd"/>
+ <name>
+ pwd
+ </name>
+ <description>
+ Displays the current directory
+ </description>
+ </item>
+ </reference>
</command>
--
1.9.1
9 years, 7 months