1. 08 May, 2020 1 commit
  2. 30 Mar, 2020 5 commits
  3. 06 Nov, 2019 1 commit
  4. 21 Oct, 2019 1 commit
  5. 18 Oct, 2019 1 commit
  6. 30 Sep, 2019 1 commit
  7. 26 Sep, 2019 1 commit
  8. 25 Sep, 2019 1 commit
  9. 21 Sep, 2019 3 commits
  10. 15 Sep, 2019 1 commit
  11. 14 Sep, 2019 4 commits
  12. 26 Aug, 2019 2 commits
  13. 23 Aug, 2019 1 commit
    • Prasanna Kumar Kalever's avatar
      restoreconfig: add ability to restore/reload single target or storage_object · e3758d96
      Prasanna Kumar Kalever authored
      
      
      Problem:
      -------
      Right now, if any target or storage_object is failed to load as part of
      target service bringup or manual restoreconfig, may be because of an issue from
      the backend, then there is no way to reload that single storage_object or target,
      we need to reload/restart all the targets/storage_objects present in the node
      just to load one single target/storage_object, this interrupts on going
      I/O (via this path) for all the volumes hosted within the node.
      
      Solution:
      --------
      Add a capability to reload single target or storage_object without touching other
      targets or storage_objects hosted in the node.
      
      usage:
      
      $ targetcli
      targetcli shell version 2.1.fb49
      Copyright 2011-2013 by Datera, Inc and others
      For help on commands, type 'help'.
      
      /> help
      [...]
      
      AVAILABLE COMMANDS
        The following commands are available in the current path:
      
      [...]
          - restoreconfig [savefile] [clear_existing] [target] [storage_object]
      [...]
      
      Ex 1. reload single storage_object
      $ targetcli restoreconfig /etc/target/saveconfig.json clear_existing \
          storage_object=blockx
      
      Ex 2. reload single target
      $ targetcli restoreconfig /etc/target/saveconfig.json clear_existing \
          target=iqn.2016-12.org.gluster-block:xxx
      
      Ex 3. reload a given target and storage_object
      $ targetcli restoreconfig /etc/target/saveconfig.json clear_existing \
          target=iqn.2016-12.org.gluster-block:xxx storage_object=blockx
      
      Signed-off-by: default avatarPrasanna Kumar Kalever <prasanna.kalever@redhat.com>
      e3758d96
  14. 18 Jul, 2019 1 commit
  15. 03 Jul, 2019 2 commits
  16. 06 Jun, 2019 1 commit
  17. 31 May, 2019 1 commit
    • Xiubo Li's avatar
      saveconfig: add hw_block_size support in control string · b2738281
      Xiubo Li authored
      
      
      $ targetcli /backstores/user:glfs create name=block size=1048576 \
        cfgstring=hosting-volume@192.168.195.164/block-store/d85244f7-88e9-4b28-922d-373fa9f59f24 \
        control=max_data_area_mb=64,hw_block_size=1024 wwn=d85244f7-88e9-4b28-922d-373fa9f59f24
      
      $ targetcli / saveconfig
      
      $ cat /etc/target/saveconfig.json
      {
        "storage_objects": [
          {
            "alua_tpgs": [],
            "attributes": {
              ...
            },
            "config": "glfs/hosting-volume@192.168.195.164/block-store/d85244f7-88e9-4b28-922d-373fa9f59f24",
            "control": "max_data_area_mb=64,hw_block_size=1024",
            "hw_max_sectors": 128,
            "name": "block",
            "plugin": "user",
            "size": 1048576,
            "wwn": "d85244f7-88e9-4b28-922d-373fa9f59f24"
          }
        ],
        "targets": []
      }
      
      Signed-off-by: default avatarXiubo Li <xiubli@redhat.com>
      Reviewed-by: default avatarPrasanna Kumar Kalever <prasanna.kalever@redhat.com>
      b2738281
  18. 05 Mar, 2019 1 commit
  19. 02 Mar, 2019 1 commit
  20. 01 Mar, 2019 1 commit
  21. 19 Feb, 2019 1 commit
  22. 12 Feb, 2019 1 commit
    • Lee Duncan's avatar
      Add 'readable' param to Group list_*() methods · 6f17cf77
      Lee Duncan authored
      Extend use of the new 'readable' optional param
      for the Node class into the Group class, so they
      also return writable *and* readable entries.
      
      Did NOT update the calls to list_attributes() and
      list_parameters() in NodeACLGroup class, since
      we don't need ACLs to be readable to write them
      out.
      6f17cf77
  23. 09 Feb, 2019 1 commit
    • Lee Duncan's avatar
      Handle write-only parameters like attributes · ee005008
      Lee Duncan authored
      Commit 03c8c159 added handling of write-only
      attributes, but we could also see write-only parameters,
      since they are also from sysfs. To be safe, ensure
      the parameter list returned is writable in addition
      to being readable.
      ee005008
  24. 08 Feb, 2019 1 commit
    • Maurizio Lombardi's avatar
      save_to_file() function breaks symbolic link when saving configuration · 5626a4d5
      Maurizio Lombardi authored
      
      
      Currently the location of the targetcli configuration file is not
      configurable (saveconfig.json). The location is : /etc/target
      Some users use stateless VMs, with just a persistent device
      mounted under /var/lib/diskless.
      
      In order to circumvent the non configurable location of
      saveconfig.json, they create a symbolic link in /etc/target
      pointing to /var/lib/diskless
      
      Unfortunately, the rtslib save_to_file() function breaks
      this symbolic link and creates a new regular file in place of it,
      due to the creation of a saveconfig.json.temp file which is
      then renamed to saveconfig.json using the os.rename() function.
      
      This patch replace os.rename() with shutil.copyfile() + os.remove(),
      using copyfile() instead of rename() will preserve the symbolic link
      
      Signed-off-by: default avatarMaurizio Lombardi <mlombard@redhat.com>
      5626a4d5
  25. 06 Feb, 2019 1 commit
    • Lee Duncan's avatar
      Handle write-only attributes. · 03c8c159
      Lee Duncan authored
      A recent kernel change (see commit 6baca7601bdee2e5) makes
      the pi_prot_format protection information attribute write-only,
      since it always returned 0 when being read. This commit is being
      reverted, but it still brought up the prospect of write-only
      attributes.
      
      Currently, when doing a dump(), rtslib iterates through all
      readable attributes to decide which ones to save as part of
      our current state, but saving write-only attributes
      makes no sense, since we cannot read them to capture their
      value. Towards this end, enhande the _list_files() internal
      method to allow filtering on whether the file is writable
      as well as whether or not it is readable. Then modify
      list_attributes() to allow this new parameter and modify
      dump() to request only R/W attributes.
      03c8c159
  26. 21 Nov, 2018 1 commit
  27. 15 Nov, 2018 1 commit
    • Mike Christie's avatar
      Allow bs_cache to be bypassed · f7fc7a7f
      Mike Christie authored
      
      
      The ceph tools might have multiple daemons making and querying the system.
      To avoid invalidating the cache for every creation and lookup this allows
      tools like ours to avoid the cache.
      
      If the caller passed in the index during creations or lookups then use
      that value instead of building/quering the cache.
      
      Signed-off-by: default avatarMike Christie <mchristi@redhat.com>
      f7fc7a7f
  28. 30 Oct, 2018 1 commit
  29. 19 Oct, 2018 1 commit
    • Maurizio Lombardi's avatar
      report the correct size for partitions · 560ee483
      Maurizio Lombardi authored
      
      
      If you use a partition instead of the whole device as the backstore device,
      rtslib will always report its size as 0 bytes.
      
      This happens because rtslib tries to read the "queue/logical_block_size"
      attribute, which can only be found in the parent's node.
      This patch fixes the bug by loading the parent node's attributes if
      it detects that the device is a partition.
      
      Signed-off-by: default avatarMaurizio Lombardi <mlombard@redhat.com>
      560ee483