Hello community, here is the log from the commit of package openstack-cinder for openSUSE:Factory checked in at 2014-01-30 17:42:13 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/openstack-cinder (Old) and /work/SRC/openSUSE:Factory/.openstack-cinder.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "openstack-cinder" Changes: -------- --- /work/SRC/openSUSE:Factory/openstack-cinder/openstack-cinder.changes 2014-01-23 15:50:28.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.openstack-cinder.new/openstack-cinder.changes 2014-01-30 17:42:14.000000000 +0100 @@ -1,0 +2,42 @@ +Thu Jan 30 10:23:19 UTC 2014 - [email protected] + +- Rebased patches: + + 0001-NetApp-fix-for-vsadmin-role-failure-for-ssc.patch (only offset) + + 0001-Robustify-skipactivation-detection.patch (manually) +- Update to version 2013.2.2.dev16.g77fade5: + + NetApp fix free space as zero during 1st vol stats update + +------------------------------------------------------------------- +Wed Jan 29 09:12:31 UTC 2014 - [email protected] + +- Add refresh_patches source service + +------------------------------------------------------------------- +Tue Jan 28 19:33:04 UTC 2014 - [email protected] + +- configure lock_path + +------------------------------------------------------------------- +Sun Jan 26 00:56:37 UTC 2014 - [email protected] + +- Update to version 2013.2.2.dev14.g3d967e0: + + NFS/GlusterFS: Skip incorrectly formatted shares + + Fixed a problem in iSCSI multipath + +------------------------------------------------------------------- +Tue Jan 21 21:07:25 UTC 2014 - [email protected] + +- Only chown /var/log/cinder/cinder-manage.log if the file exists. + +------------------------------------------------------------------- +Tue Jan 21 15:05:54 UTC 2014 - [email protected] + +- fix ownership of /var/log/cinder/cinder-manage.log (bnc#859691) + +------------------------------------------------------------------- +Fri Jan 17 16:13:00 UTC 2014 - [email protected] + +- add 0001-NetApp-fix-for-vsadmin-role-failure-for-ssc.patch +- add 0001-Deactivate-LV-before-removing.patch + +------------------------------------------------------------------- New: ---- 0001-Deactivate-LV-before-removing.patch 0001-NetApp-fix-for-vsadmin-role-failure-for-ssc.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ openstack-cinder-doc.spec ++++++ --- /var/tmp/diff_new_pack.pSXLFE/_old 2014-01-30 17:42:15.000000000 +0100 +++ /var/tmp/diff_new_pack.pSXLFE/_new 2014-01-30 17:42:15.000000000 +0100 @@ -19,7 +19,7 @@ %define component cinder Name: openstack-%{component}-doc -Version: 2013.2.2.dev11.gec8ce6c +Version: 2013.2.2.dev16.g77fade5 Release: 0 Summary: OpenStack Block Storage (Cinder) - Documentation License: Apache-2.0 @@ -62,7 +62,7 @@ This package contains documentation files for %{name}. %prep -%setup -q -n cinder-2013.2.2.dev11.gec8ce6c +%setup -q -n cinder-2013.2.2.dev16.g77fade5 %openstack_cleanup_prep %build ++++++ openstack-cinder.spec ++++++ --- /var/tmp/diff_new_pack.pSXLFE/_old 2014-01-30 17:42:15.000000000 +0100 +++ /var/tmp/diff_new_pack.pSXLFE/_new 2014-01-30 17:42:15.000000000 +0100 @@ -21,7 +21,7 @@ %define username openstack-%{component} Name: openstack-%{component} -Version: 2013.2.2.dev11.gec8ce6c +Version: 2013.2.2.dev16.g77fade5 Release: 0 Summary: OpenStack Block Storage (Cinder) License: Apache-2.0 @@ -34,6 +34,8 @@ Patch0: 0001-Avoid-using-GREENDNS-due-to-dnspython.patch Patch1: 0001-Set-useful-vendor-product-id-in-Cinder-ISCSI-exports.patch Patch2: 0001-Robustify-skipactivation-detection.patch +Patch3: 0001-NetApp-fix-for-vsadmin-role-failure-for-ssc.patch +Patch4: 0001-Deactivate-LV-before-removing.patch BuildRequires: fdupes BuildRequires: openstack-suse-macros BuildRequires: openstack-suse-sudo @@ -186,10 +188,12 @@ functionality of OpenStack Cinder. %prep -%setup -q -n cinder-2013.2.2.dev11.gec8ce6c +%setup -q -n cinder-2013.2.2.dev16.g77fade5 %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 +%patch4 -p1 %openstack_cleanup_prep %build @@ -201,7 +205,7 @@ ### directories install -d -m 755 %{buildroot}%{_localstatedir}/{lib,log}/%{component} -install -d -m 750 %{buildroot}%{_localstatedir}/{cache,run}/%{component} +install -d -m 750 %{buildroot}%{_localstatedir}/{lock,cache,run}/%{component} install -d -m 755 %{buildroot}%{_sysconfdir}/%{component} ### configuration files @@ -254,6 +258,7 @@ #NOTE(saschpe): Can't hurt to set the default volume_group, only the LVM driver has a it otherwise: crudini --set %{cinder_conf} DEFAULT volume_group cinder-volumes crudini --set %{cinder_conf} keystone_authtoken signing_dir /var/cache/%component/keystone-signing +crudini --set %{cinder_conf} DEFAULT lock_path /var/lock/%component %pre getent group %{groupname} >/dev/null || groupadd -r %{groupname} @@ -304,6 +309,7 @@ %doc LICENSE README.rst %dir %attr(0755, %{username}, %{groupname}) %{_localstatedir}/lib/%{component} %dir %attr(0750, %{username}, %{groupname}) %{_localstatedir}/cache/%{component} +%dir %attr(0750, %{username}, %{groupname}) %{_localstatedir}/lock/%{component} %dir %attr(0750, %{username}, %{groupname}) %{_localstatedir}/log/%{component} %ghost %dir %attr(0750, %{username}, %{groupname}) %{_localstatedir}/run/%{component} %dir %{_sysconfdir}/%{component} ++++++ 0001-Deactivate-LV-before-removing.patch ++++++ >From 1f213111cf5be34b0aed52e7713f2be27ef6b5ea Mon Sep 17 00:00:00 2001 From: Dirk Mueller <[email protected]> Date: Fri, 17 Jan 2014 16:45:32 +0100 Subject: [PATCH] Deactivate LV before removing With certain versions of LVM2, removing an active LV can end up with Unable to deactivate open XXX libdevmapper exiting with 1 device(s) still suspended. which causes any lvm command afterwards to hang endlessly on trying to access the suspended volume. This seems to be caused by a race with udev, so lets be conservative and do the deactivation, then wait for udev and then finish the removal. Closes-Bug: #1270192 Change-Id: I4703133180567090878ea5047dd29d9f97ad85ab --- cinder/brick/local_dev/lvm.py | 48 +++++++++++++++++++++++++++++-------------- 1 file changed, 33 insertions(+), 15 deletions(-) Index: cinder-2013.2.2.dev11.gec8ce6c/cinder/brick/local_dev/lvm.py =================================================================== --- cinder-2013.2.2.dev11.gec8ce6c.orig/cinder/brick/local_dev/lvm.py +++ cinder-2013.2.2.dev11.gec8ce6c/cinder/brick/local_dev/lvm.py @@ -511,26 +511,44 @@ class LVM(executor.Executor): :param name: Name of LV to delete """ + try: - self._execute('lvremove', - '-f', - '%s/%s' % (self.vg_name, name), - root_helper=self._root_helper, run_as_root=True) - except putils.ProcessExecutionError as err: - mesg = (_('Error reported running lvremove: CMD: %(command)s, ' - 'RESPONSE: %(response)s') % - {'command': err.cmd, 'response': err.stderr}) - LOG.error(mesg) + need_force_remove = False + # LV removal seems to be a race with udev in + # some cases (see LP #1270192), so we do it in several steps: + + # - Deactivate the LV/Snapshot, which triggers udev events + # - Wait for udev to finish its job with udevadmn settle + # - Remove the LV + + try: + self._execute('lvchange', '-y', '-an', + '%s/%s' % (self.vg_name, name), + root_helper=self._root_helper, run_as_root=True) + except putils.ProcessExecutionError as err: + mesg = (_('Error during lvchange -an: CMD: %(command)s, ' + 'RESPONSE: %(response)s') % + {'command': err.cmd, 'response': err.stderr}) + LOG.debug(mesg) + need_force_remove = True - LOG.warning(_('Attempting udev settle and retry of lvremove...')) self._execute('udevadm', 'settle', - root_helper=self._root_helper, - run_as_root=True) + root_helper=self._root_helper, run_as_root=True, + check_exit_code=False) + + cmd = ['lvremove', ] - self._execute('lvremove', - '-f', - '%s/%s' % (self.vg_name, name), + # if deactivation failed, use the --force, lvm! + if need_force_remove: + cmd.append('-f') + cmd.append('%s/%s' % (self.vg_name, name)) + self._execute(*cmd, root_helper=self._root_helper, run_as_root=True) + except putils.ProcessExecutionError as err: + mesg = (_('Error during delete: CMD: %(command)s, ' + 'RESPONSE: %(response)s') % + {'command': err.cmd, 'response': err.stderr}) + LOG.info(mesg) def revert(self, snapshot_name): """Revert an LV from snapshot. ++++++ 0001-NetApp-fix-for-vsadmin-role-failure-for-ssc.patch ++++++ ++++ 662 lines (skipped) ++++++ 0001-Robustify-skipactivation-detection.patch ++++++ --- /var/tmp/diff_new_pack.pSXLFE/_old 2014-01-30 17:42:15.000000000 +0100 +++ /var/tmp/diff_new_pack.pSXLFE/_new 2014-01-30 17:42:15.000000000 +0100 @@ -12,11 +12,9 @@ cinder/brick/local_dev/lvm.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) -diff --git a/cinder/brick/local_dev/lvm.py b/cinder/brick/local_dev/lvm.py -index 0037632..35a8fa7 100644 --- a/cinder/brick/local_dev/lvm.py +++ b/cinder/brick/local_dev/lvm.py -@@ -226,11 +226,16 @@ class LVM(executor.Executor): +@@ -186,11 +186,16 @@ class LVM(executor.Executor): if self._supports_lvchange_ignoreskipactivation is not None: return self._supports_lvchange_ignoreskipactivation @@ -36,6 +34,3 @@ lines = out.split('\n') for line in lines: if '-K' in line and '--ignoreactivationskip' in line: --- -1.8.4.1 - ++++++ _service ++++++ --- /var/tmp/diff_new_pack.pSXLFE/_old 2014-01-30 17:42:15.000000000 +0100 +++ /var/tmp/diff_new_pack.pSXLFE/_new 2014-01-30 17:42:15.000000000 +0100 @@ -5,4 +5,8 @@ <param name="email">[email protected]</param> <param name="plain-version">True</param> </service> + + <service name="refresh_patches" mode="disabled"> + <param name="changesgenerate">enable</param> + </service> </services> ++++++ cinder-stable-havana.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinder-2013.2.2.dev11.gec8ce6c/ChangeLog new/cinder-2013.2.2.dev16.g77fade5/ChangeLog --- old/cinder-2013.2.2.dev11.gec8ce6c/ChangeLog 2013-12-31 20:46:02.000000000 +0100 +++ new/cinder-2013.2.2.dev16.g77fade5/ChangeLog 2014-01-29 21:08:23.000000000 +0100 @@ -1,3 +1,47 @@ +commit 77fade503a4bc2ff45f43855d03125a361a43ffb +Merge: 3d967e0 c07d60f +Author: Jenkins <[email protected]> +Date: Wed Jan 29 20:06:01 2014 +0000 + + Merge "NetApp fix free space as zero during 1st vol stats update" into stable/havana + +commit 3d967e05ea082cbb755586e07e21f2b070d0bdb3 +Merge: 6687331 24f976c +Author: Jenkins <[email protected]> +Date: Sat Jan 25 23:36:45 2014 +0000 + + Merge "Fixed a problem in iSCSI multipath" into stable/havana + +commit 24f976cd13d884e2c8604a5ace7ed4ed05334107 +Author: Xing Yang <[email protected]> +Date: Mon Jan 6 17:16:05 2014 -0500 + + Fixed a problem in iSCSI multipath + + Multipathing during copy image to volume and copy volume to image + operations doesn't work properly if there are different targets + associated with different portals for a mulitpath device. + + Change-Id: I65c93f3788020c944db0d3a55063a6415554ff11 + Closes-Bug: #1266048 + (cherry picked from commit 3e4f554f614c8cb6d5f014c72f3c635184a4dec2) + +commit 66873311e510aea5c349e64f7f9e9e94a662a453 +Author: Eric Harney <[email protected]> +Date: Mon Dec 9 15:34:39 2013 -0500 + + NFS/GlusterFS: Skip incorrectly formatted shares + + Shares should always be of the form address:/volume. If they are + not (i.e., are missing the '/'), then skip them and issue a warning + message. This will prevent us from sending incorrect connection_info + dicts to Nova. + + Closes-Bug: #1267253 + + Change-Id: Ic40cd0cdc862b44b0a7d3e5b1d7c4fee8ea1b28d + (cherry picked from commit 21ebf2898e2f5fc8127b7a3bdc9743c49933f952) + commit ec8ce6cdf236154b4ba0b392202fa7bd7c7c9b61 Merge: 5228001 1b437d9 Author: Jenkins <[email protected]> @@ -436,6 +480,23 @@ Partial-Bug: #1197612 (cherry picked from commit bb2daca2864a5607635a3aa37f3874fdda22797b) +commit c07d60fe456484b45cff543cfd08391b0e3ba9f2 +Author: Navneet Singh <[email protected]> +Date: Mon Nov 18 02:38:07 2013 +0530 + + NetApp fix free space as zero during 1st vol stats update + + NetApp clustered ontap drivers report space as zero + till first 60 seconds of driver start. This is causing + discomfort for some performance sensitive deployements. + This was due to async nature of the NetApp stats collection job. + Job is changed to sync at driver start to improve customer + experience. + + Change-Id: I7d5cbf590897a0d328ece3a60516c92c0ad0ee7f + Closes-bug: #1253660 + (cherry picked from commit 585f34ff7798ad271121d432e0cae8820bc54389) + commit ad05556a2f3acf11e7ab633fa59bf23a6cad11da Merge: 5f7d263 fb8db56 Author: Jenkins <[email protected]> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinder-2013.2.2.dev11.gec8ce6c/PKG-INFO new/cinder-2013.2.2.dev16.g77fade5/PKG-INFO --- old/cinder-2013.2.2.dev11.gec8ce6c/PKG-INFO 2013-12-31 20:46:03.000000000 +0100 +++ new/cinder-2013.2.2.dev16.g77fade5/PKG-INFO 2014-01-29 21:08:24.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: cinder -Version: 2013.2.2.dev11.gec8ce6c +Version: 2013.2.2.dev16.g77fade5 Summary: OpenStack Block Storage Home-page: http://www.openstack.org/ Author: OpenStack diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinder-2013.2.2.dev11.gec8ce6c/cinder/brick/initiator/connector.py new/cinder-2013.2.2.dev16.g77fade5/cinder/brick/initiator/connector.py --- old/cinder-2013.2.2.dev11.gec8ce6c/cinder/brick/initiator/connector.py 2013-12-31 20:44:23.000000000 +0100 +++ new/cinder-2013.2.2.dev16.g77fade5/cinder/brick/initiator/connector.py 2014-01-29 21:06:39.000000000 +0100 @@ -202,9 +202,10 @@ check_exit_code=[0, 255])[0] \ or "" - for ip in self._get_target_portals_from_iscsiadm_output(out): + for ip, iqn in self._get_target_portals_from_iscsiadm_output(out): props = connection_properties.copy() props['target_portal'] = ip + props['target_iqn'] = iqn self._connect_to_iscsi_portal(props) self._rescan_iscsi() @@ -256,12 +257,20 @@ target_iqn - iSCSI Qualified Name target_lun - LUN id of the volume """ + # Moved _rescan_iscsi and _rescan_multipath + # from _disconnect_volume_multipath_iscsi to here. + # Otherwise, if we do rescan after _linuxscsi.remove_multipath_device + # but before logging out, the removed devices under /dev/disk/by-path + # will reappear after rescan. + self._rescan_iscsi() host_device = self._get_device_path(connection_properties) multipath_device = None if self.use_multipath: + self._rescan_multipath() multipath_device = self._get_multipath_device_name(host_device) if multipath_device: - self._linuxscsi.remove_multipath_device(multipath_device) + device_realpath = os.path.realpath(host_device) + self._linuxscsi.remove_multipath_device(device_realpath) return self._disconnect_volume_multipath_iscsi( connection_properties, multipath_device) @@ -326,14 +335,13 @@ **kwargs) def _get_target_portals_from_iscsiadm_output(self, output): - return [line.split()[0] for line in output.splitlines()] + # return both portals and iqns + return [line.split() for line in output.splitlines()] def _disconnect_volume_multipath_iscsi(self, connection_properties, multipath_name): """This removes a multipath device and it's LUNs.""" LOG.debug("Disconnect multipath device %s" % multipath_name) - self._rescan_iscsi() - self._rescan_multipath() block_devices = self.driver.get_all_block_devices() devices = [] for dev in block_devices: @@ -344,17 +352,42 @@ if mpdev: devices.append(mpdev) + # Do a discovery to find all targets. + # Targets for multiple paths for the same multipath device + # may not be the same. + out = self._run_iscsiadm_bare(['-m', + 'discovery', + '-t', + 'sendtargets', + '-p', + connection_properties['target_portal']], + check_exit_code=[0, 255])[0] \ + or "" + + ips_iqns = self._get_target_portals_from_iscsiadm_output(out) + if not devices: # disconnect if no other multipath devices - self._disconnect_mpath(connection_properties) + self._disconnect_mpath(connection_properties, ips_iqns) return + # Get a target for all other multipath devices other_iqns = [self._get_multipath_iqn(device) for device in devices] + # Get all the targets for the current multipath device + current_iqns = [iqn for ip, iqn in ips_iqns] - if connection_properties['target_iqn'] not in other_iqns: + in_use = False + for current in current_iqns: + if current in other_iqns: + in_use = True + break + + # If no other multipath device attached has the same iqn + # as the current device + if not in_use: # disconnect if no other multipath devices with same iqn - self._disconnect_mpath(connection_properties) + self._disconnect_mpath(connection_properties, ips_iqns) return # else do not disconnect iscsi portals, @@ -449,13 +482,11 @@ return [] return [entry for entry in devices if entry.startswith("ip-")] - def _disconnect_mpath(self, connection_properties): - entries = self._get_iscsi_devices() - ips = [ip.split("-")[1] for ip in entries - if connection_properties['target_iqn'] in ip] - for ip in ips: + def _disconnect_mpath(self, connection_properties, ips_iqns): + for ip, iqn in ips_iqns: props = connection_properties.copy() props['target_portal'] = ip + props['target_iqn'] = iqn self._disconnect_from_iscsi_portal(props) self._rescan_multipath() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinder-2013.2.2.dev11.gec8ce6c/cinder/tests/brick/test_brick_connector.py new/cinder-2013.2.2.dev16.g77fade5/cinder/tests/brick/test_brick_connector.py --- old/cinder-2013.2.2.dev11.gec8ce6c/cinder/tests/brick/test_brick_connector.py 2013-12-31 20:44:24.000000000 +0100 +++ new/cinder-2013.2.2.dev16.g77fade5/cinder/tests/brick/test_brick_connector.py 2014-01-29 21:06:39.000000000 +0100 @@ -186,6 +186,8 @@ ('iscsiadm -m node -T %s -p %s --op update' ' -n node.startup -v automatic' % (iqn, location)), + ('iscsiadm -m node --rescan'), + ('iscsiadm -m session --rescan'), ('tee -a /sys/block/sdb/device/delete'), ('iscsiadm -m node -T %s -p %s --op update' ' -n node.startup -v manual' % (iqn, location)), @@ -199,7 +201,6 @@ self.assertEqual(expected_commands, self.cmds) def test_connect_volume_with_multipath(self): - location = '10.0.2.15:3260' name = 'volume-00000001' iqn = 'iqn.2010-10.org.openstack:%s' % name @@ -213,7 +214,7 @@ lambda *args, **kwargs: "%s %s" % (location, iqn)) self.stubs.Set(self.connector_with_multipath, '_get_target_portals_from_iscsiadm_output', - lambda x: [location]) + lambda x: [[location, iqn]]) self.stubs.Set(self.connector_with_multipath, '_connect_to_iscsi_portal', lambda x: None) @@ -250,7 +251,9 @@ test_output = '''10.15.84.19:3260 iqn.1992-08.com.netapp:sn.33615311 10.15.85.19:3260 iqn.1992-08.com.netapp:sn.33615311''' res = connector._get_target_portals_from_iscsiadm_output(test_output) - expected = ['10.15.84.19:3260', '10.15.85.19:3260'] + ip_iqn1 = ['10.15.84.19:3260', 'iqn.1992-08.com.netapp:sn.33615311'] + ip_iqn2 = ['10.15.85.19:3260', 'iqn.1992-08.com.netapp:sn.33615311'] + expected = [ip_iqn1, ip_iqn2] self.assertEqual(expected, res) def test_get_multipath_device_name(self): @@ -288,12 +291,16 @@ def test_disconnect_volume_multipath_iscsi(self): result = [] - def fake_disconnect_mpath(properties): + def fake_disconnect_from_iscsi_portal(properties): result.append(properties) iqn1 = 'iqn.2013-01.ro.com.netapp:node.netapp01' iqn2 = 'iqn.2013-01.ro.com.netapp:node.netapp02' iqns = [iqn1, iqn2] - dev = ('ip-10.0.0.1:3260-iscsi-%s-lun-0' % iqn1) + portal = '10.0.0.1:3260' + dev = ('ip-%s-iscsi-%s-lun-0' % (portal, iqn1)) + self.stubs.Set(self.connector, + '_get_target_portals_from_iscsiadm_output', + lambda x: [[portal, iqn1]]) self.stubs.Set(self.connector, '_rescan_iscsi', lambda: None) self.stubs.Set(self.connector, '_rescan_multipath', lambda: None) self.stubs.Set(self.connector.driver, 'get_all_block_devices', @@ -302,27 +309,37 @@ lambda x: '/dev/mapper/md-3') self.stubs.Set(self.connector, '_get_multipath_iqn', lambda x: iqns.pop()) - self.stubs.Set(self.connector, '_disconnect_mpath', - fake_disconnect_mpath) - fake_property = {'target_iqn': "You'll-never-find-this-iqn"} + self.stubs.Set(self.connector, '_disconnect_from_iscsi_portal', + fake_disconnect_from_iscsi_portal) + fake_property = {'target_portal': portal, + 'target_iqn': iqn1} self.connector._disconnect_volume_multipath_iscsi(fake_property, 'fake/multipath') - self.assertEqual([fake_property], result) + # Target in use by other mp devices, don't disconnect + self.assertEqual([], result) def test_disconnect_volume_multipath_iscsi_without_other_mp_devices(self): result = [] - def fake_disconnect_mpath(properties): + def fake_disconnect_from_iscsi_portal(properties): result.append(properties) + portal = '10.0.2.15:3260' + name = 'volume-00000001' + iqn = 'iqn.2010-10.org.openstack:%s' % name + self.stubs.Set(self.connector, + '_get_target_portals_from_iscsiadm_output', + lambda x: [[portal, iqn]]) self.stubs.Set(self.connector, '_rescan_iscsi', lambda: None) self.stubs.Set(self.connector, '_rescan_multipath', lambda: None) self.stubs.Set(self.connector.driver, 'get_all_block_devices', lambda: []) - self.stubs.Set(self.connector, '_disconnect_mpath', - fake_disconnect_mpath) - fake_property = {'target_iqn': "You'll-never-find-this-iqn"} + self.stubs.Set(self.connector, '_disconnect_from_iscsi_portal', + fake_disconnect_from_iscsi_portal) + fake_property = {'target_portal': portal, + 'target_iqn': iqn} self.connector._disconnect_volume_multipath_iscsi(fake_property, 'fake/multipath') + # Target not in use by other mp devices, disconnect self.assertEqual([fake_property], result) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinder-2013.2.2.dev11.gec8ce6c/cinder/tests/test_glusterfs.py new/cinder-2013.2.2.dev16.g77fade5/cinder/tests/test_glusterfs.py --- old/cinder-2013.2.2.dev11.gec8ce6c/cinder/tests/test_glusterfs.py 2013-12-31 20:44:24.000000000 +0100 +++ new/cinder-2013.2.2.dev16.g77fade5/cinder/tests/test_glusterfs.py 2014-01-29 21:06:39.000000000 +0100 @@ -289,6 +289,7 @@ config_data.append(self.TEST_EXPORT1) config_data.append('#' + self.TEST_EXPORT2) config_data.append(self.TEST_EXPORT2 + ' ' + self.TEST_EXPORT2_OPTIONS) + config_data.append('broken:share_format') config_data.append('') drv._read_config_file(self.TEST_SHARES_CONFIG_FILE).\ AndReturn(config_data) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinder-2013.2.2.dev11.gec8ce6c/cinder/tests/test_netapp.py new/cinder-2013.2.2.dev16.g77fade5/cinder/tests/test_netapp.py --- old/cinder-2013.2.2.dev11.gec8ce6c/cinder/tests/test_netapp.py 2013-12-31 20:44:24.000000000 +0100 +++ new/cinder-2013.2.2.dev16.g77fade5/cinder/tests/test_netapp.py 2014-01-29 21:06:39.000000000 +0100 @@ -545,7 +545,8 @@ def _custom_setup(self): self.stubs.Set( - ssc_utils, 'refresh_cluster_ssc', lambda a, b, c: None) + ssc_utils, 'refresh_cluster_ssc', + lambda a, b, c, synchronous: None) configuration = self._set_config(create_configuration()) driver = common.NetAppDriver(configuration=configuration) self.stubs.Set(httplib, 'HTTPConnection', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinder-2013.2.2.dev11.gec8ce6c/cinder/tests/test_nfs.py new/cinder-2013.2.2.dev16.g77fade5/cinder/tests/test_nfs.py --- old/cinder-2013.2.2.dev11.gec8ce6c/cinder/tests/test_nfs.py 2013-12-31 20:44:24.000000000 +0100 +++ new/cinder-2013.2.2.dev16.g77fade5/cinder/tests/test_nfs.py 2014-01-29 21:06:39.000000000 +0100 @@ -280,6 +280,7 @@ config_data.append('') config_data.append(self.TEST_NFS_EXPORT2 + ' ' + self.TEST_NFS_EXPORT2_OPTIONS) + config_data.append('broken:share_format') drv._read_config_file(self.TEST_SHARES_CONFIG_FILE).\ AndReturn(config_data) mox.ReplayAll() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinder-2013.2.2.dev11.gec8ce6c/cinder/volume/drivers/netapp/iscsi.py new/cinder-2013.2.2.dev16.g77fade5/cinder/volume/drivers/netapp/iscsi.py --- old/cinder-2013.2.2.dev11.gec8ce6c/cinder/volume/drivers/netapp/iscsi.py 2013-12-31 20:44:24.000000000 +0100 +++ new/cinder-2013.2.2.dev16.g77fade5/cinder/volume/drivers/netapp/iscsi.py 2014-01-29 21:06:39.000000000 +0100 @@ -781,7 +781,6 @@ self.client.set_api_version(major, minor) self.ssc_vols = None self.stale_vols = set() - ssc_utils.refresh_cluster_ssc(self, self.client, self.vserver) def _create_lun_on_eligible_vol(self, name, size, metadata, extra_specs=None): @@ -1057,6 +1056,9 @@ def _update_cluster_vol_stats(self, data): """Updates vol stats with cluster config.""" + sync = True if self.ssc_vols is None else False + ssc_utils.refresh_cluster_ssc(self, self.client, self.vserver, + synchronous=sync) if self.ssc_vols: data['netapp_mirrored'] = 'true'\ if self.ssc_vols['mirrored'] else 'false' @@ -1090,7 +1092,6 @@ data['free_capacity_gb'] = 0 else: LOG.warn(_("Cluster ssc is not updated. No volume stats found.")) - ssc_utils.refresh_cluster_ssc(self, self.client, self.vserver) @utils.synchronized('update_stale') def _update_stale_vols(self, volume=None, reset=False): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinder-2013.2.2.dev11.gec8ce6c/cinder/volume/drivers/netapp/nfs.py new/cinder-2013.2.2.dev16.g77fade5/cinder/volume/drivers/netapp/nfs.py --- old/cinder-2013.2.2.dev11.gec8ce6c/cinder/volume/drivers/netapp/nfs.py 2013-12-31 20:44:24.000000000 +0100 +++ new/cinder-2013.2.2.dev16.g77fade5/cinder/volume/drivers/netapp/nfs.py 2014-01-29 21:06:39.000000000 +0100 @@ -714,7 +714,6 @@ self.ssc_enabled = True LOG.info(_("Shares on vserver %s will only" " be used for provisioning.") % (self.vserver)) - ssc_utils.refresh_cluster_ssc(self, self._client, self.vserver) else: self.ssc_enabled = False LOG.warn(_("No vserver set in config. SSC will be disabled.")) @@ -881,6 +880,12 @@ def _update_cluster_vol_stats(self, data): """Updates vol stats with cluster config.""" + if self.ssc_enabled: + sync = True if self.ssc_vols is None else False + ssc_utils.refresh_cluster_ssc(self, self._client, self.vserver, + synchronous=sync) + else: + LOG.warn(_("No vserver set in config. SSC will be disabled.")) if self.ssc_vols: data['netapp_mirrored'] = 'true'\ if self.ssc_vols['mirrored'] else 'false' @@ -914,10 +919,6 @@ elif self.ssc_enabled: LOG.warn(_("No cluster ssc stats found." " Wait for next volume stats update.")) - if self.ssc_enabled: - ssc_utils.refresh_cluster_ssc(self, self._client, self.vserver) - else: - LOG.warn(_("No vserver set in config. SSC will be disabled.")) @utils.synchronized('update_stale') def _update_stale_vols(self, volume=None, reset=False): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinder-2013.2.2.dev11.gec8ce6c/cinder/volume/drivers/netapp/ssc_utils.py new/cinder-2013.2.2.dev16.g77fade5/cinder/volume/drivers/netapp/ssc_utils.py --- old/cinder-2013.2.2.dev11.gec8ce6c/cinder/volume/drivers/netapp/ssc_utils.py 2013-12-31 20:44:24.000000000 +0100 +++ new/cinder-2013.2.2.dev16.g77fade5/cinder/volume/drivers/netapp/ssc_utils.py 2014-01-29 21:06:39.000000000 +0100 @@ -434,6 +434,9 @@ vol_set = ssc_vols_copy[k] vol_set.discard(vol) backend.refresh_ssc_vols(ssc_vols_copy) + LOG.info(_('Successfully completed stale refresh job for' + ' %(server)s and vserver %(vs)s') + % {'server': na_server, 'vs': vserver}) refresh_stale_ssc() finally: @@ -464,13 +467,16 @@ ssc_vols = get_cluster_ssc(na_server, vserver) backend.refresh_ssc_vols(ssc_vols) backend.ssc_run_time = timeutils.utcnow() + LOG.info(_('Successfully completed ssc job for %(server)s' + ' and vserver %(vs)s') + % {'server': na_server, 'vs': vserver}) get_latest_ssc() finally: na_utils.set_safe_attr(backend, 'ssc_job_running', False) -def refresh_cluster_ssc(backend, na_server, vserver): +def refresh_cluster_ssc(backend, na_server, vserver, synchronous=False): """Refresh cluster ssc for backend.""" if not isinstance(backend, driver.VolumeDriver): raise exception.InvalidInput(reason=_("Backend not a VolumeDriver.")) @@ -483,17 +489,23 @@ elif (getattr(backend, 'ssc_run_time', None) is None or (backend.ssc_run_time and timeutils.is_newer_than(backend.ssc_run_time, delta_secs))): - t = Timer(0, get_cluster_latest_ssc, - args=[backend, na_server, vserver]) - t.start() + if synchronous: + get_cluster_latest_ssc(backend, na_server, vserver) + else: + t = Timer(0, get_cluster_latest_ssc, + args=[backend, na_server, vserver]) + t.start() elif getattr(backend, 'refresh_stale_running', None): LOG.warn(_('refresh stale ssc job in progress. Returning... ')) return else: if backend.stale_vols: - t = Timer(0, refresh_cluster_stale_ssc, - args=[backend, na_server, vserver]) - t.start() + if synchronous: + refresh_cluster_stale_ssc(backend, na_server, vserver) + else: + t = Timer(0, refresh_cluster_stale_ssc, + args=[backend, na_server, vserver]) + t.start() def get_volumes_for_specs(ssc_vols, specs): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinder-2013.2.2.dev11.gec8ce6c/cinder/volume/drivers/nfs.py new/cinder-2013.2.2.dev16.g77fade5/cinder/volume/drivers/nfs.py --- old/cinder-2013.2.2.dev11.gec8ce6c/cinder/volume/drivers/nfs.py 2013-12-31 20:44:24.000000000 +0100 +++ new/cinder-2013.2.2.dev16.g77fade5/cinder/volume/drivers/nfs.py 2014-01-29 21:06:39.000000000 +0100 @@ -17,6 +17,7 @@ import errno import os +import re from oslo.config import cfg @@ -294,6 +295,11 @@ share_address = share_info[0].strip().decode('unicode_escape') share_opts = share_info[1].strip() if len(share_info) > 1 else None + if not re.match(r'.+:/.+', share_address): + LOG.warn("Share %s ignored due to invalid format. Must be of " + "form address:/export." % share_address) + continue + self.shares[share_address] = share_opts LOG.debug("shares loaded: %s", self.shares) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cinder-2013.2.2.dev11.gec8ce6c/cinder.egg-info/PKG-INFO new/cinder-2013.2.2.dev16.g77fade5/cinder.egg-info/PKG-INFO --- old/cinder-2013.2.2.dev11.gec8ce6c/cinder.egg-info/PKG-INFO 2013-12-31 20:46:03.000000000 +0100 +++ new/cinder-2013.2.2.dev16.g77fade5/cinder.egg-info/PKG-INFO 2014-01-29 21:08:23.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: cinder -Version: 2013.2.2.dev11.gec8ce6c +Version: 2013.2.2.dev16.g77fade5 Summary: OpenStack Block Storage Home-page: http://www.openstack.org/ Author: OpenStack ++++++ openstack-cinder.init ++++++ --- /var/tmp/diff_new_pack.pSXLFE/_old 2014-01-30 17:42:16.000000000 +0100 +++ /var/tmp/diff_new_pack.pSXLFE/_new 2014-01-30 17:42:16.000000000 +0100 @@ -25,6 +25,7 @@ case "$1" in start) echo -n "Checking for DB Migrations" + test -f /var/log/cinder/cinder-manage.log && chown $USER. /var/log/cinder/cinder-manage.log su $USER -s /bin/sh -c "/usr/bin/cinder-manage db sync" rc_status -v -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
