Re: [PATCH 0/5] Reorganize storage auth (both disk and pool)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 27.06.2014 17:11, John Ferlan wrote:
While understandably not really a 1.2.6 candidate, I figured I'd post this
now in hopes that it gets the ball rolling.  The changes will help with
a related bz to support libiscsi for SCSI passthrough devices where a
<hostdev> entry for an iscsi adapter would be able to have <auth> data.

The bulk of changes are code motion/merge. The details for each are:

The first patch will create new API's which will then be used by the
parse domain disk and the parse storage pool code if the "<auth" element
is found. The logic merges the parsing found in the domain disk and
storage pool code with one slight caveat - the domain disk code expects
to find "<secret type='xxxx'", where xxxx is 'iscsi' or 'ceph'. Trying
use the Type{To/From}String API's in virstoragefile.c resulted in a
link time failure (even though secret_conf.h was included).  Never quite
figured it out - I will take suggestions though. Although since the
domain disk code is all that really cares about it and the domain_conf
code can use the Type{To/From}String API's - I just left it as is. The
new copy API is used when the pool code needs to copy it's auth data into
each domain disk's auth entry.

The second patch will fix a not-run test that tests the auth.  It seems
it was not added to the active list of tests because the output generated
did not include the "usage" information (eg " usage='mycluster_myname") that
is part of the <secret> element. Additionally because it did not include
it the output was "<secret type='iscsi' </auth>".  So rather than ignore
the test - add to the filters to avoid looking for "<secret" - through
to the closing ">".  The -auth.xml and -auth.args files needed adjustments
to follow the non "-auth" version of the files that have changed over time,
but not also changed int the "-auth" files.

The third patch will cause the domain disk algorithms to utilize the
new generic parse and format APIs as well as using the 'authdef' instead
of the inline structure fields.  This patch also restores the checking for
</auth> in the recently restored auth test.  Still avoiding the whole
<secret... /> line as I saw no way to filter just the usage that's in
the stored XML file.

The fourth patch is a mostly innocuous html change - it could go early,
but it just felt better in this place.

The fifth patch will cause the storage pool algorithms to utilize the
new generic parse/format API's as well as new authdef structure for
accessing the data. The removal of the duplicated cephx/chap structures
seems (in my mind at least) to simplify things. They were essentially
copies of each other with no seemingly real value in keeping separate
other than the visual in the code of ".chap." or ".cephx.".

John Ferlan (5):
   virstorage: Introduce virStorageAuthDef
   qemuargv2xmltest: Resurrect RBD and iSCSI auth
   Utilize virDomainDiskAuth for domain disk
   formatdomain: Fix issues found describing auth
   Utilize virDomainDiskAuth for storage pools

  docs/formatdomain.html.in                          |  24 +--
  src/conf/domain_conf.c                             | 106 ++--------
  src/conf/storage_conf.c                            | 152 ++------------
  src/conf/storage_conf.h                            |  38 +---
  src/libvirt_private.syms                           |   5 +-
  src/qemu/qemu_command.c                            |  72 ++++---
  src/qemu/qemu_conf.c                               |  46 +----
  src/storage/storage_backend_iscsi.c                |  41 ++--
  src/storage/storage_backend_rbd.c                  |  65 +++---
  src/util/virstoragefile.c                          | 219 +++++++++++++++++++--
  src/util/virstoragefile.h                          |  37 +++-
  tests/qemuargv2xmltest.c                           |   3 +
  ...qemuxml2argv-disk-drive-network-iscsi-auth.args |   4 +-
  .../qemuxml2argv-disk-drive-network-iscsi-auth.xml |  12 +-
  .../qemuxml2argv-disk-drive-network-rbd-auth.xml   |   4 +-
  15 files changed, 415 insertions(+), 413 deletions(-)


ACK series.

Michal

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]