]> xenbits.xensource.com Git - libvirt.git/log
libvirt.git
6 years agophyp: Don't overwrite virAuthGet{Username|Password} errors
John Ferlan [Tue, 14 Aug 2018 16:32:22 +0000 (12:32 -0400)]
phyp: Don't overwrite virAuthGet{Username|Password} errors

Now that the virAuthGet*Path API's generate all the error messages
we can remove them from the callers. This means that we will no
longer overwrite the error from the API.

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
6 years agohyperv: Don't overwrite virAuthGet{Username|Password} errors
John Ferlan [Tue, 14 Aug 2018 16:31:52 +0000 (12:31 -0400)]
hyperv: Don't overwrite virAuthGet{Username|Password} errors

Now that the virAuthGet*Path API's generate all the error messages
we can remove them from the callers. This means that we will no
longer overwrite the error from the API.

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
6 years agoesx: Don't overwrite virAuthGet{Username|Password} errors
John Ferlan [Tue, 14 Aug 2018 16:30:02 +0000 (12:30 -0400)]
esx: Don't overwrite virAuthGet{Username|Password} errors

Now that the virAuthGet*Path API's generate all the error messages
we can remove them from the callers. This means that we will no
longer overwrite the error from the API.

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
6 years agoutil: Alter virAuthGet*Path API to generate auth->cb error
John Ferlan [Tue, 14 Aug 2018 14:14:22 +0000 (10:14 -0400)]
util: Alter virAuthGet*Path API to generate auth->cb error

Rather than forcing the caller to generate an error, let's
generate the Username or Password error message failure if
the auth->cb fails. This is the last error path that needs
a specific message for various callers.

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
6 years agoutil: Alter virAuthGet*Path API return processing
John Ferlan [Tue, 14 Aug 2018 14:11:50 +0000 (10:11 -0400)]
util: Alter virAuthGet*Path API return processing

If we never find the valid credtype in the list, then we'd return
NULL without an error signaled forcing the caller to generate one
that will probably be incorrect. Let's be specific.

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
6 years agoutil: Remove invalid parameter checks from virAuthGet{Username|Password}
John Ferlan [Tue, 14 Aug 2018 16:34:43 +0000 (12:34 -0400)]
util: Remove invalid parameter checks from virAuthGet{Username|Password}

Now that the virAuthGet*Path helpers make the checks, we can remove
them from here.

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
6 years agoutil: Alter virAuthGet*Path API to check valid callback
John Ferlan [Tue, 14 Aug 2018 14:05:33 +0000 (10:05 -0400)]
util: Alter virAuthGet*Path API to check valid callback

Before trying to call @auth->cb, let's ensure it exists.

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
6 years agoutil: Alter virAuthGet*Path API to check valid parameters
John Ferlan [Tue, 14 Aug 2018 14:03:10 +0000 (10:03 -0400)]
util: Alter virAuthGet*Path API to check valid parameters

Before trying to dereference @auth, let's ensure it's valid.

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
6 years agostorage: Properly terminate secrets
Michal Privoznik [Mon, 13 Aug 2018 08:35:37 +0000 (10:35 +0200)]
storage: Properly terminate secrets

The virSecretGetSecretString() helper looks up a secret for given
pool and returns its value in @secret_value and its length in
@secret_value_size. However, the trailing '\0' is not included in
either of the variables. This is because usually the value of the
secret is passed to some encoder (usually base64 encoder) where
the trailing zero must not be accounted for.

However, in two places we actually want the string as we don't
process it any further.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
6 years agovirtestmock: Track action
Michal Privoznik [Sun, 8 Jul 2018 07:32:03 +0000 (09:32 +0200)]
virtestmock: Track action

As advertised in the previous commit, we need the list of
accessed files to also contain action that caused the $path to
appear on the list. Not only this enables us to fine tune our
white list rules it also helps us to see why $path is reported.
For instance:

  /run/user/1000/libvirt/libvirt-sock: connect: qemuxml2argvtest: QEMU XML-2-ARGV net-vhostuser-multiq

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agocheck-file-access: Allow specifying action
Michal Privoznik [Mon, 9 Jul 2018 08:53:17 +0000 (10:53 +0200)]
check-file-access: Allow specifying action

The check-file-access.pl script is used to match access list
generated by virtestmock against whitelisted rules stored in
file_access_whitelist.txt. So far the rules are in form:

  $path: $progname: $testname

This is not sufficient because the rule does not take into
account 'action' that caused $path to appear in the list of
accessed files. After this commit the rule can be in new form:

  $path: $action: $progname: $testname

where $action is one from ("open", "fopen", "access", "stat",
"lstat", "connect"). This way the white list can be fine tuned to
allow say access() but not connect().

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoqemuxml2argvtest: Set more fake drivers
Michal Privoznik [Thu, 12 Jul 2018 07:08:04 +0000 (09:08 +0200)]
qemuxml2argvtest: Set more fake drivers

So far we are setting only fake secret and storage drivers.
Therefore if the code wants to call a public NWFilter API (like
qemuBuildInterfaceCommandLine() and qemuBuildNetCommandLine() are
doing) the virGetConnectNWFilter() function will try to actually
spawn session daemon because there's no connection object set to
handle NWFilter driver.

Even though I haven't experienced the same problem with the rest
of the drivers (interface, network and node dev), the reasoning
above can be applied to them as well.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agotests: qemucapabilities: Update capability data for qemu 3.0.0
Peter Krempa [Mon, 30 Jul 2018 14:49:40 +0000 (16:49 +0200)]
tests: qemucapabilities: Update capability data for qemu 3.0.0

Update for the release of qemu 3.0.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
6 years agonews: Add support for MBA (Memory Bandwidth Allocation)
Bing Niu [Tue, 14 Aug 2018 05:05:29 +0000 (13:05 +0800)]
news: Add support for MBA (Memory Bandwidth Allocation)

Signed-off-by: Bing Niu <bing.niu@intel.com>
6 years agorpc: Initialize a worker pool for max_workers=0 as well
Marc Hartmayer [Tue, 7 Aug 2018 11:38:00 +0000 (13:38 +0200)]
rpc: Initialize a worker pool for max_workers=0 as well

Semantically, there is no difference between an uninitialized worker
pool and an initialized worker pool with zero workers. Let's allow the
worker pool to be initialized for max_workers=0 as well then which
makes the API more symmetric and simplifies code. Validity of the
worker pool is delegated to virThreadPoolGetMaxWorkers instead.

This patch fixes segmentation faults in
virNetServerGetThreadPoolParameters and
virNetServerSetThreadPoolParameters for the case when no worker pool
is actually initialized (max_workers=0).

Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
6 years agoxenapi: Drop check for auth
Marcos Paulo de Souza [Fri, 3 Aug 2018 00:27:55 +0000 (21:27 -0300)]
xenapi: Drop check for auth

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 <marcos.souza.org@gmail.com>
6 years agophyp: Drop check for auth and auth->cb
Marcos Paulo de Souza [Fri, 3 Aug 2018 00:27:54 +0000 (21:27 -0300)]
phyp: Drop check for auth and auth->cb

Since they are done inside virAuthGetPassword and virAuthGetUsername
when needed.

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
6 years agohyperv: Drop check for auth and auth->cb
Marcos Paulo de Souza [Fri, 3 Aug 2018 00:27:53 +0000 (21:27 -0300)]
hyperv: Drop check for auth and auth->cb

Since they are done inside virAuthGetPassword and virAuthGetUsername
when needed.

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
6 years agoesx: Drop check for auth and auth->cb
Marcos Paulo de Souza [Fri, 3 Aug 2018 00:27:52 +0000 (21:27 -0300)]
esx: Drop check for auth and auth->cb

Since they are done inside virAuthGetPassword and virAuthGetUsername
when needed.

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
6 years agovirauth.c: Check for valid auth callback
Marcos Paulo de Souza [Fri, 3 Aug 2018 00:27:51 +0000 (21:27 -0300)]
virauth.c: Check for valid auth callback

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 <marcos.souza.org@gmail.com>
6 years agolibvirt_iohelper: record the libvirt_iohelper's error message at virFileWrapperFdFree
xinhua.Cao [Mon, 23 Jul 2018 12:22:41 +0000 (20:22 +0800)]
libvirt_iohelper: record the libvirt_iohelper's error message at virFileWrapperFdFree

Currently iohelper's error log is recorded in virFileWrapperFdClose.
However, if something goes wrong the caller might not even get to
calling virFileWrapperFdClose and call virFileWrapperFdFree
directly. Therefore the error reporting should happen there.

Signed-off-by: xinhua.Cao <caoxinhua@huawei.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
6 years agotests: Add linux-high-ids test
Andrea Bolognani [Thu, 2 Aug 2018 15:24:48 +0000 (17:24 +0200)]
tests: Add linux-high-ids test

This proves libvirt can now handle high socket_id and
core_id values correctly and ensures we won't introduce
regressions in this area.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
6 years agoutils: Remove arbitrary limit on socket_id/core_id
Andrea Bolognani [Fri, 3 Aug 2018 08:15:16 +0000 (10:15 +0200)]
utils: Remove arbitrary limit on socket_id/core_id

While in most cases the values are going to be much
smaller than our arbitrary 4096 limit, there is really
no guarantee that would be the case: in fact, a few
aarch64 servers have been spotted in the wild with
core_id as high as 6216.

Take advantage of virBitmap's ability to automatically
alter its size at runtime to accomodate such values.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
6 years agotests: Drop core_siblings/thread_siblings files
Andrea Bolognani [Thu, 2 Aug 2018 14:20:41 +0000 (16:20 +0200)]
tests: Drop core_siblings/thread_siblings files

The latter are no longer used by libvirt, and the former
never were; moreover, both have a corresponding *_list
file which we can manipulate very conveniently using our
bitmap APIs, so dropping them makes sure in the future
developers will look into that rather than trying to
parse the kernel binary bitmaps.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
6 years agoutil: Rewrite virHostCPUCountThreadSiblings()
Andrea Bolognani [Thu, 2 Aug 2018 14:15:02 +0000 (16:15 +0200)]
util: Rewrite virHostCPUCountThreadSiblings()

We already have a function which parses
thread_siblings_list for a CPU and returns the
corresponding bitmap, and a bunch of utility functions
that perform operations on bitmaps such as counting
the number of set bits: use those to implement the
function instead of having an additional ad-hoc parser
for thread_siblings.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
6 years agotests: Add missing thread_siblings_list files
Andrea Bolognani [Thu, 2 Aug 2018 13:45:07 +0000 (15:45 +0200)]
tests: Add missing thread_siblings_list files

Some of the data dumps didn't include them; luckily,
we're not actually missing any information since we
can recreate them by looking at the corresponding
thread_sibilings files.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
6 years agotests: Drop unused data
Andrea Bolognani [Thu, 2 Aug 2018 16:09:04 +0000 (18:09 +0200)]
tests: Drop unused data

Added by mistake with commit a0fdd2f6f9a0.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
6 years agoutil: Drop VIR_HOST_CPU_MASK_LEN
Andrea Bolognani [Wed, 1 Aug 2018 08:32:50 +0000 (10:32 +0200)]
util: Drop VIR_HOST_CPU_MASK_LEN

Unused since commit c67e04e25fa5.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
6 years agospec: Enable the iscsi-direct storage driver conditionally
Andrea Bolognani [Tue, 14 Aug 2018 12:31:35 +0000 (14:31 +0200)]
spec: Enable the iscsi-direct storage driver conditionally

Most distributions we build RPMs on don't ship a
recent enough version of libiscsi, so we can't enable
the driver unconditionally. Add an explicit dependency
on the runtime package while at it.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
6 years agospec: Require libiscsi-devel instead of libiscsi
Andrea Bolognani [Tue, 14 Aug 2018 11:39:51 +0000 (13:39 +0200)]
spec: Require libiscsi-devel instead of libiscsi

Commit 34a6962c41b4 added a BuildRequires for the
iscsi-direct backend, but we need the headers rather
than the runtime package to be available in order to
link against the library.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
6 years agovirsh: Add missed fields to pool-define-as item entry
John Ferlan [Mon, 13 Aug 2018 12:19:30 +0000 (08:19 -0400)]
virsh: Add missed fields to pool-define-as item entry

https://bugzilla.redhat.com/show_bug.cgi?id=1615680

Commit id d45bee449 updated the pool-define-as qualifier descriptions
to add some new fields, but neglected to modify the command item list
in order to add those fields as well.

Signed-off-by: John Ferlan <jferlan@redhat.com>
6 years agoFix build on non-linux platforms after another VIR_AUTOPTR patches
Erik Skultety [Tue, 14 Aug 2018 10:08:51 +0000 (12:08 +0200)]
Fix build on non-linux platforms after another VIR_AUTOPTR patches

Caused by commit f7d0663d49. The problem is missing libnl library on
these platforms, so the VIR_DEFINE_AUTOPTR_FUNC has to be compiled in
conditionally.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
6 years agoconf: rename Match functions
Anya Harter [Mon, 13 Aug 2018 15:55:16 +0000 (11:55 -0400)]
conf: rename Match functions

name match functions to be the vir prefix and interface name followed by ObjMatch

    ex. for virNetworkObjListExport, the match function is named
        virNetworkObjMatch

Signed-off-by: Anya Harter <aharter@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
6 years agoconf: rename Export Callback functions
Anya Harter [Mon, 13 Aug 2018 15:55:15 +0000 (11:55 -0400)]
conf: rename Export Callback functions

name functions to be the name of the export function followed by Callback

    ex. for virInterfaceObjListExport, the callback function is named
        virInterfaceObjListExportCallback

Signed-off-by: Anya Harter <aharter@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
6 years agoconf: rename structs used by Export function
Anya Harter [Mon, 13 Aug 2018 15:55:14 +0000 (11:55 -0400)]
conf: rename structs used by Export function

name structs to be the name of the Export function followed by Data
also tweak definitions to follow standard struct definition pattern

    ex. for virInterfaceObjListExport, the struct is defined as follows:

        typedef struct _virInterfaceObjListExportData virInterfaceObjListExportData;
        typedef virInterfaceObjListExportData *virInterfaceObjListExportDataPtr;
        struct _virInterfaceObjListExportData {...};

Signed-off-by: Anya Harter <aharter@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
6 years agoesx: Fix build when libcurl debug is enabled
Marcos Paulo de Souza [Sat, 11 Aug 2018 14:39:29 +0000 (11:39 -0300)]
esx: Fix build when libcurl debug is enabled

When building libvirt with libcurl debug enabled (with
ESX_VI__CURL__ENABLE_DEBUG_OUTPUT set), the message bellow pops up:

make[3]: Entering directory '/mnt/data/gitroot/libvirt/src'
  CC       esx/libvirt_driver_esx_la-esx_vi.lo
esx/esx_vi.c: In function 'esxVI_CURL_Debug':
esx/esx_vi.c:191:5: error: enumeration value 'CURLINFO_SSL_DATA_IN' not handled in switch [-Werror=switch-enum]
     switch (type) {
     ^~~~~~
esx/esx_vi.c:191:5: error: enumeration value 'CURLINFO_SSL_DATA_OUT' not handled in switch [-Werror=switch-enum]
esx/esx_vi.c:191:5: 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 <marcos.souza.org@gmail.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
6 years agoconf: Add memory bandwidth allocation capability of host
Bing Niu [Mon, 30 Jul 2018 03:12:41 +0000 (11:12 +0800)]
conf: Add memory bandwidth allocation capability of host

Add new XML section to report host's memory bandwidth allocation
capability. The format as below example:

 <host>
 .....
   <memory_bandwidth>
     <node id='0' cpus='0-19'>
       <control granularity='10' min ='10' maxAllocs='8'/>
     </node>
   </memory_bandwidth>
</host>

granularity   ---- granularity of memory bandwidth, unit percentage.
min           ---- minimum memory bandwidth allowed, unit percentage.
maxAllocs     ---- maximum memory bandwidth allocation group supported.

Signed-off-by: Bing Niu <bing.niu@intel.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoconf: Add return value check to virResctrlAllocForeachCache
Bing Niu [Mon, 30 Jul 2018 03:12:40 +0000 (11:12 +0800)]
conf: Add return value check to virResctrlAllocForeachCache

Add return value check to virResctrlAllocForeachCache in
virDomainCachetuneDefFormat. The virResctrlAllocForeachCache does have
return value, so need check return value to make sure function executed
without error.

Signed-off-by: Bing Niu <bing.niu@intel.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoconf: Add support for memorytune XML processing for resctrl MBA
Bing Niu [Mon, 30 Jul 2018 03:12:39 +0000 (11:12 +0800)]
conf: Add support for memorytune XML processing for resctrl MBA

Introduce a new section memorytune to support memory bandwidth allocation.
This is consistent with existing cachetune. As the example:
below:
  <cputune>
    ......
    <memorytune vcpus='0'>
      <node id='0' bandwidth='30'/>
    </memorytune>
  </cputune>

vpus      --- vpus subjected to this memory bandwidth.
id        --- on which node memory bandwidth to be set.
bandwidth --- the memory bandwidth percent to set.

Signed-off-by: Bing Niu <bing.niu@intel.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoconf: Factor out virDomainResctrlDef update from virDomainCachetuneDefParse
Bing Niu [Mon, 30 Jul 2018 03:12:38 +0000 (11:12 +0800)]
conf: Factor out virDomainResctrlDef update from virDomainCachetuneDefParse

Factor out vcpus virDomainResctrlDef update from
virDomainCachetuneDefParse and introduce virDomainResctrlAppend.
virDomainResctrlAppend will format vcpus string and append a new
virDomainResctrlDef to virDomainDefPtr. So that this logic can
be reusable.

Signed-off-by: Bing Niu <bing.niu@intel.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoconf: Factor out vcpus overlapping from virDomainCachetuneDefParse
Bing Niu [Mon, 30 Jul 2018 03:12:37 +0000 (11:12 +0800)]
conf: Factor out vcpus overlapping from virDomainCachetuneDefParse

Factor out vcpus overlapping detecting part from
virDomainCachetuneDefParse and introduce virDomainResctrlVcpuMatch.
Instead of allocating virResctrlAllocPtr by default, allocating
virResctrlAllocPtr after confirm vcpus not overlap with existing ones.
And virDomainResctrlVcpuMatch can be reused by other resource control
technologies. virDomainResctrlVcpuMatch can clarify old vcpus overlap
error whether an overlap or a redefinition.

Signed-off-by: Bing Niu <bing.niu@intel.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoconf: Factor out vcpus parsing part from virDomainCachetuneDefParse
Bing Niu [Mon, 30 Jul 2018 03:12:36 +0000 (11:12 +0800)]
conf: Factor out vcpus parsing part from virDomainCachetuneDefParse

Extract vcpus parsing part from virDomainCachetuneDefParse into one
function called virDomainResctrlParseVcpus. So that vcpus parsing logic
can be reused by other resource control technologies. Adjust error
message and use node->name so that the error message can fit to all
technologies.

Signed-off-by: Bing Niu <bing.niu@intel.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoconf: Rename cachetune to resctrl
Bing Niu [Mon, 30 Jul 2018 03:12:35 +0000 (11:12 +0800)]
conf: Rename cachetune to resctrl

Resctrl not only supports cache tuning, but also memory bandwidth
tuning. Renaming cachetune to resctrl to reflect that. With resctrl,
all allocation for different resources (cache, memory bandwidth) are
aggregated and represented by a virResctrlAllocPtr inside
virDomainResctrlDef.

Signed-off-by: Bing Niu <bing.niu@intel.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoutil: Introduce virResctrlAllocSetMemoryBandwidth
Bing Niu [Mon, 30 Jul 2018 03:12:34 +0000 (11:12 +0800)]
util: Introduce virResctrlAllocSetMemoryBandwidth

Introduce an API to allow setting of the MBA from domain XML.

Signed-off-by: Bing Niu <bing.niu@intel.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoutil: Introduce virResctrlAllocForeachMemory
Bing Niu [Mon, 30 Jul 2018 03:12:33 +0000 (11:12 +0800)]
util: Introduce virResctrlAllocForeachMemory

Introduce an API that will traverse the memory bandwidth data calling
a callback function for each defined bandwidth entry.

Signed-off-by: Bing Niu <bing.niu@intel.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoutil: Add support to calculate MBA utilization
Bing Niu [Mon, 30 Jul 2018 03:12:32 +0000 (11:12 +0800)]
util: Add support to calculate MBA utilization

Introduce virResctrlMemoryBandwidthSubtract and
virResctrlAllocMemoryBandwidth to be used as part of
the virResctrlAllocAssign processing to configure
the available memory bandwidth.

Signed-off-by: Bing Niu <bing.niu@intel.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoutil: Add MBA schemata parse and format methods
Bing Niu [Mon, 30 Jul 2018 03:12:31 +0000 (11:12 +0800)]
util: Add MBA schemata parse and format methods

Introduce virResctrlAllocMemoryBandwidthFormat and
virResctrlAllocParseMemoryBandwidthLine which will format
and parse an entry in the schemata file for MBA.

Signed-off-by: Bing Niu <bing.niu@intel.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoutil: Add MBA allocation to virresctrl
Bing Niu [Mon, 30 Jul 2018 03:12:30 +0000 (11:12 +0800)]
util: Add MBA allocation to virresctrl

Add memory bandwidth allocation support to virresctrl class.
Introducing virResctrlAllocMemBW which is used for allocating memory
bandwidth. Following virResctrlAllocPerType, it also employs a
nested sparse array to indicate whether allocation is available for
particular last level cache.

Signed-off-by: Bing Niu <bing.niu@intel.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoutil: Add MBA check to virResctrlInfoGetCache
Bing Niu [Mon, 30 Jul 2018 03:12:29 +0000 (11:12 +0800)]
util: Add MBA check to virResctrlInfoGetCache

If we have some membw_info data, then we need to calculate the number
of MBA controllers on the system. The value cannot be obtained from a
direct query to the RDT kernel module, but it is the same as the last
level cache value which is calculated by traversing the cache hierarchy
of host(/sys/bus/cpu/devices/cpuX/cache/).

Signed-off-by: Bing Niu <bing.niu@intel.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoutil: Add MBA capability information query to resctrl
Bing Niu [Mon, 30 Jul 2018 03:12:28 +0000 (11:12 +0800)]
util: Add MBA capability information query to resctrl

Introducing virResctrlInfoMemBW for the information memory bandwidth
allocation information.

Signed-off-by: Bing Niu <bing.niu@intel.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoutil: Refactor virResctrlAllocFormat of virresctrl
Bing Niu [Mon, 30 Jul 2018 03:12:27 +0000 (11:12 +0800)]
util: Refactor virResctrlAllocFormat of virresctrl

Refactor virResctrlAllocFormat so that it is easy to support other
resource allocation technologies.

Signed-off-by: Bing Niu <bing.niu@intel.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoutil: Refactor virResctrlGetInfo in virresctrl
Bing Niu [Mon, 30 Jul 2018 03:12:26 +0000 (11:12 +0800)]
util: Refactor virResctrlGetInfo in virresctrl

Separate resctrl common information parts from CAT specific parts,
so that common information parts can be reused among different
resource allocation technologies.

Signed-off-by: Bing Niu <bing.niu@intel.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoutil: Rename some functions of virresctrl
Bing Niu [Mon, 30 Jul 2018 03:12:25 +0000 (11:12 +0800)]
util: Rename some functions of virresctrl

Some functions in virresctrl are for CAT only, while some of other
functions are for resource allocation, not just CAT. So change
their names to reflect the reality.

Signed-off-by: Bing Niu <bing.niu@intel.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoutil: netdevopenvswitch: use VIR_AUTOPTR for aggregate types
Sukrit Bhatnagar [Thu, 9 Aug 2018 04:12:18 +0000 (09:42 +0530)]
util: netdevopenvswitch: use VIR_AUTOPTR for aggregate types

By making use of GNU C's cleanup attribute handled by the
VIR_AUTOPTR macro for declaring aggregate pointer variables,
majority of the calls to *Free functions can be dropped, which
in turn leads to getting rid of most of our cleanup sections.

Signed-off-by: Sukrit Bhatnagar <skrtbhtngr@gmail.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
6 years agoutil: netdevip: use VIR_AUTOPTR for aggregate types
Sukrit Bhatnagar [Thu, 9 Aug 2018 04:12:17 +0000 (09:42 +0530)]
util: netdevip: use VIR_AUTOPTR for aggregate types

By making use of GNU C's cleanup attribute handled by the
VIR_AUTOPTR macro for declaring aggregate pointer variables,
majority of the calls to *Free functions can be dropped, which
in turn leads to getting rid of most of our cleanup sections.

Signed-off-by: Sukrit Bhatnagar <skrtbhtngr@gmail.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
6 years agoutil: netdevbridge: use VIR_AUTOPTR for aggregate types
Sukrit Bhatnagar [Thu, 9 Aug 2018 04:12:14 +0000 (09:42 +0530)]
util: netdevbridge: use VIR_AUTOPTR for aggregate types

By making use of GNU C's cleanup attribute handled by the
VIR_AUTOPTR macro for declaring aggregate pointer variables,
majority of the calls to *Free functions can be dropped, which
in turn leads to getting rid of most of our cleanup sections.

Signed-off-by: Sukrit Bhatnagar <skrtbhtngr@gmail.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
6 years agoutil: netdevbridge: use VIR_AUTOFREE instead of VIR_FREE for scalar types
Sukrit Bhatnagar [Thu, 9 Aug 2018 04:12:13 +0000 (09:42 +0530)]
util: netdevbridge: use VIR_AUTOFREE instead of VIR_FREE for scalar types

By making use of GNU C's cleanup attribute handled by the
VIR_AUTOFREE macro for declaring scalar variables, majority
of the VIR_FREE calls can be dropped, which in turn leads to
getting rid of most of our cleanup sections.

Signed-off-by: Sukrit Bhatnagar <skrtbhtngr@gmail.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
6 years agoutil: netlink: use VIR_AUTOPTR for aggregate types
Sukrit Bhatnagar [Thu, 9 Aug 2018 04:12:12 +0000 (09:42 +0530)]
util: netlink: use VIR_AUTOPTR for aggregate types

By making use of GNU C's cleanup attribute handled by the
VIR_AUTOPTR macro for declaring aggregate pointer variables,
majority of the calls to *Free functions can be dropped, which
in turn leads to getting rid of most of our cleanup sections.

Signed-off-by: Sukrit Bhatnagar <skrtbhtngr@gmail.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
6 years agoutil: netlink: use VIR_AUTOFREE instead of VIR_FREE for scalar types
Sukrit Bhatnagar [Thu, 9 Aug 2018 04:12:11 +0000 (09:42 +0530)]
util: netlink: use VIR_AUTOFREE instead of VIR_FREE for scalar types

By making use of GNU C's cleanup attribute handled by the
VIR_AUTOFREE macro for declaring scalar variables, majority
of the VIR_FREE calls can be dropped, which in turn leads to
getting rid of most of our cleanup sections.

Signed-off-by: Sukrit Bhatnagar <skrtbhtngr@gmail.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
6 years agoutil: netlink: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC
Sukrit Bhatnagar [Thu, 9 Aug 2018 04:12:10 +0000 (09:42 +0530)]
util: netlink: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC

Using the new VIR_DEFINE_AUTOPTR_FUNC macro defined in
src/util/viralloc.h, define a new wrapper around an existing
cleanup function which will be called when a variable declared
with VIR_AUTOPTR macro goes out of scope. Also, drop the redundant
viralloc.h include, since that has moved from the source module into
the header.

This commit also typedefs virNetlinkMsg to struct nl_msg type for use
with the cleanup macros.

When a variable of type virNetlinkMsg * is declared using VIR_AUTOPTR,
the function nlmsg_free will be run automatically on it when it
goes out of scope.

Signed-off-by: Sukrit Bhatnagar <skrtbhtngr@gmail.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
6 years agoutil: iscsi: use VIR_AUTOFREE instead of VIR_FREE for scalar types
Sukrit Bhatnagar [Thu, 9 Aug 2018 04:12:09 +0000 (09:42 +0530)]
util: iscsi: use VIR_AUTOFREE instead of VIR_FREE for scalar types

Add another usage for VIR_AUTOFREE macro which was left in the
commit ec3e878, thereby dropping a VIR_FREE call and and a cleanup
section.

Signed-off-by: Sukrit Bhatnagar <skrtbhtngr@gmail.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
6 years agospec: Add libvirt-daemon-driver-storage-iscsi-direct
Cole Robinson [Wed, 8 Aug 2018 23:43:25 +0000 (19:43 -0400)]
spec: Add libvirt-daemon-driver-storage-iscsi-direct

Signed-off-by: Cole Robinson <crobinso@redhat.com>
6 years agoqemu: Prefer nvdimmPath over hugepages for memory-backend-file
Michal Privoznik [Thu, 9 Aug 2018 14:29:17 +0000 (16:29 +0200)]
qemu: Prefer nvdimmPath over hugepages for memory-backend-file

If a domain has hugepages configured and we're currently building
memory-backend-file for a nvdimm device that domain has we will
put hugepages path onto the command line. It should have been
nvdimm path configured in the XML.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: fix MinGW build
Pavel Hrdina [Mon, 13 Aug 2018 14:03:03 +0000 (16:03 +0200)]
vircgroup: fix MinGW build

Broken by commit <901d2b9c87>.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agoesx: Fix nodeGetInfo so cpu model fits inside nodeinfo->model
Marcos Paulo de Souza [Sun, 12 Aug 2018 11:05:19 +0000 (08:05 -0300)]
esx: Fix nodeGetInfo so cpu model fits inside nodeinfo->model

Commit 6c0d0210cbcd5d647f0d882c07f077d444bc707d changed the behavior of
virStr*cpy* functions, so now the nodeGetInfo call fails. Version 4.1.0
(default for Fedora 28) works:

Model: Intel Core i7-4500U CPU @ 1.80G

Current master tries to write "Intel Core i7-4500U CPU @ 1.80GHz", but
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 <marcos.souza.org@gmail.com>
6 years agoRevert "build: add --with-jansson"
Ján Tomko [Mon, 13 Aug 2018 11:41:14 +0000 (13:41 +0200)]
Revert "build: add --with-jansson"

This reverts commit 12b34f094e2f1c7f414f4bb8f880a9d65c8fcd85.

Jansson cannot parse QEMU's quirky JSON.
Revert back to yajl.

https://bugzilla.redhat.com/show_bug.cgi?id=1614569

Conflicts:
  configure.ac:
    Commit 8aa85e0b introduced LIBVIRT_*_LIBISCSI macros.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
6 years agoRevert "build: undef WITH_JANSSON for SETUID_RPC_CLIENT"
Ján Tomko [Mon, 13 Aug 2018 11:40:25 +0000 (13:40 +0200)]
Revert "build: undef WITH_JANSSON for SETUID_RPC_CLIENT"

This reverts commit 93fdc9e0b0cbb2eec32745a868ac4633f0912ad5.

Jansson cannot parse QEMU's quirky JSON.
Revert back to yajl.

https://bugzilla.redhat.com/show_bug.cgi?id=1614569

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
6 years agoRevert "Switch from yajl to Jansson"
Ján Tomko [Mon, 13 Aug 2018 11:40:18 +0000 (13:40 +0200)]
Revert "Switch from yajl to Jansson"

This reverts commit 9cf38263d05ca7f27dbbd9b1a0b48d338d9280e2.

Jansson cannot parse QEMU's quirky JSON.
Revert back to yajl.

https://bugzilla.redhat.com/show_bug.cgi?id=1614569

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
6 years agoRevert "Remove functions using yajl"
Ján Tomko [Mon, 13 Aug 2018 11:40:11 +0000 (13:40 +0200)]
Revert "Remove functions using yajl"

This reverts commit bf114decb34f21cd225ead6dc4d929d35a8c5fe5.

Jansson cannot parse QEMU's quirky JSON.
Revert back to yajl.

https://bugzilla.redhat.com/show_bug.cgi?id=1614569

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
6 years agoRevert "build: remove references to WITH_YAJL for SETUID_RPC_CLIENT"
Ján Tomko [Mon, 13 Aug 2018 11:40:02 +0000 (13:40 +0200)]
Revert "build: remove references to WITH_YAJL for SETUID_RPC_CLIENT"

This reverts commit 1caf8441604b58e4a89aa2c09975b8346928c52a.

Jansson cannot parse QEMU's quirky JSON.
Revert back to yajl.

https://bugzilla.redhat.com/show_bug.cgi?id=1614569

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
6 years agoRevert "Remove virJSONValueNewStringLen"
Ján Tomko [Mon, 13 Aug 2018 11:39:56 +0000 (13:39 +0200)]
Revert "Remove virJSONValueNewStringLen"

This reverts commit 8f802c6d8659beb9eb3cab96ba2553e251728337.

Jansson cannot parse QEMU's quirky JSON.
Revert back to yajl.

https://bugzilla.redhat.com/show_bug.cgi?id=1614569

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
6 years agoRevert "build: switch --with-qemu default from yes to check"
Ján Tomko [Mon, 13 Aug 2018 11:39:48 +0000 (13:39 +0200)]
Revert "build: switch --with-qemu default from yes to check"

This reverts commit c5ae8e0c2b4b6bb3c667cfadaf65a66c3f4f3d85.

Jansson cannot parse QEMU's quirky JSON.
Revert back to yajl.

https://bugzilla.redhat.com/show_bug.cgi?id=1614569

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
6 years agoRevert "build: require Jansson if QEMU driver is enabled"
Ján Tomko [Mon, 13 Aug 2018 11:39:39 +0000 (13:39 +0200)]
Revert "build: require Jansson if QEMU driver is enabled"

This reverts commit 01ce04375c3348fd683475e5aa5231149ef6a78a.

Jansson cannot parse QEMU's quirky JSON.
Revert back to yajl.

https://bugzilla.redhat.com/show_bug.cgi?id=1614569

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
6 years agoRevert "m4: Introduce STABLE_ORDERING_JANSSON"
Ján Tomko [Mon, 13 Aug 2018 11:39:33 +0000 (13:39 +0200)]
Revert "m4: Introduce STABLE_ORDERING_JANSSON"

This reverts commit 4dd60540007042bfc0087a67f57f3e9f3311a84a.

Jansson cannot parse QEMU's quirky JSON.
Revert back to yajl.

https://bugzilla.redhat.com/show_bug.cgi?id=1614569

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
6 years agoRevert "tests: also skip qemuagenttest with old jansson"
Ján Tomko [Mon, 13 Aug 2018 11:39:25 +0000 (13:39 +0200)]
Revert "tests: also skip qemuagenttest with old jansson"

This reverts commit c31146685f5c8558ff88d52d03a68533c9220feb.

Jansson cannot parse QEMU's quirky JSON.
Revert back to yajl.

https://bugzilla.redhat.com/show_bug.cgi?id=1614569

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
6 years agoRevert "util: avoid symbol clash between json libraries"
Ján Tomko [Mon, 13 Aug 2018 11:39:16 +0000 (13:39 +0200)]
Revert "util: avoid symbol clash between json libraries"

This reverts commit ce3c6ef6843f98d81be5423ece11fad79eaab920.

Jansson cannot parse QEMU's quirky JSON.
Revert back to yajl.

https://bugzilla.redhat.com/show_bug.cgi?id=1614569

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
6 years agoRevert "tests: qemucapsprobe: Fix output after switching to jansson"
Ján Tomko [Mon, 13 Aug 2018 11:39:09 +0000 (13:39 +0200)]
Revert "tests: qemucapsprobe: Fix output after switching to jansson"

This reverts commit 397447f80588438545994a86883792a5999cad15.

Jansson cannot parse QEMU's quirky JSON.
Revert back to yajl.

https://bugzilla.redhat.com/show_bug.cgi?id=1614569

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
6 years agoRevert "util: jsoncompat: Stub out virJSONInitialize when compiling without jansson"
Ján Tomko [Mon, 13 Aug 2018 11:38:46 +0000 (13:38 +0200)]
Revert "util: jsoncompat: Stub out virJSONInitialize when compiling without jansson"

This reverts commit 9e44c2db8ad94d3c20acc1d081538c280af198b4.

Jansson cannot parse QEMU's quirky JSON.
Revert back to yajl.

https://bugzilla.redhat.com/show_bug.cgi?id=1614569

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
6 years agoRevert "remote: daemon: Make sure that JSON symbols are properly loaded at startup"
Ján Tomko [Mon, 13 Aug 2018 11:38:38 +0000 (13:38 +0200)]
Revert "remote: daemon: Make sure that JSON symbols are properly loaded at startup"

This reverts commit 3251fc9c9b9639c3fec3181530599415523d671a.

Jansson cannot parse QEMU's quirky JSON.
Revert back to yajl.

https://bugzilla.redhat.com/show_bug.cgi?id=1614569

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
6 years agoRevert "Fix link errors in tools/nss and tests"
Ján Tomko [Mon, 13 Aug 2018 11:38:28 +0000 (13:38 +0200)]
Revert "Fix link errors in tools/nss and tests"

This reverts commit b3d9b08ef797e569b14cfa42d3dceba23c2a5b14.

Jansson cannot parse QEMU's quirky JSON.
Revert back to yajl.

https://bugzilla.redhat.com/show_bug.cgi?id=1614569

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
6 years agoRevert "src: Move DLOPEN_LIBS to libraries introducing the dependency"
Ján Tomko [Mon, 13 Aug 2018 11:37:53 +0000 (13:37 +0200)]
Revert "src: Move DLOPEN_LIBS to libraries introducing the dependency"

This reverts commit 5d40272ea67c74049600e120095d1b42287ed2d2.

Jansson cannot parse QEMU's quirky JSON.
Revert back to yajl.

https://bugzilla.redhat.com/show_bug.cgi?id=1614569

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
6 years agonetworkStartNetworkVirtual: Don't leak macmap object
Michal Privoznik [Mon, 13 Aug 2018 09:17:20 +0000 (11:17 +0200)]
networkStartNetworkVirtual: Don't leak macmap object

When starting network a macmap object is created (which stores
MAC -> domain name mappings). However, if something goes wrong
(e.g. virNetDevIPCheckIPv6Forwarding() fails) then the object is
leaked.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
6 years agovirnetdevip: Free data.devices in virNetDevIPCheckIPv6Forwarding() too
Michal Privoznik [Mon, 13 Aug 2018 09:16:06 +0000 (11:16 +0200)]
virnetdevip: Free data.devices in virNetDevIPCheckIPv6Forwarding() too

We are freeing the individual strings (which were filled by
virNetDevIPCheckIPv6ForwardingCallback()) but not the array
itself.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
6 years agolxc: Use virCgroupGetMemoryStat
Pavel Hrdina [Fri, 20 Jul 2018 12:48:56 +0000 (14:48 +0200)]
lxc: Use virCgroupGetMemoryStat

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: Introduce virCgroupGetMemoryStat
Pavel Hrdina [Fri, 20 Jul 2018 12:47:11 +0000 (14:47 +0200)]
vircgroup: Introduce virCgroupGetMemoryStat

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: Remove virCgroupAddTaskController
Pavel Hrdina [Thu, 19 Jul 2018 12:39:43 +0000 (14:39 +0200)]
vircgroup: Remove virCgroupAddTaskController

There is no need for this function, both of the checks are done
later by virCgroupGetControllerPath.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: machinename will never be NULL
Pavel Hrdina [Tue, 31 Jul 2018 10:15:53 +0000 (12:15 +0200)]
vircgroup: machinename will never be NULL

Commit <eaf2c9f89107b9f60cf8db2c919f78b987ff7177> moved machineName
generation before virCgroupNewDetectMachine() is called.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: Introduce virCgroupEnableMissingControllers
Pavel Hrdina [Tue, 31 Jul 2018 10:09:40 +0000 (12:09 +0200)]
vircgroup: Introduce virCgroupEnableMissingControllers

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: Use virCgroupMountOptsMatchController in virCgroupDetectPlacement
Pavel Hrdina [Tue, 17 Jul 2018 11:43:55 +0000 (13:43 +0200)]
vircgroup: Use virCgroupMountOptsMatchController in virCgroupDetectPlacement

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: Extract mount options matching into function
Pavel Hrdina [Wed, 13 Jun 2018 16:12:18 +0000 (18:12 +0200)]
vircgroup: Extract mount options matching into function

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: Remove pointless bool parameter
Pavel Hrdina [Wed, 13 Jun 2018 13:05:57 +0000 (15:05 +0200)]
vircgroup: Remove pointless bool parameter

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: Move function used in tests into vircgrouppriv.h
Pavel Hrdina [Wed, 13 Jun 2018 10:55:27 +0000 (12:55 +0200)]
vircgroup: Move function used in tests into vircgrouppriv.h

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: Unexport unused function virCgroupRemoveRecursively
Pavel Hrdina [Fri, 20 Jul 2018 12:58:41 +0000 (14:58 +0200)]
vircgroup: Unexport unused function virCgroupRemoveRecursively

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: Unexport unused function virCgroupAddTaskController()
Pavel Hrdina [Wed, 13 Jun 2018 10:53:28 +0000 (12:53 +0200)]
vircgroup: Unexport unused function virCgroupAddTaskController()

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: Remove unused function virCgroupKill()
Pavel Hrdina [Wed, 13 Jun 2018 10:52:52 +0000 (12:52 +0200)]
vircgroup: Remove unused function virCgroupKill()

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: Extract file link resolving into separate function
Pavel Hrdina [Tue, 31 Jul 2018 10:08:08 +0000 (12:08 +0200)]
vircgroup: Extract file link resolving into separate function

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: Introduce standard set of typedefs and use them
Pavel Hrdina [Tue, 12 Jun 2018 11:47:10 +0000 (13:47 +0200)]
vircgroup: Introduce standard set of typedefs and use them

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: Rename structs to start with underscore
Pavel Hrdina [Tue, 12 Jun 2018 11:46:04 +0000 (13:46 +0200)]
vircgroup: Rename structs to start with underscore

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agodocs: Update how we create cgroup directory names
Pavel Hrdina [Thu, 19 Apr 2018 12:45:19 +0000 (14:45 +0200)]
docs: Update how we create cgroup directory names

Commit <c3bd0019c0> changed the way how cgroup directory names are
constructed but the documentation was not updated.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agodocs: List cpuacct in controllers used by QEMU driver
Pavel Hrdina [Thu, 19 Apr 2018 12:42:43 +0000 (14:42 +0200)]
docs: List cpuacct in controllers used by QEMU driver

The cpuacct controller is used to get cpu stats.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>