1. 24 6月, 2016 1 次提交
    • J
      secret: Move virStorageSecretType and rename · 1eca5f65
      John Ferlan 提交于
      Move the enum into a new src/util/virsecret.h, rename it to be
      virSecretLookupType. Add a src/util/virsecret.h in order to perform
      a couple of simple operations on the secret XML and virSecretLookupTypeDef
      for clearing and copying.
      
      This includes quite a bit of collateral damage, but the goal is to remove
      the "virStorage*" and replace with the virSecretLookupType so that it's
      easier to to add new lookups that aren't necessarily storage pool related.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      1eca5f65
  2. 22 6月, 2016 1 次提交
  3. 18 5月, 2016 1 次提交
  4. 30 4月, 2015 1 次提交
  5. 02 4月, 2015 3 次提交
  6. 03 3月, 2015 1 次提交
    • J
      iscsi: Adjust error message for findStorageSources backend · 30f69ae8
      John Ferlan 提交于
      The virStorageBackendISCSIFindPoolSources API only needs the 'host' name
      in order to discover iSCSI pools, it returns the various device paths.
      On input, it's also possible to further restrict a search by providing the
      port attribute for the host element and the (undocumented) initiator element.
      
      For example:
      
      $  virsh find-storage-pool-sources-as iscsi
      error: Failed to find any iscsi pool sources
      error: invalid argument: hostname and device path must be specified for iscsi sources
      
      $ virsh find-storage-pool-sources-as iscsi 192.168.122.1
      <sources>
        <source>
          <host name='192.168.122.1' port='3260'/>
          <device path='iqn.2013-12.com.example:iscsi-chap-lclpool'/>
        </source>
      </sources>
      30f69ae8
  7. 17 7月, 2014 1 次提交
  8. 11 7月, 2014 1 次提交
  9. 04 7月, 2014 1 次提交
    • J
      Utilize virDomainDiskAuth for storage pools · 97e3397c
      John Ferlan 提交于
      Replace the authType, chap, and cephx unions in virStoragePoolSource
      with a single pointer to a virStorageAuthDefPtr.  Adjust all users of
      the previous chap/cephx and secret unions with the source->auth data.
      97e3397c
  10. 29 4月, 2014 1 次提交
    • E
      storage: use virDirRead API · 56a03233
      Eric Blake 提交于
      More instances of failure to report (unlikely) readdir errors.
      In one case, I chose to ignore them, given that a readdir error
      would be no different than timing out on the loop, where the
      fallback path behaves correctly either way.
      
      * src/storage/storage_backend.c (virStorageBackendStablePath):
      Ignore readdir errors.
      * src/storage/storage_backend_fs.c
      (virStorageBackendFileSystemRefresh): Report readdir errors.
      * src/storage/storage_backend_iscsi.c
      (virStorageBackendISCSIGetHostNumber): Likewise.
      * src/storage/storage_backend_scsi.c (getNewStyleBlockDevice)
      (getBlockDevice, virStorageBackendSCSIFindLUs): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      56a03233
  11. 25 3月, 2014 1 次提交
  12. 21 3月, 2014 6 次提交
  13. 18 3月, 2014 1 次提交
  14. 12 3月, 2014 1 次提交
  15. 10 3月, 2014 1 次提交
  16. 04 3月, 2014 1 次提交
    • E
      util: make it easier to grab only regular command exit · b9dd878f
      Eric Blake 提交于
      Auditing all callers of virCommandRun and virCommandWait that
      passed a non-NULL pointer for exit status turned up some
      interesting observations.  Many callers were merely passing
      a pointer to avoid the overall command dying, but without
      caring what the exit status was - but these callers would
      be better off treating a child death by signal as an abnormal
      exit.  Other callers were actually acting on the status, but
      not all of them remembered to filter by WIFEXITED and convert
      with WEXITSTATUS; depending on the platform, this can result
      in a status being reported as 256 times too big.  And among
      those that correctly parse the output, it gets rather verbose.
      Finally, there were the callers that explicitly checked that
      the status was 0, and gave their own message, but with fewer
      details than what virCommand gives for free.
      
      So the best idea is to move the complexity out of callers and
      into virCommand - by default, we return the actual exit status
      already cleaned through WEXITSTATUS and treat signals as a
      failed command; but the few callers that care can ask for raw
      status and act on it themselves.
      
      * src/util/vircommand.h (virCommandRawStatus): New prototype.
      * src/libvirt_private.syms (util/command.h): Export it.
      * docs/internals/command.html.in: Document it.
      * src/util/vircommand.c (virCommandRawStatus): New function.
      (virCommandWait): Adjust semantics.
      * tests/commandtest.c (test1): Test it.
      * daemon/remote.c (remoteDispatchAuthPolkit): Adjust callers.
      * src/access/viraccessdriverpolkit.c (virAccessDriverPolkitCheck):
      Likewise.
      * src/fdstream.c (virFDStreamCloseInt): Likewise.
      * src/lxc/lxc_process.c (virLXCProcessStart): Likewise.
      * src/qemu/qemu_command.c (qemuCreateInBridgePortWithHelper):
      Likewise.
      * src/xen/xen_driver.c (xenUnifiedXendProbe): Simplify.
      * tests/reconnect.c (mymain): Likewise.
      * tests/statstest.c (mymain): Likewise.
      * src/bhyve/bhyve_process.c (virBhyveProcessStart)
      (virBhyveProcessStop): Don't overwrite virCommand error.
      * src/libvirt.c (virConnectAuthGainPolkit): Likewise.
      * src/openvz/openvz_driver.c (openvzDomainGetBarrierLimit)
      (openvzDomainSetBarrierLimit): Likewise.
      * src/util/virebtables.c (virEbTablesOnceInit): Likewise.
      * src/util/viriptables.c (virIpTablesOnceInit): Likewise.
      * src/util/virnetdevveth.c (virNetDevVethCreate): Fix debug
      message.
      * src/qemu/qemu_capabilities.c (virQEMUCapsInitQMP): Add comment.
      * src/storage/storage_backend_iscsi.c
      (virStorageBackendISCSINodeUpdate): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      b9dd878f
  17. 21 2月, 2014 1 次提交
  18. 15 10月, 2013 1 次提交
  19. 21 8月, 2013 1 次提交
    • J
      Report secret usage error message similarly · 1fa7946f
      John Ferlan 提交于
      Each of the modules handled reporting error messages from the secret fetching
      slightly differently with respect to the error. Provide a similar message
      for each error case and provide as much data as possible.
      1fa7946f
  20. 23 7月, 2013 2 次提交
    • J
      storage: Support "chap" authentication for iscsi pool · 249409e7
      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 patch performs the authentication during startPool() processing
      of pools with an authType of VIR_STORAGE_POOL_AUTH_CHAP specified
      for iSCSI pools.
      
      There are two types of CHAP configurations supported for iSCSI
      authentication:
      
        * Initiator Authentication
            Forward, one-way; The initiator is authenticated by the target.
      
        * Target Authentication
            Reverse, Bi-directional, mutual, two-way; The target is authenticated
            by the initiator; This method also requires Initiator Authentication
      
      This only supports the "Initiator Authentication". (I don't have any
      enterprise iSCSI env for testing, only have a iSCSI target setup with
      tgtd, which doesn't support "Target Authentication").
      
      "Discovery authentication" is not supported by tgt yet too. So this only
      setup the session authentication by executing 3 iscsiadm commands, E.g:
      
      % iscsiadm -m node --target "iqn.2013-05.test:iscsi.foo" --name \
        "node.session.auth.authmethod" -v "CHAP" --op update
      
      % iscsiadm -m node --target "iqn.2013-05.test:iscsi.foo" --name \
        "node.session.auth.username" -v "Jim" --op update
      
      % iscsiadm -m node --target "iqn.2013-05.test:iscsi.foo" --name \
        "node.session.auth.password" -v "Jimsecret" --op update
      249409e7
    • J
      storage_iscsi: Reflect the default target port · 5c62d5ea
      John Ferlan 提交于
      Make sure default iSCSI target is 3260.
      5c62d5ea
  21. 11 7月, 2013 1 次提交
  22. 10 7月, 2013 1 次提交
  23. 07 6月, 2013 1 次提交
  24. 21 5月, 2013 1 次提交
  25. 10 5月, 2013 1 次提交
  26. 09 5月, 2013 1 次提交
  27. 02 5月, 2013 1 次提交
    • M
      virutil: Move string related functions to virstring.c · 7c9a2d88
      Michal Privoznik 提交于
      The source code base needs to be adapted as well. Some files
      include virutil.h just for the string related functions (here,
      the include is substituted to match the new file), some include
      virutil.h without any need (here, the include is removed), and
      some require both.
      7c9a2d88
  28. 08 4月, 2013 1 次提交
  29. 21 12月, 2012 4 次提交