[PATCH] libxl: enable Xen's e820_host setting
by Jim Fehlig
Hotplugging PCI devices to Xen PV guests is only possible if the
libxl_domain_build_info struct has the e820_host field enabled when the
guest is created. By default it is disabled but libxl will automatically
enable e820_host if the config contains one or more PCI devices, in which
case hotplugging additional PCI devices later works.
According to xl.cfg(5) man page it is safe to unconditionally enable the
PV-only e820_host setting. Furthermore xen.git commits 414979ba85 and
f92337d949, which introduce the setting with a default of disabled, claim
the setting can be enabled or even removed "once the auto-ballooning of
guests with PCI devices works". Those commits are from May 2011 so I
think it is safe to say the issues have been resolved in the meantime.
Regardless, we should avoid exposing a Xen setting in libvirt that could
be removed later.
Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
---
See related thread on the ML
https://www.redhat.com/archives/libvir-list/2020-April/msg00376.html
src/libxl/libxl_conf.c | 5 +++++
tests/libxlxml2domconfigdata/basic-pv.json | 3 ++-
tests/libxlxml2domconfigdata/multiple-ip.json | 3 ++-
3 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
index be5fc505fe..f6280157fb 100644
--- a/src/libxl/libxl_conf.c
+++ b/src/libxl/libxl_conf.c
@@ -288,6 +288,11 @@ libxlMakeDomBuildInfo(virDomainDefPtr def,
#endif
} else {
libxl_domain_build_info_init_type(b_info, LIBXL_DOMAIN_TYPE_PV);
+ /*
+ * e820_host is a PV-only setting and according to xl.cfg(5) it
+ * should be safe to unconditionally enable it.
+ */
+ libxl_defbool_set(&b_info->u.pv.e820_host, true);
}
b_info->max_vcpus = virDomainDefGetVcpusMax(def);
diff --git a/tests/libxlxml2domconfigdata/basic-pv.json b/tests/libxlxml2domconfigdata/basic-pv.json
index b71c3b0f49..2cb95feff8 100644
--- a/tests/libxlxml2domconfigdata/basic-pv.json
+++ b/tests/libxlxml2domconfigdata/basic-pv.json
@@ -19,7 +19,8 @@
},
"type.pv": {
- "bootloader": "pygrub"
+ "bootloader": "pygrub",
+ "e820_host": "True"
},
"arch_arm": {
diff --git a/tests/libxlxml2domconfigdata/multiple-ip.json b/tests/libxlxml2domconfigdata/multiple-ip.json
index 2db98b82f6..01bb169cdc 100644
--- a/tests/libxlxml2domconfigdata/multiple-ip.json
+++ b/tests/libxlxml2domconfigdata/multiple-ip.json
@@ -19,7 +19,8 @@
},
"type.pv": {
- "bootloader": "pygrub"
+ "bootloader": "pygrub",
+ "e820_host": "True"
},
"arch_arm": {
--
2.26.0
4 years, 8 months
[PATCH v2 0/4] libxl: add e820_host option to the libvirt config
by Marek Marczykowski-Górecki
Context:
- old thread on xen-devel: http://xen.markmail.org/thread/awcswnywzei4s65e
- new thread here: https://www.redhat.com/archives/libvir-list/2020-April/msg00447.html
Marek Marczykowski-Górecki (4):
conf: add xen specific feature: e820_host
libxl: make use of e820_host feature
xenconfig: parse e820_host option
tests: check e820_host option handling
docs/formatdomain.html.in | 20 ++++-
docs/schemas/domaincommon.rng | 16 +++-
src/conf/domain_conf.c | 102 ++++++++++++++++++-
src/conf/domain_conf.h | 9 ++-
src/libxl/libxl_conf.c | 14 ++-
src/libxl/xen_common.c | 13 ++-
src/qemu/qemu_validate.c | 1 +-
tests/xlconfigdata/test-paravirt-e820_host.cfg | 13 ++-
tests/xlconfigdata/test-paravirt-e820_host.xml | 37 +++++++-
tests/xlconfigtest.c | 1 +-
10 files changed, 226 insertions(+)
create mode 100644 tests/xlconfigdata/test-paravirt-e820_host.cfg
create mode 100644 tests/xlconfigdata/test-paravirt-e820_host.xml
base-commit: 7118bdee1550b6022e7362402ca8204add4cf80b
--
git-series 0.9.1
4 years, 8 months
[PATCH 0/2] backup: Fix docs and add schema for LUKS encrypted backups
by Peter Krempa
Peter Krempa (2):
docs: backup: Remove references to push backup to network disk
backup: Allow 'encryption' of backups and scratch images
docs/formatbackup.html.in | 19 ++++--
docs/schemas/domainbackup.rng | 65 +++++++++++++++----
.../backup-pull-encrypted.xml | 30 +++++++++
.../backup-push-encrypted.xml | 29 +++++++++
.../backup-pull-encrypted.xml | 30 +++++++++
.../backup-push-encrypted.xml | 29 +++++++++
tests/genericxml2xmltest.c | 3 +
7 files changed, 187 insertions(+), 18 deletions(-)
create mode 100644 tests/domainbackupxml2xmlin/backup-pull-encrypted.xml
create mode 100644 tests/domainbackupxml2xmlin/backup-push-encrypted.xml
create mode 100644 tests/domainbackupxml2xmlout/backup-pull-encrypted.xml
create mode 100644 tests/domainbackupxml2xmlout/backup-push-encrypted.xml
--
2.26.0
4 years, 8 months
[libvirt PATCH] README: rewrite in rst
by Ján Tomko
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
---
README | 2 +-
README.md => README.rst | 53 +++++++++++++++++++++--------------------
2 files changed, 28 insertions(+), 27 deletions(-)
rename README.md => README.rst (65%)
diff --git a/README b/README
index 42061c01a1..92cacd2853 120000
--- a/README
+++ b/README
@@ -1 +1 @@
-README.md
\ No newline at end of file
+README.rst
\ No newline at end of file
diff --git a/README.md b/README.rst
similarity index 65%
rename from README.md
rename to README.rst
index 44b0dd87c5..222ba55e78 100644
--- a/README.md
+++ b/README.rst
@@ -1,6 +1,11 @@
-[![Build Status](https://travis-ci.org/libvirt/libvirt.svg)](https://travis-ci.org...
- [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/355/badg...
+.. image:: https://travis-ci.org/libvirt/libvirt.svg
+ :alt: Build Status
+ :target: https://travis-ci.org/libvirt/libvirt
+.. image:: https://bestpractices.coreinfrastructure.org/projects/355/badge
+ :alt: CII Best Practices
+ :target: https://bestpractices.coreinfrastructure.org/projects/355
+==============================
Libvirt API for virtualization
==============================
@@ -21,60 +26,56 @@ mappings into object systems such as GObject, CIM and SNMP.
Further information about the libvirt project can be found on the
website:
-[https://libvirt.org](https://libvirt.org)
+https://libvirt.org
License
--------
+=======
The libvirt C API is distributed under the terms of GNU Lesser General
Public License, version 2.1 (or later). Some parts of the code that are
not part of the C library may have the more restrictive GNU General
-Public License, version 2.0 (or later). See the files `COPYING.LESSER`
-and `COPYING` for full license terms & conditions.
+Public License, version 2.0 (or later). See the files ``COPYING.LESSER``
+and ``COPYING`` for full license terms & conditions.
Installation
-------------
+============
Libvirt uses the GNU Autotools build system, so in general can be built
and installed with the usual commands, however, we mandate to have the
build directory different than the source directory. For example, to build
-in a manner that is suitable for installing as root, use:
+in a manner that is suitable for installing as root, use::
-```
-$ mkdir build && cd build
-$ ../configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
-$ make
-$ sudo make install
-```
+ $ mkdir build && cd build
+ $ ../configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
+ $ make
+ $ sudo make install
-While to build & install as an unprivileged user
+While to build & install as an unprivileged user::
-```
-$ mkdir build && cd build
-$ ../configure --prefix=$HOME/usr
-$ make
-$ make install
-```
+ $ mkdir build && cd build
+ $ ../configure --prefix=$HOME/usr
+ $ make
+ $ make install
The libvirt code relies on a large number of 3rd party libraries. These will
-be detected during execution of the `configure` script and a summary printed
+be detected during execution of the ``configure`` script and a summary printed
which lists any missing (optional) dependencies.
Contributing
-------------
+============
The libvirt project welcomes contributions in many ways. For most components
the best way to contribute is to send patches to the primary development
mailing list. Further guidance on this can be found on the website:
-[https://libvirt.org/contribute.html](https://libvirt.org/contribute.html)
+https://libvirt.org/contribute.html
Contact
--------
+=======
The libvirt project has two primary mailing lists:
@@ -83,4 +84,4 @@ The libvirt project has two primary mailing lists:
Further details on contacting the project are available on the website:
-[https://libvirt.org/contact.html](https://libvirt.org/contact.html)
+https://libvirt.org/contact.html
--
2.25.1
4 years, 8 months
[libvirt PATCH] Convert all remaining Markdown files to reStructuredText
by Andrea Bolognani
We've adopted reStructuredText as the primary markup language for
our documentation and, given that both GitLab and GitHub can render
documents in this format just fine, it makes sense to get rid of
the few last remaining bits of Markdown and standardize on
reStructuredText across the board.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
Note that I've taken a few liberties during the conversion when it
comes to formatting, with the goal of staying close to the style
used for existing reStructuredText documents, but I have not altered
the contents beyond that.
ABOUT-NLS | 2 +-
Makefile.am | 2 +-
README | 2 +-
README.md => README.rst | 55 ++++++++++++-----------
docs/Makefile.am | 2 +-
docs/fonts/{LICENSE.md => LICENSE.rst} | 30 +++++++++----
libvirt.spec.in | 2 +-
po/{README.md => README.rst} | 32 ++++++++-----
tools/wireshark/{README.md => README.rst} | 28 ++++++++----
9 files changed, 97 insertions(+), 58 deletions(-)
rename README.md => README.rst (65%)
rename docs/fonts/{LICENSE.md => LICENSE.rst} (94%)
rename po/{README.md => README.rst} (86%)
rename tools/wireshark/{README.md => README.rst} (52%)
diff --git a/ABOUT-NLS b/ABOUT-NLS
index b583e276a7..91a3266ed6 120000
--- a/ABOUT-NLS
+++ b/ABOUT-NLS
@@ -1 +1 @@
-po/README.md
\ No newline at end of file
+po/README.rst
\ No newline at end of file
diff --git a/Makefile.am b/Makefile.am
index 5590c88e4d..06475344c1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -43,7 +43,7 @@ EXTRA_DIST = \
autogen.sh \
GNUmakefile \
run.in \
- README.md \
+ README.rst \
AUTHORS.in \
scripts/apibuild.py \
scripts/augeas-gentest.py \
diff --git a/README b/README
index 42061c01a1..92cacd2853 120000
--- a/README
+++ b/README
@@ -1 +1 @@
-README.md
\ No newline at end of file
+README.rst
\ No newline at end of file
diff --git a/README.md b/README.rst
similarity index 65%
rename from README.md
rename to README.rst
index 44b0dd87c5..663fba4510 100644
--- a/README.md
+++ b/README.rst
@@ -1,6 +1,9 @@
-[![Build Status](https://travis-ci.org/libvirt/libvirt.svg)](https://travis-ci.org...
- [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/355/badg...
+.. image:: https://travis-ci.org/libvirt/libvirt.svg
+ :alt: Travis CI Build Status
+.. image:: https://bestpractices.coreinfrastructure.org/projects/355/badge
+ :alt: CII Best Practices
+==============================
Libvirt API for virtualization
==============================
@@ -21,66 +24,66 @@ mappings into object systems such as GObject, CIM and SNMP.
Further information about the libvirt project can be found on the
website:
-[https://libvirt.org](https://libvirt.org)
+https://libvirt.org
License
--------
+=======
The libvirt C API is distributed under the terms of GNU Lesser General
Public License, version 2.1 (or later). Some parts of the code that are
not part of the C library may have the more restrictive GNU General
-Public License, version 2.0 (or later). See the files `COPYING.LESSER`
-and `COPYING` for full license terms & conditions.
+Public License, version 2.0 (or later). See the files ``COPYING.LESSER``
+and ``COPYING`` for full license terms & conditions.
Installation
-------------
+============
Libvirt uses the GNU Autotools build system, so in general can be built
and installed with the usual commands, however, we mandate to have the
build directory different than the source directory. For example, to build
in a manner that is suitable for installing as root, use:
-```
-$ mkdir build && cd build
-$ ../configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
-$ make
-$ sudo make install
-```
+::
+
+ $ mkdir build && cd build
+ $ ../configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
+ $ make
+ $ sudo make install
While to build & install as an unprivileged user
-```
-$ mkdir build && cd build
-$ ../configure --prefix=$HOME/usr
-$ make
-$ make install
-```
+::
+
+ $ mkdir build && cd build
+ $ ../configure --prefix=$HOME/usr
+ $ make
+ $ make install
The libvirt code relies on a large number of 3rd party libraries. These will
-be detected during execution of the `configure` script and a summary printed
+be detected during execution of the ``configure`` script and a summary printed
which lists any missing (optional) dependencies.
Contributing
-------------
+============
The libvirt project welcomes contributions in many ways. For most components
the best way to contribute is to send patches to the primary development
mailing list. Further guidance on this can be found on the website:
-[https://libvirt.org/contribute.html](https://libvirt.org/contribute.html)
+https://libvirt.org/contribute.html
Contact
--------
+=======
The libvirt project has two primary mailing lists:
- * libvirt-users(a)redhat.com (**for user discussions**)
- * libvir-list(a)redhat.com (**for development only**)
+* libvirt-users(a)redhat.com (**for user discussions**)
+* libvir-list(a)redhat.com (**for development only**)
Further details on contacting the project are available on the website:
-[https://libvirt.org/contact.html](https://libvirt.org/contact.html)
+https://libvirt.org/contact.html
diff --git a/docs/Makefile.am b/docs/Makefile.am
index 404121a2a2..6860efc888 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -118,7 +118,7 @@ javascriptdir = $(HTML_DIR)/js
javascript_DATA = $(javascript)
fonts = \
- fonts/LICENSE.md \
+ fonts/LICENSE.rst \
fonts/stylesheet.css \
fonts/overpass-bold-italic.woff \
fonts/overpass-bold.woff \
diff --git a/docs/fonts/LICENSE.md b/docs/fonts/LICENSE.rst
similarity index 94%
rename from docs/fonts/LICENSE.md
rename to docs/fonts/LICENSE.rst
index 9520f30f73..4e32b1a1d3 100644
--- a/docs/fonts/LICENSE.md
+++ b/docs/fonts/LICENSE.rst
@@ -1,18 +1,24 @@
-## License
+=======
+License
+=======
Copyright (C) 2015 Red Hat, Inc.,
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
+
http://scripts.sil.org/OFL
-#### SIL OPEN FONT LICENSE
+=====================
+SIL OPEN FONT LICENSE
+=====================
+
Version 1.1 - 26 February 2007
----
+PREAMBLE
+========
-#### PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide development
of collaborative font projects, to support the font creation efforts of
academic and linguistic communities, and to provide a free and open framework
@@ -27,7 +33,9 @@ any other type of license. The requirement for fonts to remain under this
license does not apply to any document created using the fonts or their
derivatives.
-#### DEFINITIONS
+DEFINITIONS
+===========
+
“Font Software” refers to the set of files released by the Copyright Holder(s)
under this license and clearly marked as such. This may include source files,
build scripts and documentation.
@@ -45,7 +53,9 @@ by changing formats or by porting the Font Software to a new environment.
“Author” refers to any designer, engineer, programmer, technical writer or
other person who contributed to the Font Software.
-#### PERMISSION & CONDITIONS
+PERMISSION & CONDITIONS
+=======================
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
the Font Software, to use, study, copy, merge, embed, modify, redistribute, and
sell modified and unmodified copies of the Font Software, subject to the
@@ -76,10 +86,14 @@ distributed entirely under this license, and must not be distributed under any
other license. The requirement for fonts to remain under this license does not
apply to any document created using the Font Software.
-#### TERMINATION
+TERMINATION
+===========
+
This license becomes null and void if any of the above conditions are not met.
-#### DISCLAIMER
+DISCLAIMER
+==========
+
THE FONT SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT,
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 6061a26497..6abf97df85 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -1505,7 +1505,7 @@ exit 0
%files
%files docs
-%doc AUTHORS ChangeLog NEWS README README.md
+%doc AUTHORS ChangeLog NEWS README README.rst
%doc %{_vpath_builddir}/libvirt-docs/*
%files daemon
diff --git a/po/README.md b/po/README.rst
similarity index 86%
rename from po/README.md
rename to po/README.rst
index 2f77c5d48c..2e234547ca 100644
--- a/po/README.md
+++ b/po/README.rst
@@ -1,3 +1,4 @@
+===========================
Libvirt Message Translation
===========================
@@ -7,6 +8,7 @@ file formats, in combination with the Zanata web service.
python-zanata-client is required in order to use make to pull/push translations
from/to Zanata server.
+
Source repository
=================
@@ -14,21 +16,25 @@ The libvirt GIT repository does NOT store the master "libvirt.pot" file, nor
does it store full "po" files for translations. The master "libvirt.pot" file
can be generated at any time using
- make libvirt.pot
+::
+
+ $ make libvirt.pot
The translations are kept in minimized files that are the same file format
as normal po files but with all redundant information stripped and messages
re-ordered. The key differences between the ".mini.po" files in GIT and the
full ".po" files are
- - msgids with no current translation are omitted
- - msgids are sorted in alphabetical order not source file order
- - msgids with a msgstr marked "fuzzy" are discarded
- - source file locations are omitted
+* msgids with no current translation are omitted
+* msgids are sorted in alphabetical order not source file order
+* msgids with a msgstr marked "fuzzy" are discarded
+* source file locations are omitted
The full po files can be created at any time using
- make update-po
+::
+
+ $ make update-po
This merges the "libvirt.pot" with the "$LANG.mini.po" for each language, to
create the "$LANG.po" files. These are included in the release archives created
@@ -37,7 +43,9 @@ by "make dist".
When a full po file is updated, changes can be propagated back into the
minimized po files using
- make update-mini-po
+::
+
+ $ make update-mini-po
Note, however, that this is generally not something that should be run by
developers normally, as it is triggered by 'make pull-po' when refreshing
@@ -50,7 +58,7 @@ Zanata web service
The translation of libvirt messages has been outsourced to the Fedora
translation team using the Zanata web service:
- https://fedora.zanata.org/project/view/libvirt
+https://fedora.zanata.org/project/view/libvirt
As such, changes to translations will generally NOT be accepted as patches
directly to libvirt GIT. Any changes made to "$LANG.mini.po" files in libvirt
@@ -59,12 +67,16 @@ GIT will be overwritten and lost the next time content is imported from Zanata.
The master "libvirt.pot" file is periodically pushed to Zanata to provide the
translation team with content changes, using
- make push-pot
+::
+
+ $ make push-pot
New translated text is then periodically pulled down from Zanata to update the
minimized po files, using
- make pull-po
+::
+
+ $ make pull-po
Sometimes the translators make mistakes, most commonly with handling printf
format specifiers. The "pull-po" command re-generates the .gmo files to try to
diff --git a/tools/wireshark/README.md b/tools/wireshark/README.rst
similarity index 52%
rename from tools/wireshark/README.md
rename to tools/wireshark/README.rst
index b7f40d0954..919b89d32a 100644
--- a/tools/wireshark/README.md
+++ b/tools/wireshark/README.rst
@@ -1,5 +1,7 @@
+=====
About
=====
+
This is the project of Google Summer of Code 2013 accepted by QEMU.org and
libvirt community. The goal of this project is, provide Wireshark dissector for
Libvirt RPC protocol. It will provide Libvirt packet overview/detail analysing
@@ -8,24 +10,32 @@ definition placed in Libvirt source tree to support latest protocol
specification.
See also:
-- http://www.google-melange.com/gsoc/project/google/gsoc2013/kawamuray/7001
-- https://wiki.qemu.org/Features/LibvirtWiresharkDissector
+
+* http://www.google-melange.com/gsoc/project/google/gsoc2013/kawamuray/7001
+* https://wiki.qemu.org/Features/LibvirtWiresharkDissector
+
Installation
=============
-Run ./configure with --with-wireshark-dissector option enabled.
+
+Run ``./configure`` with ``--with-wireshark-dissector`` option enabled.
Then dissector will compiled with libvirt itself.
Add/Remove protocol from dissector's support
--------------------------------------------
-Modify variable WS\_DISSECTOR\_PROTO\_FILES in tools/wireshark/src/Makefile.am.
+
+Modify variable ``WS_DISSECTOR_PROTO_FILES``
+in ``tools/wireshark/src/Makefile.am``.
Changing installation directory
-------------------------------
-You can change installation directory of pluggable shared object(libvirt.so) by
-specifying --with-ws-plugindir=<path>.
-You can install libvirt.so into your local wireshark plugin directory:
+You can change installation directory of pluggable shared
+object(``libvirt.so``) by specifying ``--with-ws-plugindir=<path>``.
+
+You can install ``libvirt.so`` into your local wireshark plugin directory:
+
+::
- ./configure --with-wireshark-dissector \
- --with-ws-plugindir=$HOME/.wireshark/plugins
+ $ ./configure --with-wireshark-dissector \
+ --with-ws-plugindir=$HOME/.wireshark/plugins
--
2.25.2
4 years, 8 months
[PATCH 0/2] Fix formatting of http cookies into XML
by Peter Krempa
See 2/2.
Peter Krempa (2):
virstoragetest: testBackingParse: Use VIR_DOMAIN_DEF_FORMAT_SECURE
when formatting xml
conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is
used
src/conf/domain_conf.c | 8 ++++++--
tests/virstoragetest.c | 3 ++-
2 files changed, 8 insertions(+), 3 deletions(-)
--
2.26.0
4 years, 8 months
[PATCH] libvirt-stream.c: Use g_autofree
by Seeteena Thoufeek
Signed-off-by: Seeteena Thoufeek <s1seetee(a)linux.vnet.ibm.com>
---
src/libvirt-stream.c | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/src/libvirt-stream.c b/src/libvirt-stream.c
index 6f6bb5d..41b9cc1 100644
--- a/src/libvirt-stream.c
+++ b/src/libvirt-stream.c
@@ -573,7 +573,7 @@ virStreamSendAll(virStreamPtr stream,
virStreamSourceFunc handler,
void *opaque)
{
- char *bytes = NULL;
+ g_autofree char *bytes = NULL;
size_t want = VIR_NET_MESSAGE_LEGACY_PAYLOAD_MAX;
int ret = -1;
VIR_DEBUG("stream=%p, handler=%p, opaque=%p", stream, handler, opaque);
@@ -616,8 +616,6 @@ virStreamSendAll(virStreamPtr stream,
ret = 0;
cleanup:
- VIR_FREE(bytes);
-
if (ret != 0) {
virErrorPtr orig_err;
@@ -706,7 +704,7 @@ int virStreamSparseSendAll(virStreamPtr stream,
virStreamSourceSkipFunc skipHandler,
void *opaque)
{
- char *bytes = NULL;
+ g_autofree char *bytes = NULL;
size_t bufLen = VIR_NET_MESSAGE_LEGACY_PAYLOAD_MAX;
int ret = -1;
unsigned long long dataLen = 0;
@@ -787,8 +785,6 @@ int virStreamSparseSendAll(virStreamPtr stream,
ret = 0;
cleanup:
- VIR_FREE(bytes);
-
if (ret != 0) {
virErrorPtr orig_err;
@@ -847,7 +843,7 @@ virStreamRecvAll(virStreamPtr stream,
virStreamSinkFunc handler,
void *opaque)
{
- char *bytes = NULL;
+ g_autofree char *bytes = NULL;
size_t want = VIR_NET_MESSAGE_LEGACY_PAYLOAD_MAX;
int ret = -1;
VIR_DEBUG("stream=%p, handler=%p, opaque=%p", stream, handler, opaque);
@@ -892,8 +888,6 @@ virStreamRecvAll(virStreamPtr stream,
ret = 0;
cleanup:
- VIR_FREE(bytes);
-
if (ret != 0) {
virErrorPtr orig_err;
@@ -964,7 +958,7 @@ virStreamSparseRecvAll(virStreamPtr stream,
virStreamSinkHoleFunc holeHandler,
void *opaque)
{
- char *bytes = NULL;
+ g_autofree char *bytes = NULL;
size_t want = VIR_NET_MESSAGE_LEGACY_PAYLOAD_MAX;
const unsigned int flags = VIR_STREAM_RECV_STOP_AT_HOLE;
int ret = -1;
@@ -1025,8 +1019,6 @@ virStreamSparseRecvAll(virStreamPtr stream,
ret = 0;
cleanup:
- VIR_FREE(bytes);
-
if (ret != 0) {
virErrorPtr orig_err;
--
1.8.3.1
4 years, 8 months
[libvirt PATCH 0/2] Improve entry point for new contributors
by Andrea Bolognani
Use the path most people will look for, reduce building instructions
to the bare minimum necessary to locally bootstrap the learning
process, and ensure duplication doesn't creep in over time by
pointing to the full documentation.
Andrea Bolognani (2):
CONTRIBUTING: Add entry point for new contributors
README-hacking: Drop from the git repository
CONTRIBUTING.md | 18 ++++++++++++++++
README-hacking | 56 -------------------------------------------------
2 files changed, 18 insertions(+), 56 deletions(-)
create mode 100644 CONTRIBUTING.md
delete mode 100644 README-hacking
--
2.25.1
4 years, 8 months
[libvirt-jenkins-ci PATCH v3 0/5] Introduce the new 'gitlab' flavor
by Erik Skultety
since v1:
- .bash_logout is removed from the user home environment (causes builds to fail
on Debian)
- gitlab-runner is now downloaded to and executed from user's bin/ directory
instead of using /usr/local/bin
- both RC and systemd service files now define the user explicitly that the init
system changes to when spawning the gitlab-runner service
- the gitlab flavour tasks file now relies on shell's 'creates' module argument
so that the agent registration is idempotent rather than touching the
dirs/files explicitly
- both gitlab URL and runner token are now files editable under
~/.config/lcitool
since v2:
- download location changed to /usr/local/bin
- config location changed to /etc/gitlab-runner (readable to the gitlab user)
- machine tagging changed to 'os_version-distro_major_number'
- fixed the regression caused by the gitlab code which was checking the gitlab
config files unconditionally for all flavours
- cosmetic syntactic changes to the Python code as requested by the reviewer
Both the config.toml improvement in terms of replacing the ~/.config/lcitool
files as discussed during the v1 review process as well as cloudinit usage is
planned for a separate respective series, so for now, we'll have to live with 2
new config files and cloud images will need to be built manually.
Erik Skultety (5):
guests: users: Discard the .bash_logout skeleton file
guests: templates: Introduce a gitlab-runner systemd service template
guests: templates: Introduce a gitlab-runner RC init service template
guests: Introduce the new 'gitlab' flavor
guests: lcitool: Enable the new 'gitlab' flavor in the lcitool script
guests/lcitool | 46 ++++++++++++++-
guests/playbooks/update/main.yml | 5 ++
guests/playbooks/update/tasks/gitlab.yml | 58 +++++++++++++++++++
guests/playbooks/update/tasks/users.yml | 3 +-
.../update/templates/gitlab-runner.j2 | 31 ++++++++++
.../update/templates/gitlab-runner.service.j2 | 14 +++++
6 files changed, 154 insertions(+), 3 deletions(-)
create mode 100644 guests/playbooks/update/tasks/gitlab.yml
create mode 100644 guests/playbooks/update/templates/gitlab-runner.j2
create mode 100644 guests/playbooks/update/templates/gitlab-runner.service.j2
--
2.25.1
4 years, 8 months