[libvirt] [glib PATCH v2 00/15] po: improve translation handling
by Daniel P. Berrangé
This applies the same improvements previously done in libvirt:
https://www.redhat.com/archives/libvir-list/2018-April/msg01004.html
https://www.berrange.com/posts/2018/11/29/improved-translation-po-file-ha...
The key problems with our current approach are:
- The pot & po files stored in GIT contain huge set of
annotations about source file names & line numbers.
These are out of date as soon as a change is commited
to git following a translation refresh. This makes
diffs impossible to meaningfully review, as they are
98% noise, 2% signal.
- The po file messages are sorted by source location,
so when we move code between files, or rename files,
the po file message order changes for no good reason.
This makes diffs even more impossible to review.
- The po files contain entries for all messages even
if most have no translation, bloating size of po/
data stored in git
- Whenever 'make dist' is run, it alters all the pot
and po files, so developers need to then reset their
content to match git HEAD manually. This is caused
by having auto-generated content (source file locations)
mixed in with the static content (the actual translated
strings)
After this series, we only minimized po files in git, with
the redundated & outdated source locations info stripped.
This stripped info is re-added automatically during build
to create the real .po files, that we distribute, and/or
upload to translators in Zanata.
As a result the po directory is smaller in size, and
when refreshing from Zanata, we have git commits that
clearly show *only* the altered translations, nothing
else. The importance of this cannot be overstated - by
having these clear diffs when doing this change in libvirt,
I discovered a serious bug in the Zanata client that has
been screwing up translations in every project that uses
Zanata by adding bogus "fuzzy" annotations.
The particularly attractive statistic:
194 files changed, 2607 insertions(+), 14146 deletions(-)
Changed in v2:
- Fix a number of problems with VPATH builds
Daniel P. Berrangé (15):
po: provide custom make rules for po file management
po: remove language list from zanata configuration
po: add rules for integration with zanata
po: minimize & canonicalize translations stored in git
po: minimize af am anp ar as ast bal be bg bn_IN
po: minimize bn bo br brx bs ca cs cy da de_CH
po: minimize de el en_GB eo es et eu fa fi
po: minimize fr gl gu he hi hr hu ia
po: minimize id ilo is it ja ka kk km kn ko
po: minimize kw_GB kw@kkcor kw kw@uccor ky lt lv mai mk ml
po: minimize mn mr ms nb nds ne nl nn nso
po: minimize or pa pl pt_BR pt ro ru si sk sl
po: minimize sq sr@latin sr sv ta te tg th tr tw
po: minimize uk ur vi wba yo zh_CN zh_HK zh_TW zu
po: refresh translations from zanata
.gitignore | 11 +--
autogen.sh | 3 +-
build-aux/minimize-po.pl | 37 ++++++++
configure.ac | 8 +-
libvirt-gconfig/Makefile.am | 1 +
libvirt-glib.spec.in | 2 +-
libvirt-glib/Makefile.am | 1 +
libvirt-gobject/Makefile.am | 1 +
m4/virt-gettext.m4 | 5 --
m4/virt-nls.m4 | 45 ++++++++++
mingw-libvirt-glib.spec.in | 2 +-
po/Makefile.am | 111 +++++++++++++++++++++++
po/{POTFILES.in => POTFILES} | 0
po/README.md | 76 ++++++++++++++++
po/af.mini.po | 20 +++++
po/af.po | 153 --------------------------------
po/am.mini.po | 20 +++++
po/am.po | 153 --------------------------------
po/anp.mini.po | 19 ++++
po/anp.po | 152 -------------------------------
po/ar.mini.po | 21 +++++
po/ar.po | 154 --------------------------------
po/as.mini.po | 20 +++++
po/as.po | 153 --------------------------------
po/ast.mini.po | 20 +++++
po/ast.po | 153 --------------------------------
po/bal.mini.po | 20 +++++
po/bal.po | 153 --------------------------------
po/be.mini.po | 21 +++++
po/be.po | 154 --------------------------------
po/bg.mini.po | 20 +++++
po/bg.po | 153 --------------------------------
po/bn.mini.po | 20 +++++
po/bn.po | 153 --------------------------------
po/bn_IN.mini.po | 20 +++++
po/bn_IN.po | 153 --------------------------------
po/bo.mini.po | 20 +++++
po/bo.po | 153 --------------------------------
po/br.mini.po | 20 +++++
po/br.po | 153 --------------------------------
po/brx.mini.po | 20 +++++
po/brx.po | 153 --------------------------------
po/bs.mini.po | 21 +++++
po/bs.po | 154 --------------------------------
po/{ca.po => ca.mini.po} | 152 ++++++++++++-------------------
po/cs.mini.po | 119 +++++++++++++++++++++++++
po/cs.po | 155 --------------------------------
po/cy.mini.po | 21 +++++
po/cy.po | 154 --------------------------------
po/da.mini.po | 20 +++++
po/da.po | 153 --------------------------------
po/de.mini.po | 20 +++++
po/de.po | 153 --------------------------------
po/de_CH.mini.po | 20 +++++
po/de_CH.po | 153 --------------------------------
po/el.mini.po | 20 +++++
po/el.po | 153 --------------------------------
po/{en_GB.po => en_GB.mini.po} | 141 ++++++++++-------------------
po/eo.mini.po | 20 +++++
po/eo.po | 153 --------------------------------
po/{es.po => es.mini.po} | 153 ++++++++++++--------------------
po/et.mini.po | 20 +++++
po/et.po | 153 --------------------------------
po/eu.mini.po | 20 +++++
po/eu.po | 153 --------------------------------
po/fa.mini.po | 20 +++++
po/fa.po | 153 --------------------------------
po/fi.mini.po | 44 +++++++++
po/fi.po | 154 --------------------------------
po/{fr.po => fr.mini.po} | 157 +++++++++++++--------------------
po/gl.mini.po | 20 +++++
po/gl.po | 153 --------------------------------
po/gu.mini.po | 20 +++++
po/gu.po | 153 --------------------------------
po/he.mini.po | 20 +++++
po/he.po | 153 --------------------------------
po/{hi.po => hi.mini.po} | 141 ++++++++++-------------------
po/hr.mini.po | 21 +++++
po/hr.po | 154 --------------------------------
po/hu.mini.po | 20 +++++
po/hu.po | 153 --------------------------------
po/ia.mini.po | 20 +++++
po/ia.po | 153 --------------------------------
po/id.mini.po | 20 +++++
po/id.po | 153 --------------------------------
po/ilo.mini.po | 20 +++++
po/ilo.po | 153 --------------------------------
po/is.mini.po | 20 +++++
po/is.po | 153 --------------------------------
po/it.mini.po | 20 +++++
po/it.po | 153 --------------------------------
po/{ja.po => ja.mini.po} | 141 ++++++++++-------------------
po/ka.mini.po | 20 +++++
po/ka.po | 153 --------------------------------
po/kk.mini.po | 20 +++++
po/kk.po | 153 --------------------------------
po/km.mini.po | 20 +++++
po/km.po | 153 --------------------------------
po/kn.mini.po | 20 +++++
po/kn.po | 153 --------------------------------
po/ko.mini.po | 20 +++++
po/ko.po | 153 --------------------------------
po/kw.mini.po | 20 +++++
po/kw.po | 153 --------------------------------
po/kw(a)kkcor.mini.po | 20 +++++
po/kw(a)kkcor.po | 153 --------------------------------
po/kw(a)uccor.mini.po | 20 +++++
po/kw(a)uccor.po | 153 --------------------------------
po/kw_GB.mini.po | 20 +++++
po/kw_GB.po | 153 --------------------------------
po/ky.mini.po | 20 +++++
po/ky.po | 153 --------------------------------
po/lt.mini.po | 21 +++++
po/lt.po | 154 --------------------------------
po/lv.mini.po | 21 +++++
po/lv.po | 154 --------------------------------
po/mai.mini.po | 20 +++++
po/mai.po | 153 --------------------------------
po/mk.mini.po | 20 +++++
po/mk.po | 153 --------------------------------
po/ml.mini.po | 20 +++++
po/ml.po | 153 --------------------------------
po/mn.mini.po | 20 +++++
po/mn.po | 153 --------------------------------
po/mr.mini.po | 20 +++++
po/mr.po | 153 --------------------------------
po/ms.mini.po | 20 +++++
po/ms.po | 153 --------------------------------
po/nb.mini.po | 20 +++++
po/nb.po | 153 --------------------------------
po/nds.mini.po | 20 +++++
po/nds.po | 153 --------------------------------
po/ne.mini.po | 20 +++++
po/ne.po | 153 --------------------------------
po/nl.mini.po | 20 +++++
po/nl.po | 153 --------------------------------
po/nn.mini.po | 20 +++++
po/nn.po | 153 --------------------------------
po/nso.mini.po | 20 +++++
po/nso.po | 153 --------------------------------
po/or.mini.po | 20 +++++
po/or.po | 153 --------------------------------
po/pa.mini.po | 20 +++++
po/pa.po | 153 --------------------------------
po/{pl.po => pl.mini.po} | 152 ++++++++++++-------------------
po/pt.mini.po | 20 +++++
po/pt.po | 153 --------------------------------
po/{pt_BR.po => pt_BR.mini.po} | 141 ++++++++++-------------------
po/ro.mini.po | 21 +++++
po/ro.po | 154 --------------------------------
po/ru.mini.po | 26 ++++++
po/ru.po | 155 --------------------------------
po/si.mini.po | 20 +++++
po/si.po | 153 --------------------------------
po/sk.mini.po | 20 +++++
po/sk.po | 153 --------------------------------
po/sl.mini.po | 21 +++++
po/sl.po | 154 --------------------------------
po/sq.mini.po | 20 +++++
po/sq.po | 153 --------------------------------
po/sr.mini.po | 21 +++++
po/sr.po | 154 --------------------------------
po/sr(a)latin.mini.po | 21 +++++
po/sr(a)latin.po | 154 --------------------------------
po/sv.mini.po | 20 +++++
po/sv.po | 153 --------------------------------
po/ta.mini.po | 20 +++++
po/ta.po | 153 --------------------------------
po/te.mini.po | 20 +++++
po/te.po | 153 --------------------------------
po/tg.mini.po | 20 +++++
po/tg.po | 153 --------------------------------
po/th.mini.po | 20 +++++
po/th.po | 153 --------------------------------
po/tr.mini.po | 20 +++++
po/tr.po | 153 --------------------------------
po/tw.mini.po | 19 ++++
po/tw.po | 152 -------------------------------
po/{uk.po => uk.mini.po} | 152 ++++++++++++-------------------
po/ur.mini.po | 20 +++++
po/ur.po | 153 --------------------------------
po/vi.mini.po | 20 +++++
po/vi.po | 153 --------------------------------
po/wba.mini.po | 19 ++++
po/wba.po | 152 -------------------------------
po/yo.mini.po | 19 ++++
po/yo.po | 152 -------------------------------
po/zanata.xml | 99 ---------------------
po/zh_CN.mini.po | 20 +++++
po/zh_CN.po | 153 --------------------------------
po/zh_HK.mini.po | 20 +++++
po/zh_HK.po | 153 --------------------------------
po/zh_TW.mini.po | 20 +++++
po/zh_TW.po | 153 --------------------------------
po/zu.mini.po | 20 +++++
po/zu.po | 153 --------------------------------
196 files changed, 2609 insertions(+), 14149 deletions(-)
create mode 100755 build-aux/minimize-po.pl
delete mode 100644 m4/virt-gettext.m4
create mode 100644 m4/virt-nls.m4
create mode 100644 po/Makefile.am
rename po/{POTFILES.in => POTFILES} (100%)
create mode 100644 po/README.md
create mode 100644 po/af.mini.po
delete mode 100644 po/af.po
create mode 100644 po/am.mini.po
delete mode 100644 po/am.po
create mode 100644 po/anp.mini.po
delete mode 100644 po/anp.po
create mode 100644 po/ar.mini.po
delete mode 100644 po/ar.po
create mode 100644 po/as.mini.po
delete mode 100644 po/as.po
create mode 100644 po/ast.mini.po
delete mode 100644 po/ast.po
create mode 100644 po/bal.mini.po
delete mode 100644 po/bal.po
create mode 100644 po/be.mini.po
delete mode 100644 po/be.po
create mode 100644 po/bg.mini.po
delete mode 100644 po/bg.po
create mode 100644 po/bn.mini.po
delete mode 100644 po/bn.po
create mode 100644 po/bn_IN.mini.po
delete mode 100644 po/bn_IN.po
create mode 100644 po/bo.mini.po
delete mode 100644 po/bo.po
create mode 100644 po/br.mini.po
delete mode 100644 po/br.po
create mode 100644 po/brx.mini.po
delete mode 100644 po/brx.po
create mode 100644 po/bs.mini.po
delete mode 100644 po/bs.po
rename po/{ca.po => ca.mini.po} (62%)
create mode 100644 po/cs.mini.po
delete mode 100644 po/cs.po
create mode 100644 po/cy.mini.po
delete mode 100644 po/cy.po
create mode 100644 po/da.mini.po
delete mode 100644 po/da.po
create mode 100644 po/de.mini.po
delete mode 100644 po/de.po
create mode 100644 po/de_CH.mini.po
delete mode 100644 po/de_CH.po
create mode 100644 po/el.mini.po
delete mode 100644 po/el.po
rename po/{en_GB.po => en_GB.mini.po} (51%)
create mode 100644 po/eo.mini.po
delete mode 100644 po/eo.po
rename po/{es.po => es.mini.po} (59%)
create mode 100644 po/et.mini.po
delete mode 100644 po/et.po
create mode 100644 po/eu.mini.po
delete mode 100644 po/eu.po
create mode 100644 po/fa.mini.po
delete mode 100644 po/fa.po
create mode 100644 po/fi.mini.po
delete mode 100644 po/fi.po
rename po/{fr.po => fr.mini.po} (59%)
create mode 100644 po/gl.mini.po
delete mode 100644 po/gl.po
create mode 100644 po/gu.mini.po
delete mode 100644 po/gu.po
create mode 100644 po/he.mini.po
delete mode 100644 po/he.po
rename po/{hi.po => hi.mini.po} (62%)
create mode 100644 po/hr.mini.po
delete mode 100644 po/hr.po
create mode 100644 po/hu.mini.po
delete mode 100644 po/hu.po
create mode 100644 po/ia.mini.po
delete mode 100644 po/ia.po
create mode 100644 po/id.mini.po
delete mode 100644 po/id.po
create mode 100644 po/ilo.mini.po
delete mode 100644 po/ilo.po
create mode 100644 po/is.mini.po
delete mode 100644 po/is.po
create mode 100644 po/it.mini.po
delete mode 100644 po/it.po
rename po/{ja.po => ja.mini.po} (55%)
create mode 100644 po/ka.mini.po
delete mode 100644 po/ka.po
create mode 100644 po/kk.mini.po
delete mode 100644 po/kk.po
create mode 100644 po/km.mini.po
delete mode 100644 po/km.po
create mode 100644 po/kn.mini.po
delete mode 100644 po/kn.po
create mode 100644 po/ko.mini.po
delete mode 100644 po/ko.po
create mode 100644 po/kw.mini.po
delete mode 100644 po/kw.po
create mode 100644 po/kw(a)kkcor.mini.po
delete mode 100644 po/kw(a)kkcor.po
create mode 100644 po/kw(a)uccor.mini.po
delete mode 100644 po/kw(a)uccor.po
create mode 100644 po/kw_GB.mini.po
delete mode 100644 po/kw_GB.po
create mode 100644 po/ky.mini.po
delete mode 100644 po/ky.po
create mode 100644 po/lt.mini.po
delete mode 100644 po/lt.po
create mode 100644 po/lv.mini.po
delete mode 100644 po/lv.po
create mode 100644 po/mai.mini.po
delete mode 100644 po/mai.po
create mode 100644 po/mk.mini.po
delete mode 100644 po/mk.po
create mode 100644 po/ml.mini.po
delete mode 100644 po/ml.po
create mode 100644 po/mn.mini.po
delete mode 100644 po/mn.po
create mode 100644 po/mr.mini.po
delete mode 100644 po/mr.po
create mode 100644 po/ms.mini.po
delete mode 100644 po/ms.po
create mode 100644 po/nb.mini.po
delete mode 100644 po/nb.po
create mode 100644 po/nds.mini.po
delete mode 100644 po/nds.po
create mode 100644 po/ne.mini.po
delete mode 100644 po/ne.po
create mode 100644 po/nl.mini.po
delete mode 100644 po/nl.po
create mode 100644 po/nn.mini.po
delete mode 100644 po/nn.po
create mode 100644 po/nso.mini.po
delete mode 100644 po/nso.po
create mode 100644 po/or.mini.po
delete mode 100644 po/or.po
create mode 100644 po/pa.mini.po
delete mode 100644 po/pa.po
rename po/{pl.po => pl.mini.po} (62%)
create mode 100644 po/pt.mini.po
delete mode 100644 po/pt.po
rename po/{pt_BR.po => pt_BR.mini.po} (54%)
create mode 100644 po/ro.mini.po
delete mode 100644 po/ro.po
create mode 100644 po/ru.mini.po
delete mode 100644 po/ru.po
create mode 100644 po/si.mini.po
delete mode 100644 po/si.po
create mode 100644 po/sk.mini.po
delete mode 100644 po/sk.po
create mode 100644 po/sl.mini.po
delete mode 100644 po/sl.po
create mode 100644 po/sq.mini.po
delete mode 100644 po/sq.po
create mode 100644 po/sr.mini.po
delete mode 100644 po/sr.po
create mode 100644 po/sr(a)latin.mini.po
delete mode 100644 po/sr(a)latin.po
create mode 100644 po/sv.mini.po
delete mode 100644 po/sv.po
create mode 100644 po/ta.mini.po
delete mode 100644 po/ta.po
create mode 100644 po/te.mini.po
delete mode 100644 po/te.po
create mode 100644 po/tg.mini.po
delete mode 100644 po/tg.po
create mode 100644 po/th.mini.po
delete mode 100644 po/th.po
create mode 100644 po/tr.mini.po
delete mode 100644 po/tr.po
create mode 100644 po/tw.mini.po
delete mode 100644 po/tw.po
rename po/{uk.po => uk.mini.po} (65%)
create mode 100644 po/ur.mini.po
delete mode 100644 po/ur.po
create mode 100644 po/vi.mini.po
delete mode 100644 po/vi.po
create mode 100644 po/wba.mini.po
delete mode 100644 po/wba.po
create mode 100644 po/yo.mini.po
delete mode 100644 po/yo.po
create mode 100644 po/zh_CN.mini.po
delete mode 100644 po/zh_CN.po
create mode 100644 po/zh_HK.mini.po
delete mode 100644 po/zh_HK.po
create mode 100644 po/zh_TW.mini.po
delete mode 100644 po/zh_TW.po
create mode 100644 po/zu.mini.po
delete mode 100644 po/zu.po
--
2.20.1
6 years, 2 months
[libvirt] [PATCH v2] qemu: fix vcpupin fail as no vcpu tid set
by Yi Wang
vcpupin will fail when maxvcpus is larger than current
vcpu:
virsh vcpupin win7 --vcpu 0 --cpulist 5-6
error: Requested operation is not valid: cpu affinity is not supported
win7 xml in the command above is like below:
...
<vcpu current="3" placement="static">8</vcpu>
...
The reason is vcpu[3] and vcpu[4] have zero tids and should not been
compared as valid situation in qemuDomainRefreshVcpuInfo().
This issue is introduced by commit 34f7743, which fix recording of vCPU
pids for MTTCG.
Signed-off-by: Yi Wang <wang.yi59(a)zte.com.cn>
---
v2: stop considering zero TIDs as duplicate. Thanks to Jano.
---
src/qemu/qemu_domain.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index ac01e86..c70d3f3 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -10708,7 +10708,7 @@ qemuDomainRefreshVcpuInfo(virQEMUDriverPtr driver,
}
for (j = 0; j < i; j++) {
- if (info[i].tid == info[j].tid) {
+ if (0 != info[i].tid && info[i].tid == info[j].tid) {
VIR_DEBUG("vCPU[%zu] PID %llu duplicates vCPU[%zu]",
i, (unsigned long long)info[i].tid, j);
validTIDs = false;
--
1.8.3.1
6 years, 2 months
[libvirt] [tck PATCH] Don't set a default value for ostype
by Daniel P. Berrangé
We must leave ostype undefined by default so that we can auto-detect the
right ostype based on reported capabilities. This fixes the ability to
run tests with the LXC driver previously broken in
commit c1af9677491d41c8d7a6cc741674e234796de6d0
Author: Daniel P. Berrange <berrange(a)redhat.com>
Date: Thu Mar 27 11:57:14 2014 +0000
Change 'Sys::Virt::TCK::generic_domain' to take named params
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
lib/Sys/Virt/TCK.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/Sys/Virt/TCK.pm b/lib/Sys/Virt/TCK.pm
index f715ee1..389d5cc 100644
--- a/lib/Sys/Virt/TCK.pm
+++ b/lib/Sys/Virt/TCK.pm
@@ -919,7 +919,7 @@ sub generic_domain {
my %params = @_;
my $name = exists $params{name} ? $params{name} : "tck";
- my $ostype = exists $params{ostype} ? $params{ostype} : "hvm";
+ my $ostype = exists $params{ostype} ? $params{ostype} : undef;
my $fullos = exists $params{fullos} ? $params{fullos} : 0;
my $netmode = exists $params{netmode} ? $params{netmode} : undef;
my $shareddisk = exists $params{shareddisk} ? $params{shareddisk} : 0;
--
2.20.1
6 years, 2 months
[libvirt] [PATCH 0/6] lxc: Clean up lxcNetworkWalkCallback() method.
by Julio Faracco
This series has a lots of cleanups to prepare lxc to handle network
settings for verion 3.0 or higher. The new version is considering
network indexes to define network interfaces. i.e.: "lxc.net.X.".
As we need modular structures to support both versions, this method
needs a cleanup before accepting new features for version 3.
Obs: this version does not include any new feature for LXC 3.0 network.
Julio Faracco (6):
lxc: Create a separate method to handle IPv{4,6} outside parser.
lxc: Create a new method called lxcNetworkParseDataEntry().
lxc: Converting full string entries in types only.
lxc: Refactoring lxcNetworkWalkCallback() to a simple method.
lxc: Create a method to initialize network data outisde.
lxc: Converting 'if,else' logic into a 'switch,case'.
src/lxc/lxc_native.c | 184 +++++++++++++++++++++++++++++--------------
src/lxc/lxc_native.h | 17 ++++
2 files changed, 141 insertions(+), 60 deletions(-)
--
2.19.1
6 years, 2 months
[libvirt] [PATCH] util: json: Nuke strings when freeing JSON objects
by Peter Krempa
We construct JSON objects e.g. for setting the VNC password but then
just VIR_FREE the strings cointained inside. If it was the password
string would be kept on the heap. Exchange some cpu cycles for a warm
feeling of security.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/util/virjson.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util/virjson.c b/src/util/virjson.c
index d5d66f879f..db38fd0dc0 100644
--- a/src/util/virjson.c
+++ b/src/util/virjson.c
@@ -423,7 +423,7 @@ virJSONValueFree(virJSONValuePtr value)
VIR_FREE(value->data.array.values);
break;
case VIR_JSON_TYPE_STRING:
- VIR_FREE(value->data.string);
+ VIR_DISPOSE_STRING(value->data.string);
break;
case VIR_JSON_TYPE_NUMBER:
VIR_FREE(value->data.number);
--
2.20.1
6 years, 2 months
[libvirt] [PATCH 0/2] fix snapshot --redefine bugs (incremental backup saga)
by Eric Blake
I ran into these while trying to debug my additions of bulk
dumpxml/redefine for use with both snapshots and checkpoints.
It is a long-standing bug (a fact not made any nicer by our delay
in implementing revert to external snapshots, oh well), but one
that has escaped notice until now.
Eric Blake (2):
snapshot: Permit redefine of offline external snapshot
qemu: Fix snapshot redefine vs. domain state bug
src/conf/snapshot_conf.c | 11 ++--
src/qemu/qemu_driver.c | 117 ++++++++++++++++++++++++---------------
2 files changed, 76 insertions(+), 52 deletions(-)
--
2.20.1
6 years, 2 months
[libvirt] [PATCH] qemu: fix vcpupin fail as no vcpu tid set
by Wen Yang
From: Yi Wang <wang.yi59(a)zte.com.cn>
vcpupin will fail when maxvcpus is larger than current
vcpu:
virsh vcpupin win7 --vcpu 0 --cpulist 5-6
error: Requested operation is not valid: cpu affinity is not supported
win7 xml in the command above is like below:
...
<vcpu current="3" placement="static">8</vcpu>
...
This issue is caused by qemuDomainRefreshVcpuInfo(), which mistake to
make validTIDs false and not set vcpu tid because vcpu[3] and vcpu[4]
have duplicate zero tids.
This patch fix this.
Signed-off-by: Yi Wang <wang.yi59(a)zte.com.cn>
---
src/qemu/qemu_domain.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index ac01e86..6987550 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -10701,6 +10701,9 @@ qemuDomainRefreshVcpuInfo(virQEMUDriverPtr driver,
* impl which we can support.
*/
for (i = 0; i < maxvcpus && validTIDs; i++) {
+ if (vm->def->virtType != VIR_DOMAIN_VIRT_QEMU)
+ break;
+
if (info[i].tid == vm->pid) {
VIR_DEBUG("vCPU[%zu] PID %llu duplicates process",
i, (unsigned long long)info[i].tid);
--
1.8.3.1
6 years, 2 months
[libvirt] [PATCH 0/4] util: Few more VIR_AUTO... related cleanups
by Peter Krempa
Document that VIR_AUTOPTR should not be used with vectors ...
Peter Krempa (4):
util: alloc: Remove pointless clearing of variable in AUTOPTR_FUNCs
util: alloc: Introduce macro for self-freeing NULL-terminated lists
util: string: Use VIR_AUTOLISTPTR for 'virString'
util: alloc: Note that VIR_AUTOPTR/VIR_AUTOCLEAN must not be used with
vectors
src/lxc/lxc_process.c | 2 +-
src/qemu/qemu_conf.c | 8 +--
src/storage/storage_backend_sheepdog.c | 4 +-
src/storage/storage_backend_zfs.c | 10 ++--
src/util/viralloc.h | 70 +++++++++++++++++++++++++-
src/util/vircommand.c | 2 +-
src/util/virfirewall.c | 2 +-
src/util/virprocess.c | 2 +-
src/util/virstoragefile.c | 10 ++--
src/util/virstring.h | 2 +-
src/xenconfig/xen_common.c | 6 +--
11 files changed, 93 insertions(+), 25 deletions(-)
--
2.20.1
6 years, 2 months
[libvirt] [dockerfiles PATCH] refresh: Adapt to recent lcitool changes
by Andrea Bolognani
lcitool uses argparse subparsers and positional parameters now,
so we need to make sure we invoke it appropriately.
This is needed since libvirt-jenkins-ci commit bfb9d96664f0.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
Pushed as trivial.
refresh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/refresh b/refresh
index 922abcf..701d2af 100755
--- a/refresh
+++ b/refresh
@@ -14,7 +14,7 @@ cd "$ci_repo/guests/" >/dev/null 2>&1 || {
die "Usage: $me path/to/libvirt-jenkins-ci.git"
}
-for host in $(./lcitool -a hosts)
+for host in $(./lcitool hosts)
do
projects="libvirt"
dockerfile="$here/buildenv-${host#libvirt-}.Dockerfile"
@@ -24,7 +24,7 @@ do
libvirt-freebsd-*) continue ;;
esac
- ./lcitool -a dockerfile -h "$host" -p "$projects" >"$dockerfile" || {
+ ./lcitool dockerfile "$host" "$projects" >"$dockerfile" || {
die "$me: Failed to refresh Dockerfile for $host"
}
done
--
2.20.1
6 years, 2 months