On Wed, Aug 15, 2018 at 06:35:47AM -0300, Marcos Paulo de Souza wrote:
> Hi guys,
>
> this is the second version of the patch, the first one can be found here[1].
> This version addresses the comments from Matthias Bolte, making the change
> simpler and cleaner.
>
> Let
Both /hosts/cpu/arch and /hosts/cpu/features appear twice in the documentation.
Signed-off-by: Marcos Paulo de Souza
---
This is my first submission to libvirt, so let me know if I forgot something.
en-US/Connections.xml | 11 ---
1 file changed, 11 deletions(-)
diff --git a/en-US
On Mon, Jun 25, 2018 at 01:35:33PM +0200, Erik Skultety wrote:
> On Sat, Jun 23, 2018 at 11:32:55AM -0300, Marcos Paulo de Souza wrote:
> > Both /hosts/cpu/arch and /hosts/cpu/features appear twice in the
> > documentation.
> >
> > Signed-off-by: Marcos Paulo de Souza
On Mon, Jun 25, 2018 at 05:13:26PM +0200, Erik Skultety wrote:
> On Fri, Jun 22, 2018 at 05:44:18PM -0300, Marcos Paulo de Souza wrote:
> > On Mon, Jun 25, 2018 at 01:35:33PM +0200, Erik Skultety wrote:
> > > On Sat, Jun 23, 2018 at 11:32:55AM -0300, Marcos Paulo de Souza w
Signed-off-by: Marcos Paulo de Souza
---
src/esx/esx_driver.c | 12 ++--
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c
index 60aa5fc252..bb8eeecd42 100644
--- a/src/esx/esx_driver.c
+++ b/src/esx/esx_driver.c
@@ -4000,11
The same pattern is used in lots of other places.
Signed-off-by: Marcos Paulo de Souza
---
src/esx/esx_vi.c | 14 --
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/src/esx/esx_vi.c b/src/esx/esx_vi.c
index 43ff7ea048..25fbdc7e44 100644
--- a/src/esx/esx_vi.c
+++ b
This macro avoids code duplication when checking for arrays of objects.
Signed-off-by: Marcos Paulo de Souza
---
src/esx/esx_vi.c | 189 ---
1 file changed, 46 insertions(+), 143 deletions(-)
diff --git a/src/esx/esx_vi.c b/src/esx/esx_vi.c
index
Instead of duplicating code to do the same checking. Now all functions
of virHypervisorDriver from esx driver are using this macro.
Signed-off-by: Marcos Paulo de Souza
---
src/esx/esx_driver.c | 10 ++
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/src/esx/esx_driver.c b
On Tue, Jul 03, 2018 at 11:31:36AM +0200, Michal Prívozník wrote:
> On 07/03/2018 04:20 AM, Marcos Paulo de Souza wrote:
> > This macro avoids code duplication when checking for arrays of objects.
> >
> > Signed-off-by: Marcos Paulo de Souza
> > ---
Hi guys,
in this second version I address the comments of Michal and Matthias. Changes
from v1 are placed in each patch.
Please let me know if you have more suggestions for the approach taken.
Thanks,
Marcos Paulo de Souza (2):
esx_util.h: Add ESX_VI_CHECK_ARG_LIST macro
esx: Use
This macro avoids code duplication when checking for arrays of objects.
Signed-off-by: Marcos Paulo de Souza
---
Changes from v1:
* Change VIR_ERR_INVALID_ARG to VIR_ERR_INTERNAL_ERROR (Michal)
* Change esxVI_checkArgList to ESX_VI_CHECK_ARG_LIST (Matthias)
src/esx/esx_util.h | 8
By using this macro we can avoid boilerplate code to check for arrays of
objects from ESX driver. This replacement was done using the coccinelle
script bellow:
@@
identifier ptr;
@@
-if (!ptr || *ptr) { ... }
+ESX_VI_CHECK_ARG_LIST(ptr);
Signed-off-by: Marcos Paulo de Souza
---
Changes from
phyp needs a server to connect to, so use this macro in order to reuse
code.
Signed-off-by: Marcos Paulo de Souza
---
src/phyp/phyp_driver.c | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c
index 67ce7903ba..beca1c6fc7
hyperv needs a server to connect to, so use this macro in order to reuse
code.
Signed-off-by: Marcos Paulo de Souza
---
src/hyperv/hyperv_driver.c | 7 +--
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/src/hyperv/hyperv_driver.c b/src/hyperv/hyperv_driver.c
index 95496bdf73
Hello,
I am trying to add a generic way to check for server, specially in drivers that
needs the server to be declared. If there is better way to put the check, or a
better way to check this setting, let me know.
Thanks in advance!
Marcos Paulo de Souza (4):
driver.h: Add macro
ESX needs a server to connect to, so use this macro in order to reuse
code.
Signed-off-by: Marcos Paulo de Souza
---
src/esx/esx_driver.c | 7 +--
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c
index 06e1238385..89ac7c430f 100644
This new macro will check if the server was passed to connectOpen
function. Some drivers as esx, hyperv and phyp need a server address to
connect to.
Signed-off-by: Marcos Paulo de Souza
---
src/driver.h | 9 +
1 file changed, 9 insertions(+)
diff --git a/src/driver.h b/src/driver.h
These two examples do not use any definition from config.h, and by
removing it these examples can be compiled standalone.
Signed-off-by: Marcos Paulo de Souza
---
When trying to remove config.h from domtop and domsuspend, a later inclusion of
unistd.h complains about the missing config.h
On Mon, Jul 09, 2018 at 08:31:05AM +0200, Peter Krempa wrote:
> On Sat, Jul 07, 2018 at 22:06:53 -0300, Marcos Paulo de Souza wrote:
> > This new macro will check if the server was passed to connectOpen
> > function. Some drivers as esx, hyperv and phyp need a server address to
Some drivers require a server in order to work, so this flag removes the
burden of esach driver to check for an server by doing it in
virConnectOpenInternal.
Signed-off-by: Marcos Paulo de Souza
---
src/libvirt.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/src/libvirt.c b/src
proper server, it returns a error. I could not test hyperv and phyp.
Thanks,
[1]: https://www.redhat.com/archives/libvir-list/2018-July/msg00393.html
[2]: https://www.redhat.com/archives/libvir-list/2018-July/msg00400.html
Marcos Paulo de Souza (5):
driver.h: Add remoteOnly member to
ESX driver can't function without a server being informed, so this flag
makes libvirt to check for a valid server before calling connectOpen.
Signed-off-by: Marcos Paulo de Souza
---
src/esx/esx_driver.c | 8 +---
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/sr
This new flag will be set when a driver needs a remote URL in order to
work, as ESX, HyperV and Phyp.
Signed-off-by: Marcos Paulo de Souza
---
src/driver.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/driver.h b/src/driver.h
index 0b1f7a2269..c4d94ba294 100644
--- a/src/driver.h
Phyp driver can't function without a server being informed, so this flag
makes libvirt to check for a valid server before calling connectOpen.
Signed-off-by: Marcos Paulo de Souza
---
src/phyp/phyp_driver.c | 7 +--
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/src
HyperV driver can't function without a server being informed, so this flag
makes libvirt to check for a valid server before calling connectOpen.
Signed-off-by: Marcos Paulo de Souza
---
src/hyperv/hyperv_driver.c | 8 +---
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git
On Mon, Jul 09, 2018 at 01:22:18PM -0300, Marcos Paulo de Souza wrote:
> Hi guys,
>
> this is basically a second version of [1], but I rewrote the patch following
> Matthias ideas [2]. It really seems a cleaner change, but, feel free to
> suggest
> any other change that c
This new flag will be set when a driver needs a remote URL in order to
work, as ESX, HyperV and Phyp.
Signed-off-by: Marcos Paulo de Souza
---
src/driver.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/driver.h b/src/driver.h
index 0b1f7a2269..c4d94ba294 100644
--- a/src/driver.h
HyperV driver can't function without a server being informed, so this flag
makes libvirt to check for a valid server before calling connectOpen.
Signed-off-by: Marcos Paulo de Souza
---
src/hyperv/hyperv_driver.c | 8 +---
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git
Phyp driver can't function without a server being informed, so this flag
makes libvirt to check for a valid server before calling connectOpen.
Signed-off-by: Marcos Paulo de Souza
---
src/phyp/phyp_driver.c | 7 +--
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/src
/msg00501.html
v1: https://www.redhat.com/archives/libvir-list/2018-July/msg00393.html
Changes from v2:
* patch 2: Move check for remoteOnly member just before calling connectOpen
* (only patch 2 changed in v2)
Changes from v1:
* Adapted the code following ideas from Matthias Bolte
Marcos Paulo
ESX driver can't function without a server being informed, so this flag
makes libvirt to check for a valid server before calling connectOpen.
Signed-off-by: Marcos Paulo de Souza
---
src/esx/esx_driver.c | 8 +---
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/sr
Some drivers require a server in order to work, so this flag removes the
burden of esach driver to check for an server by doing it in
virConnectOpenInternal.
Signed-off-by: Marcos Paulo de Souza
---
src/libvirt.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/src/libvirt.c b/src
what was the issue in the
first place.
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1571759
Signed-off-by: Marcos Paulo de Souza
---
src/esx/esx_storage_backend_vmfs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/esx/esx_storage_backend_vmfs.c
b/src/esx
etter idea.
Thanks,
Marcos Paulo de Souza (2):
esx: Do not crash SetAutoStart by double free
esx: Fix SetAutoStart invalid pointer free
src/esx/esx_driver.c | 12
1 file changed, 8 insertions(+), 4 deletions(-)
--
2.17.1
--
libvir-list mailing list
libvir-list@redhat.com
esxVI_AutoStartPowerInfo_Free, which is called from
esxVI_HostAutoStartManagerConfig_Free, will always call VIR_FREE to free
memory from {start,stop}Action, leading to a invalid pointer.
With this patch applied, ESX can set autostart successfully to all it's
domains.
Signed-off-by: Marcos
obj, so calling
esxVI_ObjectContent_Free creates a double free, becasuse
esxVI_ObjectContent_Free also calls
esxVI_ManagedObjectReference_Free(&item->obj).
Removing the esxVI_ObjectContent_Free from SetAutoStart fixes this
problem.
Signed-off-by: Marcos Paulo de Souza
---
src/esx/esx_driver.c | 4 +++-
1 file
This is a new version from the last patchset sent yesterday, but now using
VIR_STRNDUP, instead of allocating memory manually.
First version:
https://www.redhat.com/archives/libvir-list/2018-August/msg0.html
Marcos Paulo de Souza (2):
esx: Do not crash SetAutoStart by double free
esx
esxVI_AutoStartPowerInfo_Free, which is called from
esxVI_HostAutoStartManagerConfig_Free, will always call VIR_FREE to free
memory from {start,stop}Action, leading to a invalid pointer.
With this patch applied, ESX can set autostart successfully to all it's
domains.
Signed-off-by: Marcos
08/02/2018 05:04 AM, Matthias Bolte wrote:
> >>>> 2018-08-01 18:09 GMT+02:00 Marcos Paulo de Souza
> >>>> :
> >>>>> This is a new version from the last patchset sent yesterday, but now
> >>>>> using
> >>>>> VIR_ST
Since they are done inside virAuthGetPassword and virAuthGetUsername
when needed. Also, only auth is checked, but auth->cb, which that could
lead to a crash if the callback is NULL.
Signed-off-by: Marcos Paulo de Souza
---
src/xenapi/xenapi_driver.c | 6 --
1 file changed, 6 deleti
Since they are done inside virAuthGetPassword and virAuthGetUsername
when needed.
Signed-off-by: Marcos Paulo de Souza
---
src/esx/esx_driver.c | 7 ---
1 file changed, 7 deletions(-)
diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c
index c2154799fa..15785858c6 100644
--- a/src/esx
Instead of adding the same check for every drivers, execute the checks
in virAuthGetUsername and virAuthGetPassword. These funtions are called
when user is not set in the URI.
Signed-off-by: Marcos Paulo de Souza
---
src/util/virauth.c | 12
1 file changed, 12 insertions(+)
diff
On Thu, Aug 02, 2018 at 09:23:05PM +0200, Matthias Bolte wrote:
> 2018-08-02 18:16 GMT+02:00 John Ferlan :
> >
> >
> > On 08/02/2018 12:11 PM, Marcos Paulo de Souza wrote:
> >> On Thu, Aug 02, 2018 at 05:37:46PM +0200, Matthias Bolte wrote:
> >>&
obj, so calling
esxVI_ObjectContent_Free creates a double free, becasuse
esxVI_ObjectContent_Free also calls
esxVI_ManagedObjectReference_Free(&item->obj).
Removing the esxVI_ObjectContent_Free from SetAutoStart fixes this
problem.
Signed-off-by: Marcos Paulo de Souza
---
src/esx/esx_driver.c | 4 +++-
1 file
th and auth->cb inside
virAuthGetUsername and virAuthGetPassword, making it safer for all drivers that
rely in auth callbacks.
Marcos Paulo de Souza (5):
virauth.c: Check for valid auth callback
esx: Drop check for auth and auth->cb
hyperv: Drop check for auth and auth->cb
phyp: Drop
Since they are done inside virAuthGetPassword and virAuthGetUsername
when needed.
Signed-off-by: Marcos Paulo de Souza
---
src/hyperv/hyperv_driver.c | 7 ---
1 file changed, 7 deletions(-)
diff --git a/src/hyperv/hyperv_driver.c b/src/hyperv/hyperv_driver.c
index 6bc4c099e2..7ca145aef5
Since they are done inside virAuthGetPassword and virAuthGetUsername
when needed.
Signed-off-by: Marcos Paulo de Souza
---
src/phyp/phyp_driver.c | 11 ---
1 file changed, 11 deletions(-)
diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c
index d78de83231..5b17508dae 100644
r with the next one, makes the calls
virDomainSetVcpus, virDomainGetMaxVcpus and virDomainGetVcpusFlags to
return successfull again.
[1]:https://pubs.vmware.com/vi-sdk/visdk250/ReferenceGuide/vim.host.Capability.html
Signed-off-by: Marcos Paulo de Souza
---
src/esx/esx_dri
/orchestrator/doc/vco_vsphere55_api/html/VcHostCapability.html
Marcos Paulo de Souza (2):
esx: Make esxDomainGetVcpusFlags return vcpus again
esx:Fix esxDomainGetMaxVcpus to return correct vcpus
src/esx/esx_driver.c | 72 +++-
1 file changed, 45 insertions
capability.maxHostSupportedVcpus. With this change,
virDomainSetVcpus, virDomainGetMaxVcpus and virDomainGetVcpusFlags and
returning correct values.
Signed-off-by: Marcos Paulo de Souza
---
src/esx/esx_driver.c | 36 ++--
1 file changed, 34 insertions(+), 2 deletions
: error: enumeration value 'CURLINFO_END' not handled in
switch [-Werror=switch-enum]
Our build requires at least libcurl 7.18.0, which is pretty stable since
it was release in 2008. Fix this problem by handling the mentioned enums
in the code.
Signed-off-by: Marcos Paulo de Souza
---
the string is bigger than nodeinfo->model (which is a char[32]). So this
patch "cuts" the string, and presents the same output from 4.1.0.
Signed-off-by: Marcos Paulo de Souza
---
When testing both qemu and lxc drivers, both return "x86_64", as both call
virCapabilitie
On Mon, Aug 13, 2018 at 03:51:51PM +0200, Michal Prívozník wrote:
> On 08/11/2018 04:39 PM, Marcos Paulo de Souza wrote:
> > When building libvirt with libcurl debug enabled (with
> > ESX_VI__CURL__ENABLE_DEBUG_OUTPUT set), the message bellow pops up:
> >
> > make[3
On Tue, Aug 14, 2018 at 10:53:50AM -0400, John Ferlan wrote:
>
>
> On 08/02/2018 08:27 PM, Marcos Paulo de Souza wrote:
> > Instead of adding the same check for every drivers, execute the checks
> > in virAuthGetUsername and virAuthGetPassword. These funtions are called
>
src/util/virauth.c| 61 ++++++++++++---
> src/xenapi/xenapi_driver.c| 16 +++--
> 8 files changed, 67 insertions(+), 91 deletions(-)
Nice cleanup.
Reviewed-by: Marcos Paulo de Souza
Thanks,
>
> --
> 2.17.1
>
> --
> libv
On Mon, Aug 13, 2018 at 11:21:05PM +0200, Matthias Bolte wrote:
> 2018-08-10 5:56 GMT+02:00 Marcos Paulo de Souza :
> > Before this change, esxDomainGetMaxVcpus returned -1, which in turn
> > fails in libvirt. This commit reimplements esxDomainGetMaxVcpus instead
renceGuide/vim.host.Capability.html
Signed-off-by: Marcos Paulo de Souza
---
Changes from v1:
* Now we only have one patch instead of two
* Change esxDomainGetVcpusFlags in order to check the flags argument, instead
* of changing esxDomainGetMaxVcpus.
src/esx/esx_dri
/2018-August/msg00532.html
Marcos Paulo de Souza (1):
esx: Make esxDomainGetVcpusFlags check flags
src/esx/esx_driver.c | 52
1 file changed, 28 insertions(+), 24 deletions(-)
--
2.17.1
--
libvir-list mailing list
libvir-list@redhat.com
https
58 matches
Mail list logo