Introduce virCryptoHaveEncrypt and virCryptoEncryptSecret to handle
performing encryption.
virCryptoHaveEncrypt:
Boolean function to determine whether the requested encryption
API is available. It's expected this API will be called prior to
virCryptoEncryptSecret. It will return
Create a mock for virRandomBytes to generate a not so random value that
can be used by the tests to ensure the generation of an encrypted secret
by masterKey and random initialization vector can produce an expected
result. The "random number" generated is based upon the size of the
expected
Based on v4 of the AES secret object series:
http://www.redhat.com/archives/libvir-list/2016-May/msg01292.html
Could have been an RFC too...
Precursor for the AES secret object patches - figured I'd make sure this
was the "right path" and hopefully to get some help with the mock environment
What I'd like to do is merge this and the previous patch together;
however, I'm missing something (hopefully obvious) with the building
of the mocked function.
Since this won't be a qemu specific function, the test wouldn't belong
in qemuxml2argvmock - rather a separate mock would seemingly have
On 05/18/2016 02:55 AM, Peter Krempa wrote:
> On Tue, May 17, 2016 at 12:36:06 -0400, John Ferlan wrote:
>> v3:
>>
>> http://www.redhat.com/archives/libvir-list/2016-May/msg00444.html
>>
>> Changes since v3 (by patch)...
>>
>> 1. Separate out the mock for virRandomBytes. I realize this is not
On 05/18/2016 03:16 AM, Peter Krempa wrote:
> On Tue, May 17, 2016 at 12:36:08 -0400, John Ferlan wrote:
>> New APIs:
>>
>> qemuDomainGetAESKeyAlias:
>> Generate/return the secret object alias for an AES Secret Info type.
>> This will be called from qemuDomainSecretAESSetup.
>>
>>
The commit 6fe678c is reverted. The code is moved around and cant revert
staright.
Signed-off-by: Shivaprasad G Bhat
---
src/conf/domain_addr.c | 22 +-
src/libvirt_private.syms |1 +
src/qemu/qemu_domain_address.c |2 +-
3
The commit 6fe678c is partly reverted. The code is moved around and cant revert
staright.
Signed-off-by: Shivaprasad G Bhat
---
src/conf/domain_addr.c | 22 +-
src/libvirt_private.syms |1 +
src/qemu/qemu_domain_address.c |2
The flow is to parse and create a list of devices. Go on each device at each
step.
Signed-off-by: Shivaprasad G Bhat
---
src/qemu/qemu_driver.c | 328 +---
1 file changed, 256 insertions(+), 72 deletions(-)
diff --git
The hostdevices are the only devices which have dependencies
outside of themselves such that, other functions of the PCI
card should also have been detached from host driver before
attempting the hotplug.
This patch moves the detach to the beginning of the hotplug
so that the following patch can
No Functional change.
Signed-off-by: Shivaprasad G Bhat
---
src/qemu/qemu_hotplug.c | 89 ++-
src/qemu/qemu_hotplug.h |5 +++
2 files changed, 61 insertions(+), 33 deletions(-)
diff --git a/src/qemu/qemu_hotplug.c
This patch assigns multifunction pci addresses to devices in the devlist.
The pciaddrs passed in the argument is not altered so that the actual call to
reserve the address using virDomainPCIAddressEnsureAddr() passes. The function
focuses on user given address validation and also the auto-assign
This patch just introduces the parser function used by
the later patches. The parser disallows hostdevices to be
used with other virtio devices simultaneously.
Signed-off-by: Shivaprasad G Bhat
---
src/conf/domain_conf.c | 236
This function was not used so far. Now, that we begin to use it, make sure to
check the address before actually releasing the address.
Signed-off-by: Shivaprasad G Bhat
---
src/conf/domain_addr.c | 18 +-
1 file changed, 17 insertions(+), 1
This has to go. The unlugging is going to be supported.
Signed-off-by: Shivaprasad G Bhat
---
src/qemu/qemu_hotplug.c | 60 ---
1 file changed, 60 deletions(-)
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
V1 was posted here.
http://www.redhat.com/archives/libvir-list/2016-May/msg01178.html
Changes from V1
Fixed couple of issues in address validation and assignment.
Added Rollback of the hotplug if anything fails in between.
Removed Patch 6 completely as it exposed way too many bugs. Changed the
Prior to this, wasn't allowed when parsing
(domain+bus+slot+function needed to be a "valid" PCI address, meaning
that at least one of domain/bus/slot had to be non-0), the RNG
required bus to be specified, and if type was set to PCI when
formatting, domain+bus+slot+function would always be
This is an alternative to Cole's series that permits to force assignment of a PCI address, which is
particularly useful on platforms that could connect the same device in
different ways (e.g. aarch64/virt).
Here is Cole's last iteration of the series:
Rather than only assigning a PCI address when no address is given at
all, also do it when the config says that the address type is 'pci',
but it gives no address.
---
src/bhyve/bhyve_device.c | 10 --
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/bhyve/bhyve_device.c
Rather than only assigning a PCI address when no address is given at
all, also do it when the config says that the address type is 'pci',
but it gives no address (virDeviceInfoPCIAddressWanted()).
There are also several places after parsing but prior to address
assignment where code previously
From: Cole Robinson
This is an interesting test case since PCI isn't the default for
aarch64.
---
.../qemuxml2argv-aarch64-virtio-pci-manual-addresses.args| 4 +++-
.../qemuxml2argv-aarch64-virtio-pci-manual-addresses.xml | 5 +
Also moves all the subordinate structs. This is necessary due to a new
inline function that will be defined in device_conf.h, and also makes
sense, because it is the *device* info that's in the struct. (Actually
a lot more stuff from domain_conf.h could move to this newer file, but
I didn't want
In order to allow with no other attributes to
mean "I want a PCI address, but any PCI address will do" (just as
having no at all usually indicates), we will need to change
several places in the code from a simple "info->type == (or !=)
VIR_DOMAIN_DEVICE_ADDRESS_TYPE_(PCI|NONE)" into something
On 05/17/2016 10:39 AM, Andrea Bolognani wrote:
> On Sat, 2016-05-14 at 16:00 -0400, Cole Robinson wrote:
>> This wires up qemuDomainAssignAddresses into the new
>> virDomainDefAssignAddressesCallback, so it's always triggered
>> via virDomainDefPostParse. We are essentially doing this already
>>
On 05/18/2016 10:59 AM, Andrea Bolognani wrote:
> On Wed, 2016-05-18 at 09:58 -0400, Laine Stump wrote:
>> On 05/18/2016 07:53 AM, Cole Robinson wrote:
>>>
>>> Kind of. Prior to patch #2, the test suite output was correct (no
>>> addresses),
>>> it's what we were returning via domxml-from-native.
On 05/17/2016 10:42 AM, Andrea Bolognani wrote:
> On Sat, 2016-05-14 at 16:00 -0400, Cole Robinson wrote:
>> All these calls come near immediately after parsing the domain
>> XML, which now triggers qemuDomainAssignAddresses. So drop the
>> now redundnat calls
>> ---
>> src/qemu/qemu_driver.c |
On 05/17/2016 01:20 PM, Andrea Bolognani wrote:
> On Sat, 2016-05-14 at 16:00 -0400, Cole Robinson wrote:
>> hotplug APIs with the AFFECT_CONFIG flag are essentially replicating
>> 'insert into XML document, and redefine XML'. Thinking of
>> it this way, it's natural that we call
On 05/18/2016 10:38 AM, Jim Fehlig wrote:
> The virQEMUDriverConfig object contains lists of
> loader:nvram pairs to advertise firmwares supported by
> by the driver, and qemu_conf.c contains code to populate
> the lists, all of which is useful for other drivers too.
>
> To avoid code duplication,
The virQEMUDriverConfig object contains lists of
loader:nvram pairs to advertise firmwares supported by
by the driver, and qemu_conf.c contains code to populate
the lists, all of which is useful for other drivers too.
To avoid code duplication, introduce a virFirmware object
to encapsulate
While refreshing and testing my series to add domain capabilities
and UEFI support to the libxl driver [1], I realized it would be
useful to support the '--with-loader-nvram' configure option as
well. This would allow users/packagers to specify system-provided
firmwares instead of those provided
Prefer firmwares specified via --with-loader-nvram configure
option. If none are specified, use the Xen-provided default
firmwares found in LIBXL_FIRMWARE_DIR.
Signed-off-by: Jim Fehlig
---
src/libxl/libxl_conf.c | 21 +
src/libxl/libxl_conf.h | 4
2
Hello all,
I'm a newbie to libvirt, coming to it because I'm trying to understand how to
provide the ability to attach/detach network filesystem shares to openstack
guest instances in something analogous to the way block devices can be now.
While playing with the existing virtfs/9p support for
02.05.2016 12:33, Nikolay Shirokovskiy пишет:
The first patch do all the job. It is rather large but does not touch
any existing code so I found it reasonable not to split it.
Nikolay Shirokovskiy (2):
vz: add domain snapshots functionality
vz: drop prlsdkDomainHasSnapshots
02.05.2016 12:33, Nikolay Shirokovskiy пишет:
Let's use introduced domain snapshots infrastructure instead.
Signed-off-by: Nikolay Shirokovskiy
---
src/vz/vz_sdk.c | 87 -
1 file changed, 18 insertions(+),
02.05.2016 12:33, Nikolay Shirokovskiy пишет:
This solution does not keep snapshots cache because vz sdk lacks good support
for snapshot related events.
Libvirt and vz sdk has different approach to snapshot ids. vz sdk always
auto generate them while libvirt has ability to specify id by user.
On Mon, May 16, 2016 at 01:08:17PM +0200, Pavel Hrdina wrote:
> This reverts commit 1ccc7fbff34ea44e5b0cf01a359d127a4c62a695.
>
> We cannot check ports if autoport is set because we set ports to 0 while
> parsing device XML.
>
> Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1336134
>
>
On Wed, 2016-05-18 at 09:58 -0400, Laine Stump wrote:
> On 05/18/2016 07:53 AM, Cole Robinson wrote:
> >
> > Kind of. Prior to patch #2, the test suite output was correct (no
> > addresses),
> > it's what we were returning via domxml-from-native. After patch #2, the test
> > suite output was
On 16.05.2016 23:36, Katerina Koukiou wrote:
> This patch series adds job support to the lxc driver, using techiques from the
> libxl driver. One benefit is no longer blocking get operations during long
> running modify operations. E.g. with these patches 'vish dominfo dom' will
> work while
On 05/18/2016 07:53 AM, Cole Robinson wrote:
Kind of. Prior to patch #2, the test suite output was correct (no addresses),
it's what we were returning via domxml-from-native. After patch #2, the test
suite output was wrong for all real world usage; it didn't change because it
was only hitting a
Behold! This is not a trivial patch set and you will need a lot
of courage to review it. Sorry. I hadn't had a nice time writing
the patches neither.
Michal Privoznik (3):
tests: Drop VIR_MOCK_CALL_STAT
virtestmock: Mock stat() properly
tests: Link virtestmock with probes
cfg.mk
I've encountered this error while trying out this feature on some
systems:
$ VIR_TEST_FILE_ACCESS=1 ./virhashtest \
libvirt.git/tests/.libs/lt-virhashtest: \
symbol lookup error: libvirt.git/tests/.libs/virtestmock.so: \
undefined symbol: libvirt_event_poll_purge_timeout_semaphore
Problem is,
There is a lot to explain, but I try to make it as short as
possible. I'd start by pasting some parts of sys/stat.h:
extern int stat (const char *__restrict __file,
struct stat *__restrict __buf) __THROW __nonnull ((1, 2));
extern int __REDIRECT_NTH (stat, (const char
It wasn't as great idea as I thought. Thing around stat() are
more complicated than that. Therefore we need to revert
86d1705a8ace349b plus drop use of the macro as introduced in
later patches.
Signed-off-by: Michal Privoznik
---
tests/vircgroupmock.c | 14 +++---
When libvirt is gathering stats for block devices in the bulk stats API
it would use the fallback code that accesses the files directly in
libvirt both if the VM was offline and if qemu didn't return the stats
at all.
If qemu is not cooperating due to being stuck on an inaccessible NFS
share we
Extract the fallback path that reloads the stats from disk into a
separate function.
---
src/qemu/qemu_driver.c | 58 --
1 file changed, 37 insertions(+), 21 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index
'abbreviated' was true if 'stats' were NULL
---
src/qemu/qemu_driver.c | 15 +--
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 00daf72..5917bc2 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@
Accessing VM disk files while we weren't able to get the stats from qemu
directly as it was most probably stuck on missing storage will make libvrtd's
thread handling the stats get stuck. Avoid touching files in such case.
Peter Krempa (3):
qemu: driver: Remove unnecessary flag in
On Tue, May 17, 2016 at 04:25:39PM +0200, Peter Krempa wrote:
> Recently there were a few patches adding checks to the post parse
> callback infrastructure that rejected previously accepted configuration.
> This unfortunately was not acceptable since we would fail to load the
> configs from the
On Fri, May 13, 2016 at 16:52:14 +0200, Ján Tomko wrote:
> Add a new element to XML:
>
> /path/to/acpi/table/file
It looks like the table could compromise of multiple sub-tables which
would add a rather unpleasantly looking XML:
/path/to/acpi/table/file
/path/to/acpi/table/blurb
Rather than return 0/-1 and/or a pointer to some memory, adjust the
helper to just return the allocated structure or NULL on failure.
Adjust the callers in order to handle that
Signed-off-by: John Ferlan
---
src/util/virpci.c | 33 -
1 file
Seems recent versions of Coverity have (mostly) resolved the issue using
ternary operations in VIR_FREE (and now VIR_DISPOSE*) macros. So let's
just remove it and if necessary handle one off issues as the arise.
Signed-off-by: John Ferlan
---
src/util/viralloc.h | 34
Since the callers only ever expect 0 or -1, let's just return that directly
Signed-off-by: John Ferlan
---
src/util/virpci.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/util/virpci.c b/src/util/virpci.c
index be35017..1119c2e 100644
---
If we get to the error: label and clear out the *virtual_functions[]
pointers and then return w/ error to the caller - the caller has it's
own cleanup of the same array in the out: label which is keyed off the
value of num_virt_fns, which wasn't reset to 0 in the called function
leading to a
Not sure which release exactly, but the coverity analysis bug I filed that
was the reason for commit id 'c9a85af31' has been fixed, so it's time to
remove that... In doing so uncovered another issue - it seems the fix for
Coverity addressed the primary problem we've seen, but when there's
The defaults provided by gnutls_set_default_priority are not configurable
at runtime. Introduce a new config option to libvirt.conf that will
be passed to gnutls_priority_set.
One of the possible options is "@SYSTEM", where gnutls will get the settings
from /etc/gnutls/default-priorities.
Note
On 05/18/2016 06:27 AM, Andrea Bolognani wrote:
> On Sat, 2016-05-14 at 17:39 -0400, Cole Robinson wrote:
>> All qemu versions we support have QEMU_CAPS_DEVICE, so checking
>> for it is redundant. Remove the usage.
>>
>> The code diff isn't clear, but all that code is just inindented
>> with no
On Wed, May 18, 2016 at 07:15:54 -0400, John Ferlan wrote:
> On 05/18/2016 01:55 AM, Peter Krempa wrote:
[...]
> > "cannot find session iscsiadm session" followed by the message and/or
> > containing the code will be probably the best case here. The function
> > you are modifying is meant to
2016-05-17 17:39 GMT+03:00 Laine Stump :
> Rather than me spending time adding something to my patches that will just
> be superceded by another patch immediately, I would rather just do it the
> way everyone wants to begin with.
>
> What type of things are usually done in the
On 05/18/2016 01:55 AM, Peter Krempa wrote:
> On Tue, May 17, 2016 at 11:31:07 -0400, John Ferlan wrote:
>> On 05/17/2016 11:04 AM, Peter Krempa wrote:
>>> On Mon, May 16, 2016 at 11:03:09 -0400, John Ferlan wrote:
>
> [...]
>
+
+virReportError(VIR_ERR_INTERNAL_ERROR,
On Sat, 2016-05-14 at 17:39 -0400, Cole Robinson wrote:
> Upcoming patches are going to make the disk portion of these
> test cases fail. In order to make it work, we would need to
> extend the qemuargv2xml test infrastructure to handle qemuCaps.
> This is worthwhile to do at some point but isn't
On Sat, 2016-05-14 at 17:39 -0400, Cole Robinson wrote:
> All qemu versions we support have QEMU_CAPS_DEVICE, so checking
> for it is redundant. Remove the usage.
>
> The code diff isn't clear, but all that code is just inindented
> with no other change.
'git show -w' is your friend ;)
This
On Tue, 2016-05-17 at 14:24 -0400, Cole Robinson wrote:
> >
> > > + virDomainXMLOptionPtr xmlopt)
> > > {
> > > virDomainDiskDefPtr disk;
> > > virDomainNetDefPtr net;
> > > @@ -7803,11 +7805,6 @@ qemuDomainAttachDeviceConfig(virQEMUCapsPtr
> > >
On Tue, 2016-05-17 at 00:00 +0200, Andrea Bolognani wrote:
> Changes from [v1]:
>
> * Factor away some of the logic to
> virQEMUCapsSupportsGICVersion(), as suggested by,
> and based on a first implementation by, Cole
>
> * Factor away the common test suite bits to
>
On Tue, 2016-05-17 at 16:10 -0400, John Ferlan wrote:
>
> On 05/16/2016 06:00 PM, Andrea Bolognani wrote:
> >
> > The only case where the hardware capabilities influence the result
> > is when no element was provided.
> >
> > The test programs now ensure both that the correct GIC version is
>
On Tue, 2016-05-17 at 16:10 -0400, John Ferlan wrote:
> > * enabled and configure default values related to those features.
> > */
> > static void
> > -qemuDomainDefEnableDefaultFeatures(virDomainDefPtr def)
> > +qemuDomainDefEnableDefaultFeatures(virDomainDefPtr def,
> > +
On Mon, May 16, 2016 at 11:03:11 -0400, John Ferlan wrote:
> No longer necessary to have it, so remove it.
>
> Signed-off-by: John Ferlan
ACK
signature.asc
Description: Digital signature
--
libvir-list mailing list
libvir-list@redhat.com
On Mon, May 16, 2016 at 11:03:10 -0400, John Ferlan wrote:
> From: Fritz Elfert
>
> https://bugzilla.redhat.com/show_bug.cgi?id=1331552
>
> Instead of disabling auto-login of all scsi targets (even those
> that do not "belong" to libvirt), use iscsiadm's "--op
18.05.2016 10:54, Nikolay Shirokovskiy пишет:
On 17.05.2016 22:02, Maxim Nestratov wrote:
22.04.2016 10:20, Nikolay Shirokovskiy пишет:
vz puts uuids into curly braces. Simply introduce new contstant to reflect this
and get rid of magic +2 in code.
Signed-off-by: Nikolay Shirokovskiy
The newest version of migration protocol - version 3 with parameters is
implemented.
Supported flags is VIR_MIGRATE_PAUSED only. Supported parameters are
VIR_MIGRATE_PARAM_URI and VIR_MIGRATE_PARAM_DEST_NAME.
VIR_MIGRATE_PARAM_DEST_XML
is in VZ_MIGRATION_PARAMETERS for technical onyl reasons.
This session uuid acts as authN token for different multihost vz operations one
of which is migration. Unfortunately we can't get it from server at any time
thus we need to save it at login.
Signed-off-by: Nikolay Shirokovskiy
---
src/vz/vz_sdk.c | 40
vz puts uuids into curly braces. Simply introduce new contstant to reflect this
and get rid of magic +2 in code.
Signed-off-by: Nikolay Shirokovskiy
---
src/vz/vz_sdk.c | 12 ++--
src/vz/vz_utils.h | 3 +++
2 files changed, 9 insertions(+), 6 deletions(-)
Signed-off-by: Nikolay Shirokovskiy
---
src/vz/vz_utils.c | 2 +-
src/vz/vz_utils.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/vz/vz_utils.c b/src/vz/vz_utils.c
index d9da1e7..5427314 100644
--- a/src/vz/vz_utils.c
+++
Peer to peer migration is implemented just as in managed case. Basically
it is copy paste from managed case but with all the branches that are not
applied to vz removed.
Signed-off-by: Nikolay Shirokovskiy
---
src/vz/vz_driver.c | 136
Difference from v6
==
Minor fixes suggested by reviewer.
Nikolay Shirokovskiy (5):
vz: save session uuid on login
vz: fix const correctness case
vz: implement managed migration
vz: implement p2p migration
vz: cleanup: define vz format of uuids
src/vz/vz_driver.c | 559
On 17.05.2016 22:02, Maxim Nestratov wrote:
> 22.04.2016 10:20, Nikolay Shirokovskiy пишет:
>
>> vz puts uuids into curly braces. Simply introduce new contstant to reflect
>> this
>> and get rid of magic +2 in code.
>>
>> Signed-off-by: Nikolay Shirokovskiy
>> ---
On 17.05.2016 21:56, Maxim Nestratov wrote:
>
>
> 22.04.2016 10:20, Nikolay Shirokovskiy пишет:
>> Peer to peer migration is implemented just as in managed case. Basically
>> it is copy paste from managed case but with all the branches that are not
>> applied to vz removed.
>>
>>
On Tue, May 17, 2016 at 12:36:09 -0400, John Ferlan wrote:
> https://bugzilla.redhat.com/show_bug.cgi?id=1182074
>
> If they're available and we need to pass secrets to qemu, then use the
> qemu domain secret object in order to pass the secrets for RBD volumes
> instead of passing the base64
On 17.05.2016 21:33, Maxim Nestratov wrote:
>
>
> 22.04.2016 10:20, Nikolay Shirokovskiy пишет:
>> The newest version of migration protocol - version 3 with parameters is
>> implemented.
>> Supported flags is VIR_MIGRATE_PAUSED only. Supported parameters are
>> VIR_MIGRATE_PARAM_URI and
On Tue, May 17, 2016 at 12:36:08 -0400, John Ferlan wrote:
[...]
> +/* qemuDomainGetAESKeyAlias:
> + *
> + * Generate and return an initialization vector alias
> + *
> + * Returns NULL or a string containing the AES key alias
> + */
> +char *
> +qemuDomainGetAESKeyAlias(const char *srcalias)
>
On Tue, May 17, 2016 at 12:36:08 -0400, John Ferlan wrote:
> New APIs:
>
> qemuDomainGetAESKeyAlias:
> Generate/return the secret object alias for an AES Secret Info type.
> This will be called from qemuDomainSecretAESSetup.
>
> qemuDomainSecretHaveEncrypt: (private)
> Boolean
On Tue, May 17, 2016 at 12:36:06 -0400, John Ferlan wrote:
> v3:
>
> http://www.redhat.com/archives/libvir-list/2016-May/msg00444.html
>
> Changes since v3 (by patch)...
>
> 1. Separate out the mock for virRandomBytes. I realize this is not the
>desired state, but figured to at least be
According to QEMU docs, the '-m' option for specifying RAM is by default
in MiB, and a suffix of "M" or "G" may be passed for values in MiB and
GiB respectively. This commit adds support and a test for the same.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=812295
Signed-off-by: Nishith
Move the parsing of -m memory to a new function, qemuParseCommandLineMem
Signed-off-by: Nishith Shah
---
src/qemu/qemu_parse_command.c | 30 +++---
1 file changed, 23 insertions(+), 7 deletions(-)
diff --git a/src/qemu/qemu_parse_command.c
This series moves the parsing of qemu -m memory into a separate function
and adds suffix support for the -m option.
The first patch introduces the function qemuParseCommandLineMem, and the
second patch handles suffixes for the -m values and adds a test for the
same.
Nishith Shah (2):
qemu:
On Tue, May 17, 2016 at 16:55:53 -0400, John Ferlan wrote:
> On 05/17/2016 10:25 AM, Peter Krempa wrote:
> > Recently I NACKed quite a few patches attempting to add checks to the post
> > parse callback infrastructure that would inhbit configs from being loaded
> > after daemon restart.
> >
> >
85 matches
Mail list logo