Hello community,

here is the log from the commit of package ceph-iscsi for openSUSE:Factory 
checked in at 2019-05-22 11:17:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ceph-iscsi (Old)
 and      /work/SRC/openSUSE:Factory/.ceph-iscsi.new.5148 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ceph-iscsi"

Wed May 22 11:17:44 2019 rev:12 rq:704540 version:3.0+1558465738.g6a0a021

Changes:
--------
--- /work/SRC/openSUSE:Factory/ceph-iscsi/ceph-iscsi.changes    2019-05-10 
09:20:01.400495426 +0200
+++ /work/SRC/openSUSE:Factory/.ceph-iscsi.new.5148/ceph-iscsi.changes  
2019-05-22 11:17:46.154461201 +0200
@@ -1,0 +2,13 @@
+Tue May 21 19:09:22 UTC 2019 - Nathan Cutler <ncut...@suse.com>
+
+- Update to 3.0+1558465738.g6a0a021:
+  + If fqdn is enabled, "getfqdn" should be used instead of "gethostname"
+
+-------------------------------------------------------------------
+Tue May 21 12:57:59 UTC 2019 - Nathan Cutler <ncut...@suse.com>
+
+- Update to 3.0+1558443949.g9784103:
+  + rbd-target-gw/api systemd dep fix
+  + Add support for enabling FQDN
+
+-------------------------------------------------------------------

Old:
----
  ceph-iscsi-3.0+1557415271.g940ac86.tar.gz

New:
----
  ceph-iscsi-3.0+1558465738.g6a0a021.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ceph-iscsi.spec ++++++
--- /var/tmp/diff_new_pack.7ry1CX/_old  2019-05-22 11:17:47.746460709 +0200
+++ /var/tmp/diff_new_pack.7ry1CX/_new  2019-05-22 11:17:47.754460706 +0200
@@ -20,7 +20,7 @@
 
 
 Name:           ceph-iscsi
-Version:        3.0+1557415271.g940ac86
+Version:        3.0+1558465738.g6a0a021
 Release:        1%{?dist}
 Group:          System/Filesystems
 Summary:        Python modules for Ceph iSCSI gateway configuration management

++++++ ceph-iscsi-3.0+1557415271.g940ac86.tar.gz -> 
ceph-iscsi-3.0+1558465738.g6a0a021.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ceph-iscsi-3.0+1557415271.g940ac86/ceph-iscsi.spec 
new/ceph-iscsi-3.0+1558465738.g6a0a021/ceph-iscsi.spec
--- old/ceph-iscsi-3.0+1557415271.g940ac86/ceph-iscsi.spec      2019-05-09 
17:21:11.431632500 +0200
+++ new/ceph-iscsi-3.0+1558465738.g6a0a021/ceph-iscsi.spec      2019-05-21 
21:08:58.372570734 +0200
@@ -20,7 +20,7 @@
 
 
 Name:           ceph-iscsi
-Version:        3.0+1557415271.g940ac86
+Version:        3.0+1558465738.g6a0a021
 Release:        1%{?dist}
 Group:          System/Filesystems
 Summary:        Python modules for Ceph iSCSI gateway configuration management
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ceph-iscsi-3.0+1557415271.g940ac86/ceph_iscsi_config/client.py 
new/ceph-iscsi-3.0+1558465738.g6a0a021/ceph_iscsi_config/client.py
--- old/ceph-iscsi-3.0+1557415271.g940ac86/ceph_iscsi_config/client.py  
2019-05-09 17:21:11.195630881 +0200
+++ new/ceph-iscsi-3.0+1558465738.g6a0a021/ceph_iscsi_config/client.py  
2019-05-21 21:08:58.136569104 +0200
@@ -6,7 +6,6 @@
 
 import rtslib_fb.root as lio_root
 
-from socket import gethostname
 from rtslib_fb.target import NodeACL, Target, TPG
 from rtslib_fb.fabric import ISCSIFabricModule
 from rtslib_fb.utils import RTSLibError, RTSLibNotInCFS, normalize_wwn
@@ -14,7 +13,7 @@
 import ceph_iscsi_config.settings as settings
 
 from ceph_iscsi_config.common import Config
-from ceph_iscsi_config.utils import encryption_available, CephiSCSIError
+from ceph_iscsi_config.utils import encryption_available, CephiSCSIError, 
this_host
 from ceph_iscsi_config.gateway_object import GWObject
 
 
@@ -639,7 +638,7 @@
 
                 if self.commit_enabled:
 
-                    if update_host == gethostname().split('.')[0]:
+                    if update_host == this_host():
                         # update the config object with this clients settings
                         self.logger.debug("Updating config object metadata "
                                           "for '{}'".format(self.iqn))
@@ -666,7 +665,7 @@
                 else:
                     # remove this client from the config
 
-                    if update_host == gethostname().split('.')[0]:
+                    if update_host == this_host():
                         self.logger.debug("Removing {} from the config "
                                           "object".format(self.iqn))
                         target_config['clients'].pop(self.iqn)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ceph-iscsi-3.0+1557415271.g940ac86/ceph_iscsi_config/lun.py 
new/ceph-iscsi-3.0+1558465738.g6a0a021/ceph_iscsi_config/lun.py
--- old/ceph-iscsi-3.0+1557415271.g940ac86/ceph_iscsi_config/lun.py     
2019-05-09 17:21:11.195630881 +0200
+++ new/ceph-iscsi-3.0+1558465738.g6a0a021/ceph_iscsi_config/lun.py     
2019-05-21 21:08:58.136569104 +0200
@@ -6,7 +6,6 @@
 import subprocess
 
 from time import sleep
-from socket import gethostname
 
 from rtslib_fb import UserBackedStorageObject, RBDStorageObject, root
 from rtslib_fb.utils import RTSLibError
@@ -348,9 +347,9 @@
         self.size_bytes = convert_2_bytes(size)
         self.config_key = '{}/{}'.format(self.pool, self.image)
 
-        # the allocating host could be fqdn or shortname - but the config
-        # only uses shortname so it needs to be converted to shortname format
-        self.allocating_host = allocating_host.split('.')[0]
+        # the allocating host could be fqdn or shortname
+        fqdn_enabled = settings.config.fqdn_enabled
+        self.allocating_host = allocating_host if fqdn_enabled else 
allocating_host.split('.')[0]
         self.backstore = backstore
         self.backstore_object_name = backstore_object_name
 
@@ -378,7 +377,7 @@
                               "continue".format(self.pool))
 
     def remove_lun(self, preserve_image):
-        this_host = gethostname().split('.')[0]
+        local_gw = this_host()
         self.logger.info("LUN deletion request received, rbd removal to be "
                          "performed by {}".format(self.allocating_host))
 
@@ -405,7 +404,7 @@
 
         rbd_image = RBDDev(self.image, '0G', self.backstore, self.pool)
 
-        if this_host == self.allocating_host:
+        if local_gw == self.allocating_host:
             # by using the allocating host we ensure the delete is not
             # issue by several hosts when initiated through ansible
             if not preserve_image:
@@ -421,7 +420,7 @@
             self.config.commit()
 
     def unmap_lun(self, target_iqn):
-        this_host = gethostname().split('.')[0]
+        local_gw = this_host()
         self.logger.info("LUN unmap request received, config commit to be "
                          "performed by {}".format(self.allocating_host))
 
@@ -450,7 +449,7 @@
         if self.error:
             return
 
-        if this_host == self.allocating_host:
+        if local_gw == self.allocating_host:
             # by using the allocating host we ensure the delete is not
             # issue by several hosts when initiated through ansible
 
@@ -627,9 +626,9 @@
         self.logger.debug("rados pool '{}' contains the following - "
                           "{}".format(self.pool, disk_list))
 
-        this_host = gethostname().split('.')[0]
+        local_gw = this_host()
         self.logger.debug("Hostname Check - this host is {}, target host for "
-                          "allocations is {}".format(this_host,
+                          "allocations is {}".format(local_gw,
                                                      self.allocating_host))
 
         rbd_image = RBDDev(self.image, self.size_bytes, self.backstore, 
self.pool)
@@ -638,7 +637,7 @@
         # if the image required isn't defined, create it!
         if self.image not in disk_list:
             # create the requested disk if this is the 'owning' host
-            if this_host == self.allocating_host:
+            if local_gw == self.allocating_host:
 
                 rbd_image.create()
 
@@ -689,7 +688,7 @@
 
         # if updates_made is not set, the disk pre-exists so on the owning
         # host see if it needs to be resized
-        if self.num_changes == 0 and this_host == self.allocating_host:
+        if self.num_changes == 0 and local_gw == self.allocating_host:
 
             # check the size, and update if needed
             rbd_image.rbd_size()
@@ -717,7 +716,7 @@
             # this image has not been defined to this hosts LIO, so check the
             # config for the details and if it's  missing define the
             # wwn/alua_state and update the config
-            if this_host == self.allocating_host:
+            if local_gw == self.allocating_host:
                 # first check to see if the device needs adding
                 try:
                     wwn = self.config.config['disks'][self.config_key]['wwn']
@@ -824,7 +823,7 @@
 
         # the owning host for an image is the only host that commits to the
         # config
-        if this_host == self.allocating_host and self.config.changed:
+        if local_gw == self.allocating_host and self.config.changed:
 
             self.logger.debug("(LUN.allocate) Committing change(s) to the "
                               "config object in pool {}".format(self.pool))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ceph-iscsi-3.0+1557415271.g940ac86/ceph_iscsi_config/settings.py 
new/ceph-iscsi-3.0+1558465738.g6a0a021/ceph_iscsi_config/settings.py
--- old/ceph-iscsi-3.0+1557415271.g940ac86/ceph_iscsi_config/settings.py        
2019-05-09 17:21:11.199630908 +0200
+++ new/ceph-iscsi-3.0+1558465738.g6a0a021/ceph_iscsi_config/settings.py        
2019-05-21 21:08:58.136569104 +0200
@@ -115,7 +115,8 @@
                 "prometheus_exporter": "true",
                 "prometheus_port": 9287,
                 "prometheus_host": "::",
-                "logger_level": logging.DEBUG
+                "logger_level": logging.DEBUG,
+                "fqdn_enabled": "false"
                 }
 
     target_defaults = {"osd_op_timeout": 30,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ceph-iscsi-3.0+1557415271.g940ac86/ceph_iscsi_config/utils.py 
new/ceph-iscsi-3.0+1558465738.g6a0a021/ceph_iscsi_config/utils.py
--- old/ceph-iscsi-3.0+1557415271.g940ac86/ceph_iscsi_config/utils.py   
2019-05-09 17:21:11.199630908 +0200
+++ new/ceph-iscsi-3.0+1558465738.g6a0a021/ceph_iscsi_config/utils.py   
2019-05-21 21:08:58.140569131 +0200
@@ -280,9 +280,10 @@
 
 def this_host():
     """
-    return the local machine's shortname
+    return the local machine's fqdn or shortname
     """
-    return socket.gethostname().split('.')[0]
+    fqdn_enabled = settings.config.fqdn_enabled
+    return socket.getfqdn() if fqdn_enabled else 
socket.gethostname().split('.')[0]
 
 
 def gen_file_hash(filename, hash_type='sha256'):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ceph-iscsi-3.0+1557415271.g940ac86/gwcli/gateway.py 
new/ceph-iscsi-3.0+1558465738.g6a0a021/gwcli/gateway.py
--- old/ceph-iscsi-3.0+1557415271.g940ac86/gwcli/gateway.py     2019-05-09 
17:21:11.199630908 +0200
+++ new/ceph-iscsi-3.0+1558465738.g6a0a021/gwcli/gateway.py     2019-05-21 
21:08:58.140569131 +0200
@@ -752,10 +752,13 @@
                                         gateway_name,
                                         settings.config.api_port))
 
+        api = APIRequest('{}/sysinfo/hostname'.format(new_gw_endpoint))
+        api.get()
+        gateway_hostname = api.response.json()['data']
         config = 
self.parent.parent.parent._get_config(endpoint=new_gw_endpoint)
         target_config = config['targets'][target_iqn]
-        portal_config = target_config['portals'][gateway_name]
-        Gateway(self, gateway_name, portal_config)
+        portal_config = target_config['portals'][gateway_hostname]
+        Gateway(self, gateway_hostname, portal_config)
 
         self.logger.info('ok')
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ceph-iscsi-3.0+1557415271.g940ac86/gwcli/utils.py 
new/ceph-iscsi-3.0+1558465738.g6a0a021/gwcli/utils.py
--- old/ceph-iscsi-3.0+1557415271.g940ac86/gwcli/utils.py       2019-05-09 
17:21:11.199630908 +0200
+++ new/ceph-iscsi-3.0+1558465738.g6a0a021/gwcli/utils.py       2019-05-21 
21:08:58.140569131 +0200
@@ -33,9 +33,10 @@
 
 def this_host():
     """
-    return the local machine's shortname
+    return the local machine's fqdn or shortname
     """
-    return socket.gethostname().split('.')[0]
+    fqdn_enabled = settings.config.fqdn_enabled
+    return socket.getfqdn() if fqdn_enabled else 
socket.gethostname().split('.')[0]
 
 
 def get_config():
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ceph-iscsi-3.0+1557415271.g940ac86/usr/lib/systemd/system/rbd-target-api.service
 
new/ceph-iscsi-3.0+1558465738.g6a0a021/usr/lib/systemd/system/rbd-target-api.service
--- 
old/ceph-iscsi-3.0+1557415271.g940ac86/usr/lib/systemd/system/rbd-target-api.service
        2019-05-09 17:21:11.199630908 +0200
+++ 
new/ceph-iscsi-3.0+1558465738.g6a0a021/usr/lib/systemd/system/rbd-target-api.service
        2019-05-21 21:08:58.140569131 +0200
@@ -3,7 +3,7 @@
 
 Requires=sys-kernel-config.mount
 After=sys-kernel-config.mount network-online.target tcmu-runner.service
-Wants=network-online.target rbd-target-gw.service tcmu-runner.service
+Wants=network-online.target tcmu-runner.service
 
 [Service]
 LimitNOFILE=1048576
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ceph-iscsi-3.0+1557415271.g940ac86/usr/lib/systemd/system/rbd-target-gw.service
 
new/ceph-iscsi-3.0+1558465738.g6a0a021/usr/lib/systemd/system/rbd-target-gw.service
--- 
old/ceph-iscsi-3.0+1557415271.g940ac86/usr/lib/systemd/system/rbd-target-gw.service
 2019-05-09 17:21:11.199630908 +0200
+++ 
new/ceph-iscsi-3.0+1558465738.g6a0a021/usr/lib/systemd/system/rbd-target-gw.service
 2019-05-21 21:08:58.140569131 +0200
@@ -4,7 +4,6 @@
 Requires=sys-kernel-config.mount
 After=sys-kernel-config.mount network-online.target rbd-target-api.service
 Wants=network-online.target
-BindsTo=rbd-target-api.service
 
 [Service]
 LimitNOFILE=1048576


Reply via email to