Debian

Available patches from Ubuntu

To see Ubuntu differences wrt. to Debian, write down a grep-dctrl query identifying the packages you're interested in:
grep-dctrl -n -sPackage Sources.Debian
(e.g. -FPackage linux-ntfs or linux-ntfs)

Modified packages are listed below:

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: ceph-iscsi

ceph-iscsi (3.4-0ubuntu2) focal; urgency=medium * d/p/ubuntu-support.patch: Ensure Ubuntu >= 18.04 is in the list of supported distributions (LP: #1864838). -- James Page <james.page@ubuntu.com> Wed, 26 Feb 2020 12:23:17 +0000 ceph-iscsi (3.4-0ubuntu1) focal; urgency=medium * New upstream release. -- James Page <james.page@ubuntu.com> Tue, 25 Feb 2020 09:23:38 +0000 ceph-iscsi (3.3-1ubuntu1) focal; urgency=medium * Ensure tests run as part of package build: - d/control: Add runtime dependencies to BD's alongside mock and pytest. - d/rules: Set PYBUILD_TEST_ARGS inline with upstream configuration of pytest. - d/rules: Ensure .pytest_cache is tidied on clean. * d/source/options: Ignore any changes to .egg-info files. * d/control: Drop dependency on python3-rpm as its not required. -- James Page <james.page@ubuntu.com> Thu, 28 Nov 2019 13:51:45 +0000

Modifications :
  1. Download patch README.md

    --- 3.3-1/README.md 2019-09-26 20:30:19.000000000 +0000 +++ 3.4-0ubuntu2/README.md 2019-12-20 17:09:32.000000000 +0000 @@ -22,6 +22,13 @@ gateway. The Python ```ceph_iscsi_config * **API/CLI** configuration tools ## Installation +### Repository +A YUM repository is available with the lastest releases. The repository is available at `https://download.ceph.com/ceph-iscsi/{version}/rpm/{distribution}/noarch/`. For example, https://download.ceph.com/ceph-iscsi/latest/rpm/el7/noarch/ + +Alternatively, you may download the YUM repo description at https://download.ceph.com/ceph-iscsi/latest/rpm/el7/ceph-iscsi.repo + +Packages are signed with the following key: https://download.ceph.com/keys/release.asc + ### Via RPM Simply install the provided rpm with: ```rpm -ivh ceph-iscsi-<ver>.el7.noarch.rpm```
  2. Download patch gwcli/hostgroup.py

    --- 3.3-1/gwcli/hostgroup.py 2019-09-26 20:30:19.000000000 +0000 +++ 3.4-0ubuntu2/gwcli/hostgroup.py 2019-12-20 17:09:32.000000000 +0000 @@ -325,7 +325,7 @@ class HostGroup(UIGroup): mapped_disks = [mapped_disk.name for mapped_disk in self.parent.parent.target_disks.children] if disk_name not in mapped_disks: - rc = self.parent.parent.target_disks.add_disk(disk_name, None) + rc = self.parent.parent.target_disks.add_disk(disk_name, None, None) if rc == 0: self.logger.debug("disk auto-map successful") else:
  3. Download patch ceph_iscsi_config/gateway_setting.py

    --- 3.3-1/ceph_iscsi_config/gateway_setting.py 2019-09-26 20:30:19.000000000 +0000 +++ 3.4-0ubuntu2/ceph_iscsi_config/gateway_setting.py 2019-12-20 17:09:32.000000000 +0000 @@ -181,7 +181,7 @@ SYS_SETTINGS = { "api_password": StrSetting("api_password", "admin"), "ceph_user": StrSetting("ceph_user", "admin"), "debug": BoolSetting("debug", False), - "minimum_gateways": IntSetting("minimum_gateways", 2, 9999, 2), + "minimum_gateways": IntSetting("minimum_gateways", 1, 9999, 2), "ceph_config_dir": StrSetting("ceph_config_dir", '/etc/ceph'), "priv_key": StrSetting("priv_key", 'iscsi-gateway.key'), "pub_key": StrSetting("pub_key", 'iscsi-gateway-pub.key'),
  4. Download patch ceph_iscsi_config/common.py

    --- 3.3-1/ceph_iscsi_config/common.py 2019-09-26 20:30:19.000000000 +0000 +++ 3.4-0ubuntu2/ceph_iscsi_config/common.py 2019-12-20 17:09:32.000000000 +0000 @@ -30,8 +30,18 @@ class CephCluster(object): self.error = False self.error_msg = '' - self.cluster = rados.Rados(conffile=settings.config.cephconf, - name=settings.config.cluster_client_name) + self.cluster = None + + conf = settings.config.cephconf + + try: + self.cluster = rados.Rados(conffile=conf, + name=settings.config.cluster_client_name) + except rados.Error as err: + self.error = True + self.error_msg = "Invaid cluster_client_name or setting in {} - {}".format(conf, err) + return + try: self.cluster.connect() except rados.Error as err: @@ -39,7 +49,8 @@ class CephCluster(object): self.error_msg = "Unable to connect to the cluster (keyring missing?) - {}".format(err) def __del__(self): - self.cluster.shutdown() + if self.cluster: + self.cluster.shutdown() def shutdown(self): self.cluster.shutdown() @@ -186,52 +197,58 @@ class Config(object): self.update_item("version", element_name=None, element_value=3) if self.config['version'] == 3: - iqn = self.config['gateways']['iqn'] + iqn = self.config['gateways'].get('iqn', None) gateways = {} portals = {} - for host, gateway_v3 in self.config['gateways'].items(): - if isinstance(gateway_v3, dict): - portal = gateway_v3 - portal.pop('iqn') - active_luns = portal.pop('active_luns') - updated = portal.pop('updated', None) - created = portal.pop('created', None) - gateway = { - 'active_luns': active_luns - } - if created: - gateway['created'] = created - if updated: - gateway['updated'] = updated - gateways[host] = gateway - portals[host] = portal - for _, client in self.config['clients'].items(): - client.pop('created', None) - client.pop('updated', None) - client['auth']['chap_mutual'] = '' - for _, group in self.config['groups'].items(): - group.pop('created', None) - group.pop('updated', None) - target = { - 'disks': list(self.config['disks'].keys()), - 'clients': self.config['clients'], - 'portals': portals, - 'groups': self.config['groups'], - 'controls': self.config.get('controls', {}), - 'ip_list': self.config['gateways']['ip_list'] - } + + self.add_item("targets", None, {}) self.add_item('discovery_auth', None, { 'chap': '', 'chap_mutual': '' }) - self.add_item("targets", None, {}) - self.add_item("targets", iqn, target) - self.update_item("targets", iqn, target) + + if iqn: + for host, gateway_v3 in self.config['gateways'].items(): + if isinstance(gateway_v3, dict): + portal = gateway_v3 + portal.pop('iqn') + active_luns = portal.pop('active_luns') + updated = portal.pop('updated', None) + created = portal.pop('created', None) + gateway = { + 'active_luns': active_luns + } + if created: + gateway['created'] = created + if updated: + gateway['updated'] = updated + gateways[host] = gateway + portals[host] = portal + for _, client in self.config['clients'].items(): + client.pop('created', None) + client.pop('updated', None) + client['auth']['chap_mutual'] = '' + for _, group in self.config['groups'].items(): + group.pop('created', None) + group.pop('updated', None) + target = { + 'disks': list(self.config['disks'].keys()), + 'clients': self.config['clients'], + 'portals': portals, + 'groups': self.config['groups'], + 'controls': self.config.get('controls', {}), + 'ip_list': self.config['gateways']['ip_list'] + } + self.add_item("targets", iqn, target) + self.update_item("targets", iqn, target) + + self.update_item("gateways", None, gateways) + if 'controls' in self.config: self.del_item('controls', None) self.del_item('clients', None) self.del_item('groups', None) - self.update_item("gateways", None, gateways) + self.update_item("version", None, 4) if self.config['version'] == 4:
  5. Download patch debian/rules

    --- 3.3-1/debian/rules 2019-10-21 09:40:52.000000000 +0000 +++ 3.4-0ubuntu2/debian/rules 2019-11-28 13:40:27.000000000 +0000 @@ -2,6 +2,7 @@ export PYBUILD_NAME=python-ceph-iscsi #export PYBUILD_DISABLE=test +export PYBUILD_TEST_ARGS=--ignore=test/test_group.py test/ %: dh $@ --with python3 --buildsystem=pybuild @@ -9,3 +10,7 @@ export PYBUILD_NAME=python-ceph-iscsi override_dh_installinit: dh_installinit -pceph-iscsi --name rbd-target-api dh_installinit -pceph-iscsi --name rbd-target-gw + +override_dh_auto_clean: + dh_auto_clean + rm -rf .pytest_cache
  6. Download patch debian/control

    --- 3.3-1/debian/control 2019-10-21 09:40:52.000000000 +0000 +++ 3.4-0ubuntu2/debian/control 2019-11-28 13:50:36.000000000 +0000 @@ -1,9 +1,25 @@ Source: ceph-iscsi Section: python Priority: optional -Maintainer: Freexian Packaging Team <team+freexian@tracker.debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Freexian Packaging Team <team+freexian@tracker.debian.org> Uploaders: Sebastien Delafond <seb@debian.org> -Build-Depends: debhelper-compat (= 12), dh-python, python3-setuptools, python3-all +Build-Depends: debhelper-compat (= 12), + dh-python, + python3-all, + python3-configshell-fb, + python3-cryptography, + python3-distutils, + python3-flask, + python3-mock, + python3-netifaces, + python3-openssl, + python3-pytest, + python3-rados, + python3-rbd, + python3-requests, + python3-rtslib-fb, + python3-setuptools Standards-Version: 4.4.1 Homepage: https://github.com/ceph/ceph-iscsi Vcs-Browser: https://salsa.debian.org/debian/ceph-iscsi @@ -12,19 +28,19 @@ Vcs-Git: https://salsa.debian.org/debian Package: ceph-iscsi Architecture: all Pre-Depends: ${misc:Pre-Depends} -Depends: ${misc:Depends}, ${python3:Depends}, - tcmu-runner (>= 1.4.0), - python3-configshell-fb, - python3-cryptography, - python3-flask, - python3-netifaces, - python3-openssl, - python3-rados, - python3-rbd, - python3-rtslib-fb, - python3-distutils, - python3-rpm, - python3-requests +Depends: python3-configshell-fb, + python3-cryptography, + python3-distutils, + python3-flask, + python3-netifaces, + python3-openssl, + python3-rados, + python3-rbd, + python3-requests, + python3-rtslib-fb, + tcmu-runner (>= 1.4.0), + ${misc:Depends}, + ${python3:Depends} Description: common logic and CLI tools for creating and managing LIO gateways for Ceph It includes the rbd-target-api daemon which is responsible for restoring the state of LIO following a gateway reboot/outage and
  7. Download patch ceph-iscsi.spec

    --- 3.3-1/ceph-iscsi.spec 2019-09-26 20:30:19.000000000 +0000 +++ 3.4-0ubuntu2/ceph-iscsi.spec 2019-12-20 17:09:32.000000000 +0000 @@ -20,7 +20,7 @@ Name: ceph-iscsi -Version: 3.3 +Version: 3.4 Release: 1%{?dist} Group: System/Filesystems Summary: Python modules for Ceph iSCSI gateway configuration management
  8. Download patch gwcli/storage.py

    --- 3.3-1/gwcli/storage.py 2019-09-26 20:30:19.000000000 +0000 +++ 3.4-0ubuntu2/gwcli/storage.py 2019-12-20 17:09:32.000000000 +0000 @@ -153,7 +153,7 @@ class Disks(UIGroup): for child in children: self.remove_child(child) - def ui_command_attach(self, pool=None, image=None, backstore=None): + def ui_command_attach(self, pool=None, image=None, backstore=None, wwn=None): """ Assign a previously created RBD image to the gateway(s) @@ -187,9 +187,10 @@ class Disks(UIGroup): self.logger.debug("CMD: /disks/ attach pool={} " "image={}".format(pool, image)) - self.create_disk(pool=pool, image=image, create_image=False, backstore=backstore) + self.create_disk(pool=pool, image=image, create_image=False, backstore=backstore, wwn=wwn) - def ui_command_create(self, pool=None, image=None, size=None, backstore=None, count=1): + def ui_command_create(self, pool=None, image=None, size=None, backstore=None, wwn=None, + count=1): """ Create a RBD image and assign to the gateway(s). @@ -208,6 +209,7 @@ class Disks(UIGroup): size : integer, suffixed by the allocation unit - either m/M, g/G or t/T representing the MB/GB/TB [1] backstore : lio backstore + wwn : unit serial number count : integer (default is 1)[2]. If the request provides a count=<n> parameter the image name will be used as a prefix, and the count used as a suffix to create multiple images from the same request. @@ -258,7 +260,8 @@ class Disks(UIGroup): self.logger.debug("CMD: /disks/ create pool={} " "image={} size={} " "count={} ".format(pool, image, size, count)) - self.create_disk(pool=pool, image=image, size=size, count=count, backstore=backstore) + self.create_disk(pool=pool, image=image, size=size, count=count, backstore=backstore, + wwn=wwn) def _valid_pool(self, pool=None): """ @@ -283,7 +286,7 @@ class Disks(UIGroup): return False def create_disk(self, pool=None, image=None, size=None, count=1, - parent=None, create_image=True, backstore=None): + parent=None, create_image=True, backstore=None, wwn=None): rc = 0 @@ -307,7 +310,7 @@ class Disks(UIGroup): api_vars = {'pool': pool, 'owner': local_gw, 'count': count, 'mode': 'create', 'create_image': 'true' if create_image else 'false', - 'backstore': backstore} + 'backstore': backstore, 'wwn': wwn} if size: api_vars['size'] = size.upper() @@ -1003,15 +1006,15 @@ class TargetDisks(UIGroup): self.target_iqn = self.parent.name def load(self, disks): - for disk in disks: - TargetDisk(self, disk) + for image_id, image in disks.items(): + TargetDisk(self, image_id, image['lun_id']) - def ui_command_add(self, disk): - self.add_disk(disk) + def ui_command_add(self, disk, lun_id=None): + self.add_disk(disk, lun_id) - def add_disk(self, disk, success_msg='ok'): + def add_disk(self, disk, lun_id, success_msg='ok'): rc = 0 - api_vars = {"disk": disk} + api_vars = {"disk": disk, "lun_id": lun_id} targetdisk_api = ('{}://localhost:{}/api/' 'targetlun/{}'.format(self.http_mode, settings.config.api_port, @@ -1026,7 +1029,9 @@ class TargetDisks(UIGroup): disk.owner = owner self.logger.debug("- Disk '{}' owner updated to {}" .format(disk.image_id, owner)) - TargetDisk(self, disk.image_id) + target_config = config['targets'][self.target_iqn] + lun_id = target_config['disks'][disk.image_id]['lun_id'] + TargetDisk(self, disk.image_id, lun_id) self.logger.debug("- TargetDisk '{}' added".format(disk.image_id)) if success_msg: self.logger.info(success_msg) @@ -1075,11 +1080,12 @@ class TargetDisk(UINode): display_attributes = ['name', 'owner'] - def __init__(self, parent, name): + def __init__(self, parent, name, lun_id): UINode.__init__(self, name, parent) ui_root = self.get_ui_root() disk = ui_root.disks.disk_lookup[name] self.owner = disk.owner + self.lun_id = lun_id def summary(self): - return "Owner: {}".format(self.owner), True + return "Owner: {}, Lun: {}".format(self.owner, self.lun_id), True
  9. Download patch ceph_iscsi_config/lun.py

    --- 3.3-1/ceph_iscsi_config/lun.py 2019-09-26 20:30:19.000000000 +0000 +++ 3.4-0ubuntu2/ceph_iscsi_config/lun.py 2019-12-20 17:09:32.000000000 +0000 @@ -433,7 +433,7 @@ class LUN(GWObject): lun_id_candidate += 1 return lun_id_candidate - def map_lun(self, gateway, owner, disk): + def map_lun(self, gateway, owner, disk, lun_id=None): target_config = self.config.config['targets'][gateway.iqn] disk_metadata = self.config.config['disks'][disk] disk_metadata['owner'] = owner @@ -441,7 +441,8 @@ class LUN(GWObject): target_disk_config = target_config['disks'].get(disk) if not target_disk_config: - lun_id = self._get_next_lun_id(target_config['disks']) + if lun_id is None: + lun_id = self._get_next_lun_id(target_config['disks']) target_config['disks'][disk] = { 'lun_id': lun_id } @@ -573,7 +574,7 @@ class LUN(GWObject): if client_err: raise CephiSCSIError(client_err) - def allocate(self, keep_dev_in_lio=True): + def allocate(self, keep_dev_in_lio=True, in_wwn=None): """ Create image and add to LIO and config. @@ -684,10 +685,10 @@ class LUN(GWObject): except KeyError: wwn = '' - if wwn == '': + if wwn == '' or in_wwn is not None: # disk hasn't been defined to LIO yet, it' not been defined # to the config yet and this is the allocating host - so = self.add_dev_to_lio() + so = self.add_dev_to_lio(in_wwn) if self.error: return None @@ -1012,9 +1013,16 @@ class LUN(GWObject): if not disk_regex.search(kwargs['image']): return "Invalid image name (use alphanumeric, '_', '.', or '-' characters)" + if kwargs['wwn'] is not None: + for disk_id, disk_config in config['disks'].items(): + if disk_config['wwn'] == kwargs['wwn']: + return "WWN {} is already in use by {}".format(kwargs['wwn'], disk_id) + if kwargs['count'].isdigit(): if not 1 <= int(kwargs['count']) <= 10: return "invalid count specified, must be an integer (1-10)" + if int(kwargs['count']) > 1 and kwargs['wwn'] is not None: + return "WWN cannot be specified when count > 1" else: return "invalid count specified, must be an integer (1-10)"
  10. Download patch ceph_iscsi_config/client.py

    --- 3.3-1/ceph_iscsi_config/client.py 2019-09-26 20:30:19.000000000 +0000 +++ 3.4-0ubuntu2/ceph_iscsi_config/client.py 2019-12-20 17:09:32.000000000 +0000 @@ -52,22 +52,6 @@ class GWClient(GWObject): self.target_iqn = target_iqn self.lun_lookup = {} # only used for hostgroup based definitions self.requested_images = [] - - # image_list is normally a list of strings (pool/image_name) but - # group processing forces a specific lun id allocation to masked disks - # in this scenario the image list is a tuple - if image_list: - - if isinstance(image_list[0], tuple): - # tuple format ('disk_name', {'lun_id': 0})... - for disk_item in image_list: - disk_name = disk_item[0] - lun_id = disk_item[1].get('lun_id') - self.requested_images.append(disk_name) - self.lun_lookup[disk_name] = lun_id - else: - self.requested_images = image_list - self.username = username self.password = password self.mutual_username = mutual_username @@ -114,6 +98,34 @@ class GWClient(GWObject): self.error = True self.error_msg = err + # image_list is normally a list of strings (pool/image_name) but + # group processing forces a specific lun id allocation to masked disks + # in this scenario the image list is a tuple + if image_list: + + if isinstance(image_list[0], tuple): + # tuple format ('disk_name', {'lun_id': 0})... + for disk_item in image_list: + disk_name = disk_item[0] + lun_id = disk_item[1].get('lun_id') + self.requested_images.append(disk_name) + self.lun_lookup[disk_name] = lun_id + else: + target_config = self.config.config['targets'][self.target_iqn] + used_lun_ids = self._get_lun_ids(target_config['clients']) + for disk_name in image_list: + disk_lun_id = target_config['disks'][disk_name]['lun_id'] + if disk_lun_id not in used_lun_ids: + self.lun_lookup[disk_name] = disk_lun_id + self.requested_images = image_list + + def _get_lun_ids(self, clients_config): + lun_ids = [] + for client_config in clients_config.values(): + for lun_config in client_config['luns'].values(): + lun_ids.append(lun_config['lun_id']) + return lun_ids + def setup_luns(self, disks_config): """ Add the requested LUNs to the node ACL definition. The image list @@ -422,12 +434,12 @@ class GWClient(GWObject): tpg_lun = lun['tpg_lun'] # lunid allocated from the current config object setting, or if this is - # a new device from the next free lun id 'position' + # a new device from the target disk lun id or next free lun id 'position' + # if target disk lun id is already in use if image in self.metadata['luns'].keys(): lun_id = self.metadata['luns'][image]['lun_id'] else: if image in self.lun_lookup: - # this indicates a lun map for a group managed client lun_id = self.lun_lookup[image] else: lun_id = self.lun_id_list[0] # pick lowest available lun ID
  11. Download patch gwcli/ceph.py

    --- 3.3-1/gwcli/ceph.py 2019-09-26 20:30:19.000000000 +0000 +++ 3.4-0ubuntu2/gwcli/ceph.py 2019-12-20 17:09:32.000000000 +0000 @@ -304,8 +304,11 @@ class RadosPool(UINode): potential_demand += image_child.size self.commit = potential_demand - self.overcommit_PCT = int( - (potential_demand / float(self.max_bytes)) * 100) + if self.max_bytes == 0: + self.overcommit_PCT = 0 + else: + self.overcommit_PCT = int( + (potential_demand / float(self.max_bytes)) * 100) def update(self, pool_metadata):
  12. Download patch debian/patches/ubuntu-support.patch

    --- 3.3-1/debian/patches/ubuntu-support.patch 1970-01-01 00:00:00.000000000 +0000 +++ 3.4-0ubuntu2/debian/patches/ubuntu-support.patch 2020-02-26 12:17:31.000000000 +0000 @@ -0,0 +1,17 @@ +Description: Add Ubuntu 18.04 or later to supported platforms + Thus avoiding the need to pass skipchecks to all cli commands +Author: James Page <james.page@ubuntu.com> +Forwarded: no + +--- a/rbd-target-api.py ++++ b/rbd-target-api.py +@@ -2736,7 +2736,8 @@ def pre_reqs_errors(): + valid_dists = { + "rhel": 7.4, + "suse": 15.1, +- "debian": 10} ++ "debian": 10, ++ "ubuntu": 18.04} + + errors_found = [] +
  13. Download patch ceph_iscsi_config/group.py

    --- 3.3-1/ceph_iscsi_config/group.py 2019-09-26 20:30:19.000000000 +0000 +++ 3.4-0ubuntu2/ceph_iscsi_config/group.py 2019-12-20 17:09:32.000000000 +0000 @@ -119,14 +119,17 @@ class Group(object): return True - def _next_lun(self): + def _next_lun(self, preferred_lun_id): """ Look at the disk list for the group and return the 1st available free LUN id used for adding disks to the group :return: (int) lun Id """ - lun_range = list(range(0, 256, 1)) # 0->255 + lun_range = list(range(0, 256, 1)) # 0->255 + lun_range.remove(preferred_lun_id) + lun_range.insert(0, preferred_lun_id) + target_config = self.config.config['targets'][self.target_iqn] group = target_config['groups'][self.group_name] group_disks = group.get('disks') @@ -169,7 +172,7 @@ class Group(object): members = ListComparison(this_group.get('members'), self.group_members) - disks = ListComparison(this_group.get('disks').keys(), + disks = ListComparison(list(this_group.get('disks').keys()), self.disks) if set(self.disks) != set(this_group.get('disks')) or \ @@ -233,7 +236,7 @@ class Group(object): if disks.added: # update the groups disk list for disk in disks.added: - lun_seq = self._next_lun() + lun_seq = self._next_lun(target_config['disks'][disk]['lun_id']) group_disks[disk] = {"lun_id": lun_seq} self.logger.debug("- adding '{}' to group '{}' @ " "lun id {}".format(disk,
  14. Download patch gwcli/gateway.py

    --- 3.3-1/gwcli/gateway.py 2019-09-26 20:30:19.000000000 +0000 +++ 3.4-0ubuntu2/gwcli/gateway.py 2019-12-20 17:09:32.000000000 +0000 @@ -700,6 +700,8 @@ class GatewayGroup(UIGroup): self.logger.info("Deleting gateway, {}".format(gateway_name)) + confirm = self.ui_eval_param(confirm, 'bool', False) + config = self.parent.parent.parent._get_config() if not config: self.logger.error("Unable to refresh local config over API - sync " @@ -715,7 +717,6 @@ class GatewayGroup(UIGroup): return if gw_cnt == 1: - confirm = self.ui_eval_param(confirm, 'bool', False) if not confirm: self.logger.error("Deleting the last gateway will remove all " "objects on this target. Use confirm=true") @@ -724,24 +725,38 @@ class GatewayGroup(UIGroup): gw_api = '{}://{}:{}/api'.format(self.http_mode, "localhost", settings.config.api_port) gw_rqst = gw_api + '/gateway/{}/{}'.format(target_iqn, gateway_name) + if confirm: + gw_vars = {"force": 'true'} + else: + gw_vars = {"force": 'false'} - api = APIRequest(gw_rqst) + api = APIRequest(gw_rqst, data=gw_vars) api.delete() msg = response_message(api.response, self.logger) if api.response.status_code != 200: - self.logger.error("Failed : {}".format(msg)) + if "unavailable:" + gateway_name in msg: + self.logger.error("Could not contact {}. If the gateway is " + "permanently down. Use confirm=true to " + "force removal. WARNING: Forcing removal of " + "a gateway that can still be reached by an " + "initiator may result in data corruption.". + format(gateway_name)) + else: + self.logger.error("Failed : {}".format(msg)) return self.logger.debug("{}".format(msg)) self.logger.debug("Removing gw from UI") + self.thread_lock.acquire() gw_object = self.get_child(gateway_name) self.remove_child(gw_object) + self.thread_lock.release() config = self.parent.parent.parent._get_config() if not config: - self.logger.error("Could not refresh disaply. Restart gwcli.") + self.logger.error("Could not refresh display. Restart gwcli.") elif not config['targets'][target_iqn]['portals']: # no more gws so everything but the target is dropped. disks_object = self.parent.get_child("disks")
  15. Download patch debian/patches/series

    --- 3.3-1/debian/patches/series 2019-10-21 09:40:52.000000000 +0000 +++ 3.4-0ubuntu2/debian/patches/series 2020-02-26 12:16:11.000000000 +0000 @@ -1 +1,2 @@ 0001-Replace-etc-sysconfig-ceph-by-etc-default-ceph-in-se.patch +ubuntu-support.patch
  16. Download patch ceph_iscsi_config/gateway.py

    --- 3.3-1/ceph_iscsi_config/gateway.py 2019-09-26 20:30:19.000000000 +0000 +++ 3.4-0ubuntu2/ceph_iscsi_config/gateway.py 2019-12-20 17:09:32.000000000 +0000 @@ -18,10 +18,13 @@ __author__ = 'pcuzner@redhat.com' class CephiSCSIGateway(object): - def __init__(self, logger, config): + def __init__(self, logger, config, name=None): self.logger = logger self.config = config - self.hostname = this_host() + if name: + self.hostname = name + else: + self.hostname = this_host() def ceph_rm_blacklist(self, blacklisted_ip): """
  17. Download patch setup.py

    --- 3.3-1/setup.py 2019-09-26 20:30:19.000000000 +0000 +++ 3.4-0ubuntu2/setup.py 2019-12-20 17:09:32.000000000 +0000 @@ -28,7 +28,7 @@ class StripExtension(distutils.command.i setup( name="ceph_iscsi", - version="3.3", + version="3.4", description="Common classes/functions and CLI tools used to configure iSCSI " "gateways backed by Ceph RBD", long_description=long_description,
  18. Download patch gwcli/client.py

    --- 3.3-1/gwcli/client.py 2019-09-26 20:30:19.000000000 +0000 +++ 3.4-0ubuntu2/gwcli/client.py 2019-12-20 17:09:32.000000000 +0000 @@ -562,7 +562,7 @@ class Client(UINode): mapped_disks = [mapped_disk.name for mapped_disk in self.parent.parent.target_disks.children] if disk not in mapped_disks: - rc = self.parent.parent.target_disks.add_disk(disk, None) + rc = self.parent.parent.target_disks.add_disk(disk, None, None) if rc == 0: self.logger.debug("disk auto-map successful") else:
  19. Download patch debian/source/options

    --- 3.3-1/debian/source/options 1970-01-01 00:00:00.000000000 +0000 +++ 3.4-0ubuntu2/debian/source/options 2019-11-28 13:32:25.000000000 +0000 @@ -0,0 +1 @@ +extend-diff-ignore = "^[^/]*[.]egg-info/"
  20. Download patch ceph_iscsi_config/metrics.py

    --- 3.3-1/ceph_iscsi_config/metrics.py 2019-09-26 20:30:19.000000000 +0000 +++ 3.4-0ubuntu2/ceph_iscsi_config/metrics.py 2019-12-20 17:09:32.000000000 +0000 @@ -28,7 +28,7 @@ class TPGMapper(threading.Thread): def __init__(self, tpg): self.tpg = tpg self.tpg_id = tpg.tag - self.portal_ip = tpg.network_portals.next().ip_address + self.portal_ip = next(tpg.network_portals).ip_address self.owned_luns = dict() threading.Thread.__init__(self) @@ -98,7 +98,7 @@ class GatewayStats(object): def _get_tpg(self): stat = Metric("target portal groups defined within gateway group", "gauge") - labels = {"gw_iqn": self._root.targets.next().wwn} + labels = {"gw_iqn": next(self._root.targets).wwn} v = len([tpg for tpg in self._root.tpgs]) stat.add(labels, v)
  21. Download patch rbd-target-api.py

    --- 3.3-1/rbd-target-api.py 2019-09-26 20:30:19.000000000 +0000 +++ 3.4-0ubuntu2/rbd-target-api.py 2019-12-20 17:09:32.000000000 +0000 @@ -580,6 +580,7 @@ def gateway(target_iqn=None, gateway_nam default: FALSE :param skipchecks: (bool) whether to skip OS/software versions checks default: FALSE + :param force: (bool) if True will force removal of gateway. **RESTRICTED** Examples: curl --insecure --user admin:admin -d ip_address=192.168.122.69 @@ -657,10 +658,21 @@ def gateway(target_iqn=None, gateway_nam if first_gateway: gateways = ['localhost'] elif request.method == 'DELETE': - # Update the deleted gw first, so the other gws see the updated - # portal list gateways.remove(gateway_name) - gateways.insert(0, gateway_name) + + if request.form.get('force', 'false').lower() == 'true': + # The gw we want to delete is down and the user has decided to + # force the deletion, so we do the config modification locally + # then only tell the other gws to update their state. + try: + ceph_gw = CephiSCSIGateway(logger, config, gateway_name) + ceph_gw.remove_from_config(target_iqn) + except CephiSCSIError as err: + return jsonify(message="Could not update config: {}.".format(err)), 400 + else: + # Update the deleted gw first, so the other gws see the updated + # portal list + gateways.insert(0, gateway_name) else: # Update the new gw first, so other gws see the updated gateways list. gateways.insert(0, gateway_name) @@ -789,8 +801,18 @@ def target_disk(target_iqn=None): owner = LUN.get_owner(config.config['gateways'], target_config['portals']) logger.debug("{} owner will be {}".format(disk, owner)) + lun_id = request.form.get('lun_id') + if lun_id is not None: + try: + lun_id_int = int(lun_id) + except ValueError: + return jsonify(message="Lun id must be a number"), 400 + for target_disk in target_config['disks'].values(): + if lun_id_int == target_disk['lun_id']: + return jsonify(message="Lun id {} already in use".format(lun_id)), 400 api_vars = { 'disk': disk, + 'lun_id': lun_id, 'owner': owner, 'allocating_host': local_gw } @@ -883,9 +905,11 @@ def _target_disk(target_iqn=None): logger.error("Error initializing the LUN : " "{}".format(lun.error_msg)) return jsonify(message="Error establishing LUN instance"), 500 - + lun_id = request.form.get('lun_id') + if lun_id is not None: + lun_id = int(lun_id) try: - lun.map_lun(gateway, owner, disk) + lun.map_lun(gateway, owner, disk, lun_id) except CephiSCSIError as err: status_code = 400 if str(err) else 500 logger.error("LUN add failed : {}".format(err)) @@ -966,6 +990,7 @@ def disk(pool, image): :param preserve_image: (bool) do NOT delete RBD image :param create_image: (bool) create RBD image if not exists :param backstore: (str) lio backstore + :param wwn: (str) unit serial number **RESTRICTED** Examples: curl --insecure --user admin:admin -d mode=create -d size=1g -d pool=rbd -d count=5 @@ -1026,9 +1051,11 @@ def disk(pool, image): "{}".format(err)), 500 logger.debug("{} controls {}".format(mode, controls)) + wwn = request.form.get('wwn') disk_usable = LUN.valid_disk(config, logger, pool=pool, image=image, size=size, mode=mode, - count=count, controls=controls, backstore=backstore) + count=count, controls=controls, + backstore=backstore, wwn=wwn) if disk_usable != 'ok': return jsonify(message=disk_usable), 400 @@ -1065,7 +1092,8 @@ def disk(pool, image): 'size': size, 'owner': local_gw, 'mode': mode, - 'backstore': backstore} + 'backstore': backstore, + 'wwn': wwn} if 'controls' in request.form: api_vars['controls'] = request.form['controls'] @@ -1177,7 +1205,7 @@ def _disk(pool, image): " : {}".format(lun.error_msg)) return jsonify(message="Unable to establish LUN instance"), 500 - lun.allocate(False) + lun.allocate(False, request.form.get('wwn')) if lun.error: logger.error("LUN alloc problem - {}".format(lun.error_msg)) return jsonify(message="LUN allocation failure"), 500 @@ -2482,7 +2510,8 @@ def get_settings(): 'default_backstore': LUN.DEFAULT_BACKSTORE, 'config': { 'minimum_gateways': settings.config.minimum_gateways - } + }, + 'api_version': 1 }), 200 @@ -2702,10 +2731,10 @@ def pre_reqs_errors(): """ dist_translations = { - "centos": "redhat", + "centos": "rhel", "opensuse-leap": "suse"} valid_dists = { - "redhat": 7.4, + "rhel": 7.4, "suse": 15.1, "debian": 10} @@ -2717,8 +2746,9 @@ def pre_reqs_errors(): dist = dist.lower() dist = dist_translations.get(dist, dist) + if dist in valid_dists: - if dist == 'redhat': + if dist == 'rhel': import platform _, rel, _ = platform.linux_distribution(full_distribution_name=0) # CentOS formats a release similar 7.4.1708

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: puppet-beaker

puppet-beaker (4.21.0-2ubuntu1) groovy; urgency=medium * Relax version constraints of net-s{sh,cp} (LP: #1885614). -- Lucas Kanashiro <kanashiro@ubuntu.com> Mon, 29 Jun 2020 11:32:36 -0300

Modifications :
  1. Download patch debian/patches/patch-gemspec-for-autopkgtest.patch

    --- 4.21.0-2/debian/patches/patch-gemspec-for-autopkgtest.patch 2020-04-14 06:43:00.000000000 +0000 +++ 4.21.0-2ubuntu1/debian/patches/patch-gemspec-for-autopkgtest.patch 2020-06-29 14:32:36.000000000 +0000 @@ -4,7 +4,7 @@ Description: Patch gemspec to match the the autopkgtest. Author: Utkarsh Gupta <utkarsh@debian.org> Bug-Debian: https://bugs.debian.org/956595 -Last-Update: 2020-04-14 +Last-Update: 2020-06-29 --- a/beaker.gemspec +++ b/beaker.gemspec @@ -27,10 +27,11 @@ Last-Update: 2020-04-14 - s.add_runtime_dependency 'rb-readline', '~> 0.5.3' s.add_runtime_dependency 'hocon', '~> 1.0' - s.add_runtime_dependency 'net-ssh', '~> 5.0' +- s.add_runtime_dependency 'net-ssh', '~> 5.0' - s.add_runtime_dependency 'net-scp', '~> 1.2' - s.add_runtime_dependency 'inifile', '~> 3.0' -+ s.add_runtime_dependency 'net-scp', '~> 2.0' ++ s.add_runtime_dependency 'net-ssh', '>= 5.0' ++ s.add_runtime_dependency 'net-scp', '~> 3.0' s.add_runtime_dependency 'rsync', '~> 1.0.9' s.add_runtime_dependency 'open_uri_redirections', '~> 0.2.1'
  2. Download patch debian/control

    --- 4.21.0-2/debian/control 2020-04-14 06:47:49.000000000 +0000 +++ 4.21.0-2ubuntu1/debian/control 2020-06-29 14:32:36.000000000 +0000 @@ -1,7 +1,8 @@ Source: puppet-beaker Section: admin Priority: optional -Maintainer: Freexian Packaging Team <team+freexian@tracker.debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Freexian Packaging Team <team+freexian@tracker.debian.org> Uploaders: Sebastien Delafond <seb@debian.org> Build-Depends: debhelper-compat (= 12), gem2deb,

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: pyside2

pyside2 (5.15.0-3ubuntu1) groovy; urgency=medium * Ignore for now tests, the arm64 bug is really a glibc bug. see: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=964141 -- Gianfranco Costamagna <locutusofborg@debian.org> Tue, 07 Jul 2020 10:20:15 +0200

Modifications :
  1. Download patch debian/rules

    --- 5.15.0-3/debian/rules 2020-06-13 20:01:54.000000000 +0000 +++ 5.15.0-3ubuntu1/debian/rules 2020-07-07 08:20:14.000000000 +0000 @@ -57,4 +57,4 @@ override_dh_install-arch: debian/set-paths override_dh_auto_test: - xvfb-run python3 testrunner.py test + -xvfb-run python3 testrunner.py test
  1. ceph-iscsi
  2. puppet-beaker
  3. pyside2