Re: [libvirt] [PATCH v2 05/10] Determine whether to start balloon memory stats gathering.

2013-07-11 Thread John Ferlan
On 07/11/2013 10:05 AM, Michal Privoznik wrote: On 08.07.2013 21:20, John Ferlan wrote: At vm startup, reconnect, and attach - check for the presence of the balloon driver and save the path in the private area of the driver. This path will remain constant throughout the life of the domain

Re: [libvirt] [PATCH v2 0/7] Resolve Coverity issues

2013-07-11 Thread John Ferlan
On 07/11/2013 12:02 PM, Daniel P. Berrange wrote: On Thu, Jul 11, 2013 at 11:16:22AM -0400, John Ferlan wrote: v1: https://www.redhat.com/archives/libvir-list/2013-July/msg00691.html Changes over v1: * Add additional files to patch #2 to include other places were sysconf(_SC_OPEN_MAX

[libvirt] [PATCH v3 00/10] Re-enable memballoon driver statistics reporting

2013-07-11 Thread John Ferlan
. In 04, all one could do would be virsh edit John Ferlan (10): Add qemuMonitorJSONGetObjectListPaths() method for QMP qom-list command Add qemuMonitorJSONGetObjectProperty() method for QMP qom-get command Add qemuMonitorJSONSetObjectProperty() method for QMP qom-set command

[libvirt] [PATCH v3 01/10] Add qemuMonitorJSONGetObjectListPaths() method for QMP qom-list command

2013-07-11 Thread John Ferlan
Add a new qemuMonitorJSONGetObjectListPaths() method to support invocation of the 'qom-list' JSON monitor command with a provided path. The returned list of paired data fields of name and type that can be used to peruse QOM configuration data and eventually utilize for the balloon statistics.

[libvirt] [PATCH v3 03/10] Add qemuMonitorJSONSetObjectProperty() method for QMP qom-set command

2013-07-11 Thread John Ferlan
Add a new qemuMonitorJSONSetObjectProperty() method to support invocation of the 'qom-set' JSON monitor command with a provided path, property, and expected data type to set. The test code uses the same /machine/i440fx property as the get test and attempts to set the realized property to true

[libvirt] [PATCH v3 05/10] Determine whether to start balloon memory stats gathering.

2013-07-11 Thread John Ferlan
At vm startup and attach attempt to set the balloon driver statistics collection period based on the value found in the domain xml file. This is not done at reconnect since it's possible that a collection period was set on the live guest and making the set period call would reset to whatever value

[libvirt] [PATCH v3 07/10] Add new public API virDomainSetMemoryStatsPeriodFlags

2013-07-11 Thread John Ferlan
Add new API in order to set the balloon memory driver statistics collection period in order to allow dynamic period adjustment for the virsh dommemstats to display balloon stats data --- include/libvirt/libvirt.h.in | 3 +++ src/driver.h | 6 + src/libvirt.c|

[libvirt] [PATCH v3 10/10] Allow balloon driver collection to be adjusted dynamically

2013-07-11 Thread John Ferlan
Use the virDomainSetMemoryStatsPeriodFlags() to pass a period defined by usage of a new --period option in order to set the collection period for the balloon driver. This may enable or disable the collection based on the value. Add the --current, --live, --config options to dommemstat. ---

[libvirt] [PATCH v3 02/10] Add qemuMonitorJSONGetObjectProperty() method for QMP qom-get command

2013-07-11 Thread John Ferlan
Add a new qemuMonitorJSONGetObjectProperty() method to support invocation of the 'qom-get' JSON monitor command with a provided path, property, and expected data type return. The qemuMonitorJSONObjectProperty is similar to virTypedParameter; however, a future patch will extend it a bit to include

[libvirt] [PATCH v3 08/10] Specify remote protocol for virDomainSetMemoryStatsPeriodFlags

2013-07-11 Thread John Ferlan
Wire up the remote protocol --- src/remote/remote_driver.c | 1 + src/remote/remote_protocol.x | 15 ++- src/remote_protocol-structs | 6 ++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index

[libvirt] [PATCH v3 09/10] Implement the virDomainSetMemoryStatsPeriodFlags for QEMU driver

2013-07-11 Thread John Ferlan
Implement the new API that will handle setting the balloon driver statistics collection period in order to enable or disable the collection dynamically. --- src/qemu/qemu_driver.c | 65 ++ 1 file changed, 65 insertions(+) diff --git

[libvirt] [PATCH v3 06/10] Add capability to fetch balloon stats

2013-07-11 Thread John Ferlan
This patch will add the qemuMonitorJSONGetMemoryStats() to execute a guest-stats on the balloonpath using get-qom replacing the former mechanism which looked through the query-ballon returned data for the fields. The query-balloon code only returns 'actual' memory. Rather than duplicating the

[libvirt] [PATCH v3 04/10] Add 'period' for Memballoon statistics gathering capability

2013-07-11 Thread John Ferlan
Add a period in seconds to allow/enable statistics gathering from the Balloon driver for 'virsh dommemstat domain'. --- docs/formatdomain.html.in | 10 ++ docs/schemas/domaincommon.rng | 7 +++ src/conf/domain_conf.c| 38 +++---

Re: [libvirt] [PATCH v3 05/10] Determine whether to start balloon memory stats gathering.

2013-07-12 Thread John Ferlan
On 07/12/2013 08:39 AM, Daniel P. Berrange wrote: On Thu, Jul 11, 2013 at 07:55:55PM -0400, John Ferlan wrote: At vm startup and attach attempt to set the balloon driver statistics collection period based on the value found in the domain xml file. This is not done at reconnect since it's

Re: [libvirt] [PATCH v3 04/10] Add 'period' for Memballoon statistics gathering capability

2013-07-12 Thread John Ferlan
On 07/12/2013 08:35 AM, Daniel P. Berrange wrote: ps, forgot to mention last time that you need to add a test case for this new XML - or just add the XML to 1. Copied qemuxml2argv-balloon-device.xml to qemuxml2argv-balloon-device-period.xml, adding stats period='10'/ 2. Copied

Re: [libvirt] [PATCH v3 05/10] Determine whether to start balloon memory stats gathering.

2013-07-12 Thread John Ferlan
On 07/12/2013 08:39 AM, Daniel P. Berrange wrote: On Thu, Jul 11, 2013 at 07:55:55PM -0400, John Ferlan wrote: At vm startup and attach attempt to set the balloon driver statistics collection period based on the value found in the domain xml file. This is not done at reconnect since it's

Re: [libvirt] [PATCH v3 10/10] Allow balloon driver collection to be adjusted dynamically

2013-07-12 Thread John Ferlan
On 07/12/2013 08:45 AM, Daniel P. Berrange wrote: On Thu, Jul 11, 2013 at 07:56:00PM -0400, John Ferlan wrote: ...snip... index 5fbd32c..4cbf105 100644 --- a/tools/virsh-domain-monitor.c +++ b/tools/virsh-domain-monitor.c @@ -314,6 +314,23 @@ static const vshCmdOptDef opts_dommemstat

Re: [libvirt] [PATCH v3 06/10] Add capability to fetch balloon stats

2013-07-12 Thread John Ferlan
On 07/12/2013 08:42 AM, Daniel P. Berrange wrote: On Thu, Jul 11, 2013 at 07:55:56PM -0400, John Ferlan wrote: This patch will add the qemuMonitorJSONGetMemoryStats() to execute a guest-stats on the balloonpath using get-qom replacing the former mechanism which looked through the query-ballon

Re: [libvirt] [PATCH v4 7/9] qemu: Introduce qemuBuildChrDeviceStr

2013-07-12 Thread John Ferlan
On 07/10/2013 01:02 PM, Michal Privoznik wrote: The function being introduced is responsible for creating command line argument for '-device' for given character device. Based on the chardev type, it calls appropriate qemuBuild.*ChrDeviceStr(), e.g. qemuBuildSerialChrDeviceStr() for serial

Re: [libvirt] [PATCH v3 03/10] Add qemuMonitorJSONSetObjectProperty() method for QMP qom-set command

2013-07-12 Thread John Ferlan
On 07/12/2013 11:57 AM, Eric Blake wrote: On 07/12/2013 06:35 AM, Daniel P. Berrange wrote: On Thu, Jul 11, 2013 at 07:55:53PM -0400, John Ferlan wrote: Add a new qemuMonitorJSONSetObjectProperty() method to support invocation of the 'qom-set' JSON monitor command with a provided path

Re: [libvirt] [PATCH v3 00/10] Re-enable memballoon driver statistics reporting

2013-07-15 Thread John Ferlan
On 07/15/2013 05:57 AM, Jiri Denemark wrote: On Thu, Jul 11, 2013 at 19:55:50 -0400, John Ferlan wrote: This patch set replaces: https://www.redhat.com/archives/libvir-list/2013-July/msg00435.html Changes 07 - 09- Remove the flags, Flags, FLAGS (learned something new!) Just remember

[libvirt] [PATCH v3 1/7] storage_conf: Adjust virStoragePoolAuthType enum

2013-07-15 Thread John Ferlan
Generate and use the virStoragePoolAuthTypeType{To|From}String helpers --- src/conf/storage_conf.c | 19 +++ src/conf/storage_conf.h | 3 +++ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index 524a4d6..9bcfced

[libvirt] [PATCH v3 3/7] storage_conf: Move auth processing into virStoragePoolDefParseAuth

2013-07-15 Thread John Ferlan
Split processing of auth into its own function --- src/conf/storage_conf.c | 65 +++-- 1 file changed, 41 insertions(+), 24 deletions(-) diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index 9bcfced..1097de8 100644 ---

[libvirt] [PATCH v3 0/7] Support CHAP authentication for iscsi pool

2013-07-15 Thread John Ferlan
are for all intents the same except for a few letters ('eph' and 'hap') * Updated Osier's change to storage_backend_iscsi.c in order to remove the 'login'/'passwd' options. Ran 'make' 'make check' each step along the way. Also tested with valgrind with no new errors. John Ferlan (6

[libvirt] [PATCH v3 2/7] storage_conf: Introduce virStoragePoolAuthSecretPtr

2013-07-15 Thread John Ferlan
Split out the _virStoragePoolAuthSecret data from _virStoragePoolAuthCephx into its own structure --- src/conf/storage_conf.h | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/conf/storage_conf.h b/src/conf/storage_conf.h index 98339ef..5fbecf4 100644 ---

[libvirt] [PATCH v3 7/7] storage: Support chap authentication for iscsi pool

2013-07-15 Thread John Ferlan
From: Osier Yang jy...@redhat.com Although the XML for chap authentication with plain password was introduced long ago, the function was never implemented. This patch completes it by performing the authentication during findPoolSources() processing of pools with an authType of

[libvirt] [PATCH v3 5/7] storage_conf: Move username processing into common function

2013-07-15 Thread John Ferlan
Move the auth-username processing into virStoragePoolDefParseAuth save the resulting username into chap/cephx specific data --- src/conf/storage_conf.c | 30 ++ 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/src/conf/storage_conf.c

[libvirt] [PATCH v3 4/7] storage_pool: Rework chap XML to mimic ceph

2013-07-15 Thread John Ferlan
The existing 'chap' XML logic was never used - just defined. Rather than try to insert a square peg into a round hole, blow it up and rewrite the logic to follow the 'ceph' format. Remove the former chap.login and chap.passwd fields and replace with chap.username and chap.secret in

[libvirt] [PATCH v3 6/7] storage_conf: Merge AuthChap and AuthCephx into AuthSecret

2013-07-15 Thread John Ferlan
Merge virStoragePoolDefParseAuthChap and virStoragePoolDefParseAuthCephx into a common virStoragePoolDefParseAuthSecret. Change the output to be common for both by putting 'type' first followed by 'username'. Need to adjust a test output for that too. --- src/conf/storage_conf.c | 60

Re: [libvirt] [PATCH v5 1/5] qemuBuildChrDeviceCommandLine: Don't leak devstr

2013-07-15 Thread John Ferlan
On 07/15/2013 08:11 AM, Daniel P. Berrange wrote: On Fri, Jul 12, 2013 at 07:23:58PM +0200, Michal Privoznik wrote: It's caller's responsibility to free return value of qemuBuildChrDeviceStr(). --- src/qemu/qemu_command.c | 1 + 1 file changed, 1 insertion(+) diff --git

Re: [libvirt] [PATCH v2 6/7] storage: Support chap authentication for iscsi pool

2013-07-15 Thread John Ferlan
On 07/15/2013 10:16 AM, Osier Yang wrote: On 10/07/13 03:10, John Ferlan wrote: From: Osier Yang jy...@redhat.com ...snip... diff --git a/src/storage/storage_backend_iscsi.c b/src/storage/storage_backend_iscsi.c index 0a4cd22..673ca16 100644 --- a/src/storage/storage_backend_iscsi.c +++ b

Re: [libvirt] [PATCH v3 6/7] storage_conf: Merge AuthChap and AuthCephx into AuthSecret

2013-07-15 Thread John Ferlan
On 07/15/2013 11:00 AM, Daniel P. Berrange wrote: On Mon, Jul 15, 2013 at 09:04:34AM -0400, John Ferlan wrote: Merge virStoragePoolDefParseAuthChap and virStoragePoolDefParseAuthCephx into a common virStoragePoolDefParseAuthSecret. Change the output to be common for both by putting 'type

Re: [libvirt] [PATCH v2 6/7] storage: Support chap authentication for iscsi pool

2013-07-15 Thread John Ferlan
On 07/15/2013 11:11 AM, Osier Yang wrote: On 15/07/13 23:01, John Ferlan wrote: On 07/15/2013 10:16 AM, Osier Yang wrote: On 10/07/13 03:10, John Ferlan wrote: From: Osier Yang jy...@redhat.com ...snip... i think the chap auth iscsi pool won't be able to start with this change

Re: [libvirt] [PATCH v3 00/10] Re-enable memballoon driver statistics reporting

2013-07-15 Thread John Ferlan
On 07/11/2013 07:55 PM, John Ferlan wrote: This patch set replaces: https://www.redhat.com/archives/libvir-list/2013-July/msg00435.html Changes 01 - No change 02 03 - Adjust typecaste to switch() and remove default: 04 - Use unsigned int as requested 05 - Add

Re: [libvirt] [PATCH v3 0/7] Support CHAP authentication for iscsi pool

2013-07-15 Thread John Ferlan
On 07/15/2013 09:04 AM, John Ferlan wrote: Based on review comments of v2 posting (see 2/7 for specifics): https://www.redhat.com/archives/libvir-list/2013-July/msg00554.html I rewrote the storage_conf.c chap parsing code. I think the first 6 patches could be squashed into 1 for a final

[libvirt] [PATCH v4 0/3] Support CHAP authentication for iscsi pool

2013-07-15 Thread John Ferlan
'secretGetValue' directly rather than through the virSecretGetValue() API. Using the same connection paradigm for the chap/iscsi authentication path in order to access the secret driver 'secretGetValue' directly rather than through the virSecretGetValue() API. John Ferlan (3): Add a privileged field

[libvirt] [PATCH v4 3/3] storage: Support chap authentication for iscsi pool

2013-07-15 Thread John Ferlan
Although the XML for CHAP authentication with plain password was introduced long ago, the function was never implemented. This patch replaces the login/password mechanism by following the 'ceph' (or RBD) model of using a 'username' with a 'secret' which has the authentication information. This

[libvirt] [PATCH v4 1/3] Add a privileged field to storageDriverState

2013-07-15 Thread John Ferlan
Use the privileged value in order to generate a connection which could be passed to the various storage backend drivers. In particular, the iSCSI driver will need a connect in order to perform pool authentication using the 'chap' secrets. Additionally, the RBD backend utilizes the connection

[libvirt] [PATCH v4 2/3] Adjust 'ceph' authentication secret usage for rbd pool.

2013-07-15 Thread John Ferlan
Update virStorageBackendRBDOpenRADOSConn() to use the internal API to the secret driver in order to get the secret value instead of the external virSecretGetValue() path. Without the flag VIR_SECRET_GET_VALUE_INTERNAL_CALL there is no way to get the value of private secret. This also requires

Re: [libvirt] [PATCH v4 1/3] Add a privileged field to storageDriverState

2013-07-16 Thread John Ferlan
On 07/16/2013 05:31 AM, Daniel P. Berrange wrote: On Tue, Jul 16, 2013 at 09:44:52AM +0100, Daniel P. Berrange wrote: On Mon, Jul 15, 2013 at 04:26:10PM -0400, John Ferlan wrote: Use the privileged value in order to generate a connection which could be passed to the various storage backend

Re: [libvirt] [PATCH v3 00/10] Re-enable memballoon driver statistics reporting

2013-07-16 Thread John Ferlan
On 07/11/2013 07:55 PM, John Ferlan wrote: This patch set replaces: https://www.redhat.com/archives/libvir-list/2013-July/msg00435.html Changes 01 - No change 02 03 - Adjust typecaste to switch() and remove default: 04 - Use unsigned int as requested 05 - Add

[libvirt] [PATCH v2 2/7] conf: Introduce new XML tag mode for disk source

2013-07-18 Thread John Ferlan
From: Osier Yang jy...@redhat.com There are two ways to use a iSCSI LUN as disk source for qemu. * The LUN's path as it shows up on host, e.g. /dev/disk/by-path/ip-$ip:3260-iscsi-$iqn-fc18:iscsi.iscsi0-lun-1 * The libiscsi URI, e.g. iscsi://demo.org:6000/iqn.1992-01.com.example/1 For a

[libvirt] [PATCH v2 3/7] conf: Introduce virDomainDiskSourceIsBlockType

2013-07-18 Thread John Ferlan
Introduce a new helper to check if the disk source is of block type --- src/conf/domain_conf.c | 41 + src/conf/domain_conf.h | 3 +++ src/libvirt_private.syms | 1 + src/qemu/qemu_command.c | 5 ++--- src/qemu/qemu_conf.c | 23

[libvirt] [PATCH v2 6/7] conf: Ignore the volume type disk if its mode is uri

2013-07-18 Thread John Ferlan
From: Osier Yang jy...@redhat.com virDomainDiskDefForeachPath is not only used by the security setting helpers, also used by cgroup setting helpers, so this is to ignore the volume type disk with mode=uri for cgroup setting. --- src/conf/domain_conf.c | 5 - 1 file changed, 4 insertions(+),

[libvirt] [PATCH v2 4/7] qemu: Translate the iscsi pool/volume disk source

2013-07-18 Thread John Ferlan
The difference with already supported pool types (dir, fs, block) is: there are two modes for iscsi pool (or network pools in future), one can specify it either to use the volume target path (the path showed up on host) with mode='host', or to use the remote URI qemu supports (e.g.

[libvirt] [PATCH v2 5/7] tests: Add various network and volume definitions

2013-07-18 Thread John Ferlan
Although they produce no seclabel data, add some tests for coverage of various network and volume disk definitions --- tests/securityselinuxlabeldata/netdisks.txt | 5 +++ tests/securityselinuxlabeldata/netdisks.xml | 58 + tests/securityselinuxlabeldata/voldisks.txt

[libvirt] [PATCH v2 0/7] Support to use iscsi storage in domain conf

2013-07-18 Thread John Ferlan
pool that labels could be attached to, but was unsuccessful. * Patch 6 7 (formerly 5 6) - no change. Now that I know more about the code the issue I had with 6 is a no-op John Ferlan (3): conf: Introduce virDomainDiskSourceIsBlockType qemu: Translate the iscsi pool/volume disk source

[libvirt] [PATCH v2 7/7] qemu: Translate the volume type disk source before cgroup setting

2013-07-18 Thread John Ferlan
From: Osier Yang jy...@redhat.com The translation must be done before both of cgroup and security setting, otherwise since the disk source is not translated yet, it might be skipped on cgroup and security setting. --- src/qemu/qemu_process.c | 13 - 1 file changed, 8 insertions(+), 5

Re: [libvirt] [PATCH v2 3/7] conf: Introduce virDomainDiskSourceIsBlockType

2013-07-18 Thread John Ferlan
On 07/18/2013 11:02 AM, John Ferlan wrote: Introduce a new helper to check if the disk source is of block type --- src/conf/domain_conf.c | 41 + src/conf/domain_conf.h | 3 +++ src/libvirt_private.syms | 1 + src/qemu/qemu_command.c | 5

[libvirt] [PATCH v3 2/7] conf: Introduce new XML tag mode for disk source

2013-07-19 Thread John Ferlan
There are two ways to use a iSCSI LUN as disk source for qemu. * The LUN's path as it shows up on host, e.g. /dev/disk/by-path/ip-$ip:3260-iscsi-$iqn-fc18:iscsi.iscsi0-lun-1 * The libiscsi URI from the storage pool source element host attribute, e.g.

[libvirt] [PATCH v3 1/7] storage_iscsi: Reflect the default target port

2013-07-19 Thread John Ferlan
Make sure default iSCSI target is 3260. --- src/storage/storage_backend_iscsi.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/storage/storage_backend_iscsi.c b/src/storage/storage_backend_iscsi.c index ba4f388..54bcd14 100644 ---

[libvirt] [PATCH v3 0/7] Support to use iscsi storage in domain conf

2013-07-19 Thread John Ferlan
of qemuAddDiskISCSIUri. Also added a check in the function that (pooldef-source.nhost != 1) to make sure we at least have a host defined in the pool and of course that there's only one. John Ferlan (5): storage_iscsi: Reflect the default target port conf: Introduce new XML tag mode for disk source

[libvirt] [PATCH v3 7/7] qemu: Translate the volume type disk source before cgroup setting

2013-07-19 Thread John Ferlan
From: Osier Yang jy...@redhat.com The translation must be done before both of cgroup and security setting, otherwise since the disk source is not translated yet, it might be skipped on cgroup and security setting. --- src/qemu/qemu_process.c | 13 - 1 file changed, 8 insertions(+), 5

[libvirt] [PATCH v3 6/7] conf: Ignore the volume type disk if its mode is direct

2013-07-19 Thread John Ferlan
From: Osier Yang jy...@redhat.com virDomainDiskDefForeachPath is not only used by the security setting helpers, also used by cgroup setting helpers, so this is to ignore the volume type disk with mode=direct for cgroup setting. --- src/conf/domain_conf.c | 5 - 1 file changed, 4

[libvirt] [PATCH v3 4/7] qemu: Translate the iscsi pool/volume disk source

2013-07-19 Thread John Ferlan
The difference with already supported pool types (dir, fs, block) is: there are two modes for iscsi pool (or network pools in future), one can specify it either to use the volume target path (the path showed up on host) with mode='host', or to use the remote URI qemu supports (e.g.

[libvirt] [PATCH v3 3/7] conf: Introduce virDomainDiskSourceIsBlockType

2013-07-19 Thread John Ferlan
Introduce a new helper to check if the disk source is of block type --- src/conf/domain_conf.c | 32 src/conf/domain_conf.h | 3 +++ src/libvirt_private.syms | 1 + src/qemu/qemu_command.c | 5 ++--- src/qemu/qemu_conf.c | 23 +-- 5

[libvirt] [PATCH v3 5/7] tests: Add various network and volume definitions

2013-07-19 Thread John Ferlan
Although they produce no seclabel data, add some tests for coverage of various network and volume disk definitions --- tests/securityselinuxlabeldata/netdisks.txt | 5 +++ tests/securityselinuxlabeldata/netdisks.xml | 58 + tests/securityselinuxlabeldata/voldisks.txt

Re: [libvirt] [PATCH v3 5/7] tests: Add various network and volume definitions

2013-07-22 Thread John Ferlan
On 07/22/2013 07:06 AM, Osier Yang wrote: On 19/07/13 20:32, John Ferlan wrote: Although they produce no seclabel data, add some tests for coverage of various network and volume disk definitions --- tests/securityselinuxlabeldata/netdisks.txt | 5 +++ tests/securityselinuxlabeldata

Re: [libvirt] [PATCH v3 0/7] Support to use iscsi storage in domain conf

2013-07-22 Thread John Ferlan
On 07/19/2013 08:32 AM, John Ferlan wrote: An update to yesterday's posting: https://www.redhat.com/archives/libvir-list/2013-July/msg01213.html Changes in v3 over v2 * Update patch 1 per code review * Use 'direct' instead of 'uri' and supporting documentaiton * In patch 4, use

[libvirt] [PATCH v5 1/5] qemu: Add source pool auth info to virDomainDiskDef for iSCSI

2013-07-22 Thread John Ferlan
During qemuTranslateDiskSourcePool() execution, if the srcpool has been defined with authentication information, then for iSCSI pools copy the authentication and host information to virDomainDiskDef. --- src/qemu/qemu_conf.c | 55 1 file

[libvirt] [PATCH v5 5/5] Adjust 'ceph' authentication secret usage for rbd pool.

2013-07-22 Thread John Ferlan
Update virStorageBackendRBDOpenRADOSConn() to use the internal API to the secret driver in order to get the secret value instead of the external virSecretGetValue() path. Without the flag VIR_SECRET_GET_VALUE_INTERNAL_CALL there is no way to get the value of private secret. This also requires

[libvirt] [PATCH v5 2/5] qemu: Create a common qemuGetSecretString

2013-07-22 Thread John Ferlan
Make the secret fetching code common for qemuBuildRBDString() and qemuBuildDriveURIString() using the virDomainDiskDef. --- src/qemu/qemu_command.c | 157 +--- 1 file changed, 81 insertions(+), 76 deletions(-) diff --git a/src/qemu/qemu_command.c

[libvirt] [PATCH v5 3/5] qemu_common: Create qemuBuildVolumeString() to process storage pool

2013-07-22 Thread John Ferlan
Split out into its own separate routine --- src/qemu/qemu_command.c | 108 1 file changed, 64 insertions(+), 44 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 5bd8e87..ac275c3 100644 --- a/src/qemu/qemu_command.c

[libvirt] [PATCH v5 0/5] Support CHAP authentication for iscsi pool

2013-07-22 Thread John Ferlan
for NULL connection. This just stops autostarting pools from getting authentication. This still needs to be fixed/resolved, but there just wasn't time in this release for that. 5. Split the rbd authentication code into it's own patch rather than being part of the iscsi patch 4. John

[libvirt] [PATCH v5 4/5] storage: Support chap authentication for iscsi pool

2013-07-22 Thread John Ferlan
Although the XML for CHAP authentication with plain password was introduced long ago, the function was never implemented. This patch replaces the login/password mechanism by following the 'ceph' (or RBD) model of using a 'username' with a 'secret' which has the authentication information. This

Re: [libvirt] [PATCH v5 4/5] storage: Support chap authentication for iscsi pool

2013-07-23 Thread John Ferlan
On 07/23/2013 10:18 AM, Ján Tomko wrote: On 07/22/2013 10:31 PM, John Ferlan wrote: --- src/storage/storage_backend_iscsi.c | 111 +++- 1 file changed, 110 insertions(+), 1 deletion(-) I can confirm this works, but it's a shame it doesn't work

Re: [libvirt] [PATCH v5 0/5] Support CHAP authentication for iscsi pool

2013-07-23 Thread John Ferlan
On 07/22/2013 04:31 PM, John Ferlan wrote: This is a reworking and reposting of the authentication patches originally posted as part of my v3 reworking of Osier's original patches, see: ...snip... John Ferlan (5): qemu: Add source pool auth info to virDomainDiskDef for iSCSI qemu: Create

Re: [libvirt] [PATCH v5 4/5] storage: Support chap authentication for iscsi pool

2013-07-23 Thread John Ferlan
On 07/23/2013 10:56 AM, Daniel P. Berrange wrote: ...snip... +++ b/src/storage/storage_backend_iscsi.c @@ -714,7 +714,8 @@ virStorageBackendISCSISetAuth(const char *portal, if (!conn) { virReportError(VIR_ERR_INTERNAL_ERROR, %s, - _(iscsi 'chap'

[libvirt] [PATCH 2/3] domain_event: Resolve memory leak found by Valgrind

2013-07-23 Thread John Ferlan
Commit id '4421e257' strdup'd devAlias, but didn't free Running qemuhotplugtest under valgrind resulted in the following: ==7375== 9 bytes in 1 blocks are definitely lost in loss record 11 of 70 ==7375==at 0x4A0887C: malloc (vg_replace_malloc.c:270) ==7375==by 0x37C1085D71: strdup

[libvirt] [PATCH 1/3] lxc: Resolve Coverity warning

2013-07-23 Thread John Ferlan
Commit 'c8695053' resulted in the following: Coverity error seen in the output: ERROR: REVERSE_INULL FUNCTION: lxcProcessAutoDestroy Due to the 'dom' being checked before 'dom-persistent' since 'dom' is already dereferenced prior to that. --- src/lxc/lxc_process.c | 2 +- 1 file

[libvirt] [PATCH 0/3] Miscellaneous Coverity Valgrind changes

2013-07-23 Thread John Ferlan
: https://www.redhat.com/archives/libvir-list/2013-July/msg01156.html and https://www.redhat.com/archives/libvir-list/2013-July/msg01158.html but did not completely resolve the failures. John Ferlan (3): lxc: Resolve Coverity warning domain_event: Resolve memory leak found by Valgrind

Re: [libvirt] [PATCH v3 4/7] qemu: Translate the iscsi pool/volume disk source

2013-07-23 Thread John Ferlan
On 07/23/2013 12:18 PM, Paolo Bonzini wrote: Il 23/07/2013 18:01, Daniel P. Berrange ha scritto: On Tue, Jul 23, 2013 at 05:35:57PM +0200, Paolo Bonzini wrote: Il 23/07/2013 16:14, Daniel P. Berrange ha scritto: Perhaps the default could be specified in a configuration file (and the default

Re: [libvirt] [PATCH v5 4/5] storage: Support chap authentication for iscsi pool

2013-07-23 Thread John Ferlan
On 07/23/2013 12:03 PM, Daniel P. Berrange wrote: On Tue, Jul 23, 2013 at 11:50:57AM -0400, John Ferlan wrote: On 07/23/2013 10:56 AM, Daniel P. Berrange wrote: ...snip... +++ b/src/storage/storage_backend_iscsi.c @@ -714,7 +714,8 @@ virStorageBackendISCSISetAuth(const char *portal

Re: [libvirt] [PATCH 3/3] valgrind.supp: Add more valgrind suppression paths

2013-07-23 Thread John Ferlan
On 07/23/2013 12:45 PM, Eric Blake wrote: On 07/23/2013 09:59 AM, John Ferlan wrote: Update based on recent run/failures seen --- tests/.valgrind.supp | 60 1 file changed, 60 insertions(+) diff --git a/tests/.valgrind.supp b/tests

Re: [libvirt] [PATCH v5 4/5] storage: Support chap authentication for iscsi pool

2013-07-24 Thread John Ferlan
On 07/24/2013 05:57 AM, Daniel P. Berrange wrote: On Wed, Jul 24, 2013 at 10:25:06AM +0200, Ján Tomko wrote: ...snip... Both secret and qemu drivers are registered after the storage driver on libvirtd startup, so autostarting these pools will only work on storage driver reload. On libvirtd

[libvirt] [PATCH 1/2] Separate out StateAutoStart from StateInitialize

2013-07-25 Thread John Ferlan
Separation allows for dependent drivers to be make a connection during the AutoStart phase of state initialization. --- src/driver.h | 4 src/libvirt.c | 23 ++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/src/driver.h b/src/driver.h index

[libvirt] [PATCH 0/2] Split driver StateAutoStart from StateInitialization

2013-07-25 Thread John Ferlan
opens again. John Ferlan (2): Separate out StateAutoStart from StateInitialize virStateDriver - Separate AutoStart from Initialize src/driver.h | 4 src/libvirt.c| 23 ++- src/libxl/libxl_driver.c | 18 +++--- src/lxc

[libvirt] [PATCH 2/2] virStateDriver - Separate AutoStart from Initialize

2013-07-25 Thread John Ferlan
Adjust these drivers to handle their Autostart functionality after each of the drivers has gone through their Initialization functions merge --- src/libxl/libxl_driver.c | 18 +++--- src/lxc/lxc_driver.c | 18 -- src/network/bridge_driver.c | 20

Re: [libvirt] [PATCH 2/2] virStateDriver - Separate AutoStart from Initialize

2013-07-25 Thread John Ferlan
On 07/25/2013 02:41 PM, Daniel P. Berrange wrote: On Thu, Jul 25, 2013 at 02:32:57PM -0400, John Ferlan wrote: Adjust these drivers to handle their Autostart functionality after each of the drivers has gone through their Initialization functions merge --- src/libxl/libxl_driver.c | 18

Re: [libvirt] [PATCH 4/4] Add inputpool to storagevolxml2argvtest

2013-07-26 Thread John Ferlan
...snip...? diff --git a/tests/storagevolxml2argvtest.c b/tests/storagevolxml2argvtest.c index b220994..3c338ce 100644 --- a/tests/storagevolxml2argvtest.c +++ b/tests/storagevolxml2argvtest.c @@ -11,10 +11,32 @@ const char create_tool[] = qemu-img; +/* createVol sets this on volume

Re: [libvirt] [PATCH] Resolve Coverity complaint in storagevolxml2argvtest

2013-07-26 Thread John Ferlan
On 07/26/2013 07:27 AM, Ján Tomko wrote: Ignore NULL pool in testSetVolumeType to silence Coverity, even though we only call it with NULL pool when vol is also NULL. (13) Event var_deref_model: Passing null pointer inputpool to function testSetVolumeType(virStorageVolDefPtr,

[libvirt] [PATCH v2 0/2] Split driver StateAutoStart from StateInitialization

2013-07-26 Thread John Ferlan
This is an update to change the 'int' AutoStart function to 'void' as was discussed in the initial review: https://www.redhat.com/archives/libvir-list/2013-July/msg01674.html John Ferlan (2): Separate out StateAutoStart from StateInitialize virStateDriver - Separate AutoStart from Initialize

[libvirt] [PATCH v2 2/2] virStateDriver - Separate AutoStart from Initialize

2013-07-26 Thread John Ferlan
Adjust these drivers to handle their Autostart functionality after each of the drivers has gone through their Initialization functions --- src/libxl/libxl_driver.c | 16 +--- src/lxc/lxc_driver.c | 16 ++-- src/network/bridge_driver.c | 18 +-

[libvirt] [PATCH v2 1/2] Separate out StateAutoStart from StateInitialize

2013-07-26 Thread John Ferlan
Separation allows for dependent drivers to be make a connection during the AutoStart phase of state initialization. --- src/driver.h | 4 src/libvirt.c | 14 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/driver.h b/src/driver.h index cc03e9f..be64333

Re: [libvirt] [PATCH v2 0/2] Split driver StateAutoStart from StateInitialization

2013-07-26 Thread John Ferlan
On 07/26/2013 07:50 AM, John Ferlan wrote: This is an update to change the 'int' AutoStart function to 'void' as was discussed in the initial review: https://www.redhat.com/archives/libvir-list/2013-July/msg01674.html John Ferlan (2): Separate out StateAutoStart from StateInitialize

Re: [libvirt] [PATCH 18/20] qemuagenttest: Introduce testing of shutdown commands

2013-08-01 Thread John Ferlan
On 07/30/2013 09:05 AM, Peter Krempa wrote: This patch exports a few utility functions and adds testing of shutdown commands of the guest agent. --- ...snip... + +static int +qemuAgentShutdownTestMonitorHandler(qemuMonitorTestPtr test, +

Re: [libvirt] [PATCH 14/20] qemumonitortestutils: Add the ability to check arguments of commands

2013-08-01 Thread John Ferlan
On 07/30/2013 09:05 AM, Peter Krempa wrote: ...snip... +/* this allows to add a responder that is able to check + * a (shallow) structure of arguments for a command */ +int +qemuMonitorTestAddItemParams(qemuMonitorTestPtr test, + const char *cmdname, +

Re: [libvirt] [PATCH 1/3] qemuagenttest: Fix checking of shutdown mode

2013-08-01 Thread John Ferlan
On 08/01/2013 10:39 AM, Peter Krempa wrote: Coverity complained about unused variable that contains the shutdown mode. The original intention was to check it against the requested mode. Also the fixed check reveald a mistake in the expected shutdown mode. Reported by John Ferlan

Re: [libvirt] [PATCH 3/3] qemumonitortestutils: Don't skip va_end() on error path

2013-08-01 Thread John Ferlan
On 08/01/2013 10:39 AM, Peter Krempa wrote: When allocation of memory failed the error path didn't call va_end() causing a coverity failure. Reported by John Ferlan. --- tests/qemumonitortestutils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ACK John -- libvir-list mailing

Re: [libvirt] [PATCH 2/3] qemuagenttest: Check invalid response in shutdown test

2013-08-01 Thread John Ferlan
On 08/01/2013 10:39 AM, Peter Krempa wrote: The shutdown test utilizes waiting for condition to exit the test. This addition will return an error for the shutdown command to see if the condition waiting code will not hang. --- tests/qemuagenttest.c | 23 +++ 1 file

[libvirt] [PATCH 0/2] Coverity/Valgrind issues

2013-08-01 Thread John Ferlan
of more traces. John Ferlan (2): tests: Coverity found new NULL_RETURNS valgrind: Adjust filter for _dl_allocate_tls tests/.valgrind.supp | 6 -- tests/jsontest.c | 8 +++- 2 files changed, 11 insertions(+), 3 deletions(-) -- 1.8.1.4 -- libvir-list mailing list libvir-list

[libvirt] [PATCH 1/2] tests: Coverity found new NULL_RETURNS

2013-08-01 Thread John Ferlan
Coverity reported the existing missing check of the return value and subsequent use from a call to virJSONValueFromString() in testJSONAddRemove(). --- tests/jsontest.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/jsontest.c b/tests/jsontest.c index

[libvirt] [PATCH 2/2] valgrind: Adjust filter for _dl_allocate_tls

2013-08-01 Thread John Ferlan
More tests are now using the path - adjust the filter to include any path from a test through ptrhread_create to _dl_allocate_tls --- tests/.valgrind.supp | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/.valgrind.supp b/tests/.valgrind.supp index f04912d..d4fef85

Re: [libvirt] [PATCH 0/2] Coverity/Valgrind issues

2013-08-01 Thread John Ferlan
On 08/01/2013 04:06 PM, John Ferlan wrote: One new Coverity defect was discovered from existing code in this mornings run. Also recent changes seem to have adjusted tests and provoked valgrind to find/display potential leaks. That path had already been vetted previously in a shorter stack

Re: [libvirt] [PATCH] nwfilter: Use -m conntrack rather than -m state

2013-08-06 Thread John Ferlan
On 08/06/2013 09:52 AM, Stefan Berger wrote: Since iptables version 1.4.16 '-m state --state NEW' is converted to '-m conntrack --ctstate NEW'. Therefore, when encountering this or later versions of iptables use '-m conntrack --ctstate'. Signed-off-by: Stefan Berger

Re: [libvirt] [PATCH] nwfilter: Use -m conntrack rather than -m state

2013-08-06 Thread John Ferlan
On 08/06/2013 12:43 PM, Stefan Berger wrote: On 08/06/2013 11:20 AM, John Ferlan wrote: On 08/06/2013 09:52 AM, Stefan Berger wrote: Since iptables version 1.4.16 '-m state --state NEW' is converted to '-m conntrack --ctstate NEW'. Therefore, when encountering this or later versions

Re: [libvirt] [PATCH v2] nwfilter: Use -m conntrack rather than -m state

2013-08-06 Thread John Ferlan
On 08/06/2013 07:46 PM, Stefan Berger wrote: Since iptables version 1.4.16 '-m state --state NEW' is converted to '-m conntrack --ctstate NEW'. Therefore, when encountering this or later versions of iptables use '-m conntrack --ctstate'. Signed-off-by: Stefan Berger

[libvirt] [PATCH 1/6] virsh: Print cephx and iscsi usage

2013-08-07 Thread John Ferlan
When using virsh secret-list - if the secret types are cephx or iscsi, then allow fetch/print of the usage information. Prior to the change the following would print: UUID Usage ---

[libvirt] [PATCH 0/6] Additional iSCSI/chap changes

2013-08-07 Thread John Ferlan
patches update the documentation to show how to use secrets, pools, and iSCIS devices in the domain. John Ferlan (6): virsh: Print cephx and iscsi usage qemu_conf: Fix broken logic for adding passthrough iscsi lun Report secret usage error message similarly docs: Update the formatdomain

[libvirt] [PATCH 4/6] docs: Update the formatdomain disk examples

2013-08-07 Thread John Ferlan
Add more iSCSI examples including having a secret attached. There are 4 new examples one for each way to have an iSCSI - a network disk using virtio, a passthrough network lun using scsi, a volume disk using mode='host', and a volume disk using mode='direct' --- docs/formatdomain.html.in | 57

<    1   2   3   4   5   6   7   8   9   10   >