diff -Nru cinder-12.0.5/api-ref/source/v3/attachments.inc cinder-12.0.7/api-ref/source/v3/attachments.inc --- cinder-12.0.5/api-ref/source/v3/attachments.inc 2019-01-29 01:46:26.000000000 +0000 +++ cinder-12.0.7/api-ref/source/v3/attachments.inc 2019-05-09 15:42:57.000000000 +0000 @@ -180,7 +180,7 @@ Available starting in the 3.27 microversion. -Normal response codes: 202 +Normal response codes: 200 Error response codes: badRequest(400), itemNotFound(404) @@ -285,7 +285,7 @@ Available starting in the 3.44 microversion. -Normal response codes: 202 +Normal response codes: 204 Error response codes: badRequest(400), itemNotFound(404) diff -Nru cinder-12.0.5/AUTHORS cinder-12.0.7/AUTHORS --- cinder-12.0.5/AUTHORS 2019-01-29 01:48:02.000000000 +0000 +++ cinder-12.0.7/AUTHORS 2019-05-09 15:44:50.000000000 +0000 @@ -60,6 +60,7 @@ Andrey Volkov Andy Grover Angela Smith +Angela Smith Angus Lees Anh Tran Anish Bhatt @@ -187,6 +188,7 @@ David Ripton David Rosales David Sariel +David Vallee Delisle Deepak C Shetty Deepti Ramakrishna Deliang Fan @@ -307,6 +309,7 @@ Hyeock Kwon Ian Denhardt Ian Govett +Ian Wienand Ibadulla Khan Igor Pugovkin Ihar Hrachyshka @@ -413,6 +416,7 @@ Kendall Nelson Kendall Nelson Kenji Yasui +Kevin Carter Kevin Fox Koert van der Veer Kui Shi @@ -671,6 +675,7 @@ Sergey Vilgelm Sergey Vilgelm Sergio Cazzolato +Serhii Rusin Shane Wang ShangXiao Shao Kai Li @@ -1069,6 +1074,7 @@ wangqiangbj wangxiyuan wangzhenyu +whoami-rajat wingwj wuyuting xgwang5843 @@ -1120,4 +1126,5 @@ zhu.fanglei zhu.rong zhufl +zhurong zhuzhubj diff -Nru cinder-12.0.5/ChangeLog cinder-12.0.7/ChangeLog --- cinder-12.0.5/ChangeLog 2019-01-29 01:48:01.000000000 +0000 +++ cinder-12.0.7/ChangeLog 2019-05-09 15:44:49.000000000 +0000 @@ -1,10 +1,37 @@ CHANGES ======= +12.0.7 +------ + +* Check Volume Status on attachment create/update +* Handle multiattach attribute when managing volumes +* Set right attach mode after migration +* Correct attachment create success response code +* Replace openstack.org git:// URLs with https:// +* add resource filters to the included data\_files +* Delete related encryption provider when a volume type is deleting +* Fix group availability zone-backend host mismatch + +12.0.6 +------ + +* Fix Snapshot object metadata loading +* VNX: update sg in cache +* Fix multiattach set to false after retype +* Fix for auth version change in Brcd HTTP +* Fix version return incorrect when endpoint url end without / +* Update the HP MSA and Lenovo driver documentation +* VNX Driver: delete\_hba() instead of remove\_hba() +* Fix for HPE MSA 2050 login failures +* Avoid using 'truncate' on Windows +* Fix permissions with NFS-backed snapshots and backups + 12.0.5 ------ * cinder-volume: Stop masking IOError different than ENOSPC +* VMAX driver doc - notification of fix on AFA OS upgrade issue * Add secret=true to fixed\_key configuration parameter * Retry on DBDeadLock affecting worker updates * Consume quota when importing backup resource diff -Nru cinder-12.0.5/cinder/api/v3/attachments.py cinder-12.0.7/cinder/api/v3/attachments.py --- cinder-12.0.5/cinder/api/v3/attachments.py 2019-01-29 01:46:26.000000000 +0000 +++ cinder-12.0.7/cinder/api/v3/attachments.py 2019-05-09 15:42:57.000000000 +0000 @@ -97,7 +97,7 @@ sort_direction=sort_dirs) @wsgi.Controller.api_version(mv.NEW_ATTACH) - @wsgi.response(202) + @wsgi.response(200) @validation.schema(attachment.create) def create(self, req, body): """Create an attachment. @@ -258,7 +258,7 @@ attachments = self.volume_api.attachment_delete(context, attachment) return attachment_views.ViewBuilder.list(attachments) - @wsgi.response(202) + @wsgi.response(204) @wsgi.Controller.api_version(mv.NEW_ATTACH_COMPLETION) @wsgi.action('os-complete') def complete(self, req, id, body): diff -Nru cinder-12.0.5/cinder/api/views/versions.py cinder-12.0.7/cinder/api/views/versions.py --- cinder-12.0.5/cinder/api/views/versions.py 2019-01-29 01:46:16.000000000 +0000 +++ cinder-12.0.7/cinder/api/views/versions.py 2019-05-09 15:42:49.000000000 +0000 @@ -68,6 +68,8 @@ def _generate_href(self, version='v3', path=None): """Create a URL that refers to a specific version_number.""" base_url = self._get_base_url_without_version() + # Always add '/' to base_url end for urljoin href url + base_url = base_url.rstrip('/') + '/' rel_version = version.lstrip('/') href = urllib.parse.urljoin(base_url, rel_version).rstrip('/') + '/' if path: diff -Nru cinder-12.0.5/cinder/backup/drivers/nfs.py cinder-12.0.7/cinder/backup/drivers/nfs.py --- cinder-12.0.5/cinder/backup/drivers/nfs.py 2019-01-29 01:46:26.000000000 +0000 +++ cinder-12.0.7/cinder/backup/drivers/nfs.py 2019-05-09 15:42:57.000000000 +0000 @@ -88,12 +88,12 @@ current_mode = utils.get_file_mode(mount_path) if group_id != current_group_id: - cmd = ['chgrp', group_id, mount_path] + cmd = ['chgrp', '-R', group_id, mount_path] self._execute(*cmd, root_helper=self._root_helper, run_as_root=True) if not (current_mode & stat.S_IWGRP): - cmd = ['chmod', 'g+w', mount_path] + cmd = ['chmod', '-R', 'g+w', mount_path] self._execute(*cmd, root_helper=self._root_helper, run_as_root=True) diff -Nru cinder-12.0.5/cinder/db/sqlalchemy/api.py cinder-12.0.7/cinder/db/sqlalchemy/api.py --- cinder-12.0.5/cinder/db/sqlalchemy/api.py 2019-01-29 01:46:26.000000000 +0000 +++ cinder-12.0.7/cinder/db/sqlalchemy/api.py 2019-05-09 15:42:57.000000000 +0000 @@ -4147,6 +4147,11 @@ update({'deleted': True, 'deleted_at': utcnow, 'updated_at': literal_column('updated_at')}) + model_query(context, models.Encryption, session=session).\ + filter_by(volume_type_id=id).\ + update({'deleted': True, + 'deleted_at': utcnow, + 'updated_at': literal_column('updated_at')}) model_query(context, models.VolumeTypeProjects, session=session, read_deleted="int_no").filter_by( volume_type_id=id).soft_delete(synchronize_session=False) diff -Nru cinder-12.0.5/cinder/group/api.py cinder-12.0.7/cinder/group/api.py --- cinder-12.0.5/cinder/group/api.py 2019-01-29 01:46:26.000000000 +0000 +++ cinder-12.0.7/cinder/group/api.py 2019-05-09 15:42:57.000000000 +0000 @@ -455,6 +455,7 @@ 'display_name': request_spec.get('name'), 'volume_type_id': volume_type_id, 'group_type_id': group.group_type_id, + 'availability_zone': group.availability_zone } request_spec['volume_properties'] = volume_properties diff -Nru cinder-12.0.5/cinder/objects/snapshot.py cinder-12.0.7/cinder/objects/snapshot.py --- cinder-12.0.5/cinder/objects/snapshot.py 2019-01-29 01:46:26.000000000 +0000 +++ cinder-12.0.7/cinder/objects/snapshot.py 2019-05-09 15:42:57.000000000 +0000 @@ -95,7 +95,7 @@ def __init__(self, *args, **kwargs): super(Snapshot, self).__init__(*args, **kwargs) - self._orig_metadata = {} + self.metadata = kwargs.get('metadata', {}) self._reset_metadata_tracking() diff -Nru cinder-12.0.5/cinder/tests/unit/api/views/test_versions.py cinder-12.0.7/cinder/tests/unit/api/views/test_versions.py --- cinder-12.0.5/cinder/tests/unit/api/views/test_versions.py 2019-01-29 01:46:16.000000000 +0000 +++ cinder-12.0.7/cinder/tests/unit/api/views/test_versions.py 2019-05-09 15:42:49.000000000 +0000 @@ -27,6 +27,7 @@ URL_BASE = 'http://localhost/volume/' +URL_BASE_NO_SLASH = 'http://localhost/volume' FAKE_HREF = URL_BASE + 'v1/' FAKE_VERSIONS = { @@ -72,6 +73,10 @@ request = FakeRequest(URL_BASE) return versions.get_view_builder(request) + def _get_builder_no_slash(self): + request = FakeRequest(URL_BASE_NO_SLASH) + return versions.get_view_builder(request) + def test_build_versions(self): self.mock_object(versions.ViewBuilder, @@ -79,11 +84,14 @@ return_value=FAKE_LINKS) result = self._get_builder().build_versions(FAKE_VERSIONS) + result_no_slash = self._get_builder_no_slash().build_versions( + FAKE_VERSIONS) expected = {'versions': list(FAKE_VERSIONS.values())} expected['versions'][0]['links'] = FAKE_LINKS self.assertEqual(expected, result) + self.assertEqual(expected, result_no_slash) def test_build_version(self): @@ -92,11 +100,14 @@ return_value=FAKE_LINKS) result = self._get_builder()._build_version(FAKE_VERSIONS['v1.0']) + result_no_slash = self._get_builder_no_slash()._build_version( + FAKE_VERSIONS['v1.0']) expected = copy.deepcopy(FAKE_VERSIONS['v1.0']) expected['links'] = FAKE_LINKS self.assertEqual(expected, result) + self.assertEqual(expected, result_no_slash) def test_build_links(self): @@ -105,14 +116,19 @@ return_value=FAKE_HREF) result = self._get_builder()._build_links(FAKE_VERSIONS['v1.0']) + result_no_slash = self._get_builder_no_slash()._build_links( + FAKE_VERSIONS['v1.0']) self.assertEqual(FAKE_LINKS, result) + self.assertEqual(FAKE_LINKS, result_no_slash) def test_generate_href_defaults(self): result = self._get_builder()._generate_href() + result_no_slash = self._get_builder_no_slash()._generate_href() self.assertEqual(URL_BASE + 'v3/', result) + self.assertEqual(URL_BASE + 'v3/', result_no_slash) @ddt.data( ('v2', None, URL_BASE + 'v2/'), @@ -125,8 +141,11 @@ result = self._get_builder()._generate_href(version=version, path=path) + result_no_slash = self._get_builder_no_slash()._generate_href( + version=version, path=path) self.assertEqual(expected, result) + self.assertEqual(expected, result_no_slash) @ddt.data( ('http://1.1.1.1/', 'http://1.1.1.1/'), diff -Nru cinder-12.0.5/cinder/tests/unit/attachments/test_attachments_api.py cinder-12.0.7/cinder/tests/unit/attachments/test_attachments_api.py --- cinder-12.0.5/cinder/tests/unit/attachments/test_attachments_api.py 2019-01-29 01:46:26.000000000 +0000 +++ cinder-12.0.7/cinder/tests/unit/attachments/test_attachments_api.py 2019-05-09 15:42:57.000000000 +0000 @@ -280,3 +280,37 @@ self.assertEqual('ro', aref.attach_mode) self.assertEqual(vref.id, aref.volume_id) self.assertEqual({}, aref.connection_info) + + def test_attachment_create_volume_in_error_state(self): + """Test attachment_create volume in error state.""" + volume_params = {'status': 'available'} + + vref = tests_utils.create_volume(self.context, **volume_params) + vref.status = "error" + self.assertRaises(exception.InvalidVolume, + self.volume_api.attachment_create, + self.context, + vref, + fake.UUID2) + + def test_attachment_update_volume_in_error_state(self): + """Test attachment_update volumem in error state.""" + volume_params = {'status': 'available'} + + vref = tests_utils.create_volume(self.context, **volume_params) + aref = self.volume_api.attachment_create(self.context, + vref, + fake.UUID2) + self.assertEqual(fake.UUID2, aref.instance_uuid) + self.assertIsNone(aref.attach_time) + self.assertEqual('reserved', aref.attach_status) + self.assertEqual(vref.id, aref.volume_id) + self.assertEqual({}, aref.connection_info) + vref.status = 'error' + vref.save() + connector = {'fake': 'connector'} + self.assertRaises(exception.InvalidVolume, + self.volume_api.attachment_update, + self.context, + aref, + connector) diff -Nru cinder-12.0.5/cinder/tests/unit/backup/drivers/test_backup_nfs.py cinder-12.0.7/cinder/tests/unit/backup/drivers/test_backup_nfs.py --- cinder-12.0.5/cinder/tests/unit/backup/drivers/test_backup_nfs.py 2019-01-29 01:46:26.000000000 +0000 +++ cinder-12.0.7/cinder/tests/unit/backup/drivers/test_backup_nfs.py 2019-05-09 15:42:57.000000000 +0000 @@ -119,6 +119,7 @@ if file_gid != FAKE_EGID: mock_execute_calls.append( mock.call('chgrp', + '-R', FAKE_EGID, path, root_helper=driver._root_helper, @@ -127,6 +128,7 @@ if not (file_mode & stat.S_IWGRP): mock_execute_calls.append( mock.call('chmod', + '-R', 'g+w', path, root_helper=driver._root_helper, diff -Nru cinder-12.0.5/cinder/tests/unit/group/test_groups_api.py cinder-12.0.7/cinder/tests/unit/group/test_groups_api.py --- cinder-12.0.5/cinder/tests/unit/group/test_groups_api.py 2019-01-29 01:46:26.000000000 +0000 +++ cinder-12.0.7/cinder/tests/unit/group/test_groups_api.py 2019-05-09 15:42:57.000000000 +0000 @@ -764,3 +764,83 @@ self.assertRaises(exception.InvalidInput, group_api.delete_group_snapshot, self.ctxt, gsnap) + + @mock.patch('cinder.volume.volume_types.get_volume_type_qos_specs', + return_value={'qos_specs': {}}) + @mock.patch('cinder.scheduler.rpcapi.SchedulerAPI.create_group') + def test_cast_create_group(self, + mock_create_group, + mock_get_volume_type_qos_specs): + vol_type = utils.create_volume_type(self.ctxt, name='test_vol_type') + encryption_key_id = mock.sentinel.encryption_key_id + description = mock.sentinel.description + name = mock.sentinel.name + req_spec = {'volume_type': vol_type, + 'encryption_key_id': encryption_key_id, + 'description': description, + 'name': name} + + grp_name = "test_group" + grp_description = "this is a test group" + grp_spec = {'name': grp_name, + 'description': grp_description} + + grp = utils.create_group(self.ctxt, + group_type_id=fake.GROUP_TYPE_ID, + volume_type_ids=[vol_type.id], + availability_zone='nova') + + grp_filter_properties = mock.sentinel.group_filter_properties + filter_properties_list = mock.sentinel.filter_properties_list + self.group_api._cast_create_group(self.ctxt, + grp, + grp_spec, + [req_spec], + grp_filter_properties, + filter_properties_list) + + mock_get_volume_type_qos_specs.assert_called_once_with(vol_type.id) + + exp_vol_properties = { + 'size': 0, + 'user_id': self.ctxt.user_id, + 'project_id': self.ctxt.project_id, + 'status': 'creating', + 'attach_status': 'detached', + 'encryption_key_id': encryption_key_id, + 'display_description': description, + 'display_name': name, + 'volume_type_id': vol_type.id, + 'group_type_id': grp.group_type_id, + 'availability_zone': grp.availability_zone + } + exp_req_spec = { + 'volume_type': vol_type, + 'encryption_key_id': encryption_key_id, + 'description': description, + 'name': name, + 'volume_properties': exp_vol_properties, + 'qos_specs': None + } + exp_grp_properties = { + 'size': 0, + 'user_id': self.ctxt.user_id, + 'project_id': self.ctxt.project_id, + 'status': 'creating', + 'display_description': grp_description, + 'display_name': grp_name, + 'group_type_id': grp.group_type_id, + } + exp_grp_spec = { + 'name': grp_name, + 'description': grp_description, + 'volume_properties': exp_grp_properties, + 'qos_specs': None + } + mock_create_group.assert_called_once_with( + self.ctxt, + grp, + group_spec=exp_grp_spec, + request_spec_list=[exp_req_spec], + group_filter_properties=grp_filter_properties, + filter_properties_list=filter_properties_list) diff -Nru cinder-12.0.5/cinder/tests/unit/objects/test_snapshot.py cinder-12.0.7/cinder/tests/unit/objects/test_snapshot.py --- cinder-12.0.5/cinder/tests/unit/objects/test_snapshot.py 2019-01-29 01:46:16.000000000 +0000 +++ cinder-12.0.7/cinder/tests/unit/objects/test_snapshot.py 2019-05-09 15:42:49.000000000 +0000 @@ -167,6 +167,7 @@ self.assertEqual(volume, snapshot.volume) volume_get_by_id.assert_called_once_with(self.context, snapshot.volume_id) + self.assertEqual(snapshot.metadata, {}) # Test cgsnapshot lazy-loaded field cgsnapshot = objects.CGSnapshot(context=self.context, id=fake.CGSNAPSHOT_ID) diff -Nru cinder-12.0.5/cinder/tests/unit/test_volume_types.py cinder-12.0.7/cinder/tests/unit/test_volume_types.py --- cinder-12.0.5/cinder/tests/unit/test_volume_types.py 2019-01-29 01:46:26.000000000 +0000 +++ cinder-12.0.7/cinder/tests/unit/test_volume_types.py 2019-05-09 15:42:57.000000000 +0000 @@ -46,6 +46,25 @@ visible="True") self.vol_type1_description = self.vol_type1_name + '_desc' + def test_volume_type_destroy_with_encryption(self): + volume_type = volume_types.create(self.ctxt, "type1") + volume_type_id = volume_type.get('id') + + encryption = { + 'control_location': 'front-end', + 'provider': 'fake_provider', + } + db_api.volume_type_encryption_create(self.ctxt, volume_type_id, + encryption) + ret = volume_types.get_volume_type_encryption(self.ctxt, + volume_type_id) + self.assertIsNotNone(ret) + + volume_types.destroy(self.ctxt, volume_type_id) + ret = volume_types.get_volume_type_encryption(self.ctxt, + volume_type_id) + self.assertIsNone(ret) + def test_volume_type_create_then_destroy(self): """Ensure volume types can be created and deleted.""" project_id = fake.PROJECT_ID diff -Nru cinder-12.0.5/cinder/tests/unit/volume/drivers/dell_emc/vnx/mocked_vnx.yaml cinder-12.0.7/cinder/tests/unit/volume/drivers/dell_emc/vnx/mocked_vnx.yaml --- cinder-12.0.5/cinder/tests/unit/volume/drivers/dell_emc/vnx/mocked_vnx.yaml 2019-01-29 01:46:26.000000000 +0000 +++ cinder-12.0.7/cinder/tests/unit/volume/drivers/dell_emc/vnx/mocked_vnx.yaml 2019-05-09 15:42:57.000000000 +0000 @@ -2052,6 +2052,8 @@ delete: disconnect_host: get_alu_hlu_map: {} + update: + with_poll: _context test_terminate_connection_cleanup_sg_absent: sg: @@ -2065,9 +2067,11 @@ delete: disconnect_host: get_alu_hlu_map: {} + update: + with_poll: _context vnx: _methods: - remove_hba: + delete_hba: test_terminate_connection_cleanup_sg_is_not_empty: sg: diff -Nru cinder-12.0.5/cinder/tests/unit/volume/drivers/dell_emc/vnx/test_adapter.py cinder-12.0.7/cinder/tests/unit/volume/drivers/dell_emc/vnx/test_adapter.py --- cinder-12.0.5/cinder/tests/unit/volume/drivers/dell_emc/vnx/test_adapter.py 2019-01-29 01:46:26.000000000 +0000 +++ cinder-12.0.7/cinder/tests/unit/volume/drivers/dell_emc/vnx/test_adapter.py 2019-05-09 15:42:57.000000000 +0000 @@ -994,9 +994,9 @@ host = common.Host('fake_host', ['fake_initiator1', 'fake_initiator2']) sg = mocked_res['sg'] common_adapter.terminate_connection_cleanup(host, sg) - common_adapter.client.vnx.remove_hba.assert_any_call( + common_adapter.client.vnx.delete_hba.assert_any_call( 'fake_initiator1') - common_adapter.client.vnx.remove_hba.assert_any_call( + common_adapter.client.vnx.delete_hba.assert_any_call( 'fake_initiator2') @res_mock.patch_common_adapter diff -Nru cinder-12.0.5/cinder/tests/unit/volume/drivers/test_remotefs.py cinder-12.0.7/cinder/tests/unit/volume/drivers/test_remotefs.py --- cinder-12.0.5/cinder/tests/unit/volume/drivers/test_remotefs.py 2019-01-29 01:46:26.000000000 +0000 +++ cinder-12.0.7/cinder/tests/unit/volume/drivers/test_remotefs.py 2019-05-09 15:42:57.000000000 +0000 @@ -102,7 +102,6 @@ self._driver._write_info_file = mock.Mock() self._driver._img_commit = mock.Mock() self._driver._rebase_img = mock.Mock() - self._driver._ensure_share_writable = mock.Mock() self._driver._delete_stale_snapshot = mock.Mock() self._driver._delete_snapshot_online = mock.Mock() @@ -615,6 +614,48 @@ 'count=1024', run_as_root=True) + @ddt.data({}, + {'info_file_exists': True}, + {'os_name': 'nt'}) + @ddt.unpack + @mock.patch('json.dump') + @mock.patch('cinder.volume.drivers.remotefs.open') + @mock.patch('os.path.exists') + def test_write_info_file(self, + mock_os_path_exists, + mock_open, + mock_json_dump, + info_file_exists=False, + os_name='posix'): + + mock_os_path_exists.return_value = info_file_exists + fake_info_path = '/path/to/info' + fake_snapshot_info = {'active': self._fake_snapshot_path} + self._driver._execute = mock.Mock() + self._driver._set_rw_permissions = mock.Mock() + + self._driver._write_info_file(fake_info_path, fake_snapshot_info) + + mock_open.assert_called_once_with(fake_info_path, 'w') + mock_json_dump.assert_called_once_with( + fake_snapshot_info, mock.ANY, indent=1, sort_keys=True) + + if info_file_exists or os.name == 'nt': + self._driver._execute.assert_not_called() + self._driver._set_rw_permissions.assert_not_called() + else: + self._driver._execute.assert_called_once_with( + 'truncate', "-s0", fake_info_path, + run_as_root=self._driver._execute_as_root) + self._driver._set_rw_permissions.assert_called_once_with( + fake_info_path) + + fake_snapshot_info.pop('active') + self.assertRaises(exception.RemoteFSException, + self._driver._write_info_file, + fake_info_path, + fake_snapshot_info) + class RemoteFSPoolMixinTestCase(test.TestCase): def setUp(self): diff -Nru cinder-12.0.5/cinder/tests/unit/volume/flows/test_manage_volume_flow.py cinder-12.0.7/cinder/tests/unit/volume/flows/test_manage_volume_flow.py --- cinder-12.0.5/cinder/tests/unit/volume/flows/test_manage_volume_flow.py 2019-01-29 01:46:26.000000000 +0000 +++ cinder-12.0.7/cinder/tests/unit/volume/flows/test_manage_volume_flow.py 2019-05-09 15:42:57.000000000 +0000 @@ -38,7 +38,7 @@ self.counter = float(0) def test_cast_manage_existing(self): - volume = fake_volume.fake_volume_type_obj(self.ctxt) + volume = fake_volume.fake_volume_obj(self.ctxt) spec = { 'name': 'name', @@ -62,6 +62,28 @@ create_what.pop('volume_id') task.execute(self.ctxt, **create_what) + def test_create_db_entry_task_with_multiattach(self): + + fake_volume_type = fake_volume.fake_volume_type_obj( + self.ctxt, extra_specs={'multiattach': ' True'}) + + spec = { + 'name': 'name', + 'description': 'description', + 'host': 'host', + 'ref': 'ref', + 'volume_type': fake_volume_type, + 'metadata': {}, + 'availability_zone': 'availability_zone', + 'bootable': 'bootable', + 'volume_type_id': fake_volume_type.id, + 'cluster_name': 'fake_cluster' + } + task = manage_existing.EntryCreateTask(fake_volume_api.FakeDb()) + + result = task.execute(self.ctxt, **spec) + self.assertTrue(result['volume_properties']['multiattach']) + @staticmethod def _stub_volume_object_get(self): volume = { diff -Nru cinder-12.0.5/cinder/tests/unit/volume/test_volume_migration.py cinder-12.0.7/cinder/tests/unit/volume/test_volume_migration.py --- cinder-12.0.5/cinder/tests/unit/volume/test_volume_migration.py 2019-01-29 01:46:26.000000000 +0000 +++ cinder-12.0.7/cinder/tests/unit/volume/test_volume_migration.py 2019-05-09 15:42:57.000000000 +0000 @@ -642,7 +642,7 @@ attachment['instance_uuid'], attachment['attached_host'], attachment['mountpoint'], - 'rw' + attachment.get('attach_mode', 'rw'), ) self.assertIsNotNone(attachments) self.assertEqual(attached_host, diff -Nru cinder-12.0.5/cinder/tests/unit/volume/test_volume_retype.py cinder-12.0.7/cinder/tests/unit/volume/test_volume_retype.py --- cinder-12.0.5/cinder/tests/unit/volume/test_volume_retype.py 2019-01-29 01:46:26.000000000 +0000 +++ cinder-12.0.7/cinder/tests/unit/volume/test_volume_retype.py 2019-05-09 15:42:57.000000000 +0000 @@ -21,6 +21,7 @@ from cinder.policies import volumes as volume_policies from cinder import quota from cinder.tests.unit import fake_constants as fake +from cinder.tests.unit import utils as tests_utils from cinder.tests.unit import volume as base from cinder.volume import volume_types @@ -41,10 +42,6 @@ project_id=fake.PROJECT_ID) volume_types.create(self.context, - "old-type", - {}, - description="test-multiattach") - volume_types.create(self.context, "fake_vol_type", {}, description="fake_type") @@ -52,16 +49,25 @@ "multiattach-type", {'multiattach': " True"}, description="test-multiattach") + volume_types.create(self.context, + "multiattach-type2", + {'multiattach': " True"}, + description="test-multiattach") self.default_vol_type = objects.VolumeType.get_by_name_or_id( self.context, 'fake_vol_type') self.multiattach_type = objects.VolumeType.get_by_name_or_id( self.context, 'multiattach-type') + self.multiattach_type2 = objects.VolumeType.get_by_name_or_id( + self.context, + 'multiattach-type2') def fake_get_vtype(self, context, identifier): if identifier == "multiattach-type": return self.multiattach_type + elif identifier == 'multiattach-type2': + return self.multiattach_type2 else: return self.default_vol_type @@ -97,7 +103,7 @@ vol.save() self.volume_api.retype(self.user_context, vol, - 'fake_vol-type') + 'fake_vol_type') vol = objects.Volume.get_by_id(self.context, vol.id) self.assertFalse(vol.multiattach) @@ -120,3 +126,23 @@ mock.call(vol_action_policies.RETYPE_POLICY, target_obj=mock.ANY), mock.call(vol_action_policies.RETYPE_POLICY, target_obj=mock.ANY), ]) + + @mock.patch('cinder.context.RequestContext.authorize') + def test_multiattach_to_multiattach_retype(self, mock_authorize): + # Test going from multiattach to multiattach + + vol = tests_utils.create_volume(self.context, + multiattach=True, + volume_type_id= + self.multiattach_type.id) + + self.assertTrue(vol.multiattach) + self.volume_api.retype(self.user_context, + vol, + 'multiattach-type2') + vol.refresh() + self.assertTrue(vol.multiattach) + + mock_authorize.assert_has_calls( + [mock.call(vol_action_policies.RETYPE_POLICY, target_obj=mock.ANY) + ]) diff -Nru cinder-12.0.5/cinder/tests/unit/zonemanager/test_brcd_http_fc_zone_client.py cinder-12.0.7/cinder/tests/unit/zonemanager/test_brcd_http_fc_zone_client.py --- cinder-12.0.5/cinder/tests/unit/zonemanager/test_brcd_http_fc_zone_client.py 2019-01-29 01:46:17.000000000 +0000 +++ cinder-12.0.7/cinder/tests/unit/zonemanager/test_brcd_http_fc_zone_client.py 2019-05-09 15:42:50.000000000 +0000 @@ -47,6 +47,7 @@ ifas = {} parsed_raw_zoneinfo = "" random_no = '' +auth_version = '' session = None active_cfg = 'openstack_cfg' activate = True @@ -62,15 +63,14 @@
---BEGIN NS INFO
-
-2;8;020800;N    ;10:00:00:05:1e:7c:64:96;20:00:00:05:1e:7c:64:96;[89]""" \
-"""Brocade-825 | 3.0.4.09 | DCM-X3650-94 | Microsoft Windows Server 2003 R2"""\
-    """| Service Pack 2";FCP ;      3;20:08:00:05:1e:89:54:a0;"""\
-    """0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0;000000;port8"""\
-    """
---END NS INFO
-
+--BEGIN DEVICEPORT 10:00:00:05:1e:7c:64:96
+node.wwn=20:00:00:05:1e:7c:64:96
+deviceport.portnum=9
+deviceport.portid=300900
+deviceport.portIndex=9
+deviceport.porttype=N
+deviceport.portwwn=10:00:00:05:1e:7c:64:96
+--END DEVICEPORT 10:00:00:05:1e:7c:64:96
 
@@ -472,6 +472,7 @@ self.ifas = {} self.parsed_raw_zoneinfo = "" self.random_no = '' + self.auth_version = '' self.session = None super(TestBrcdHttpFCZoneClient, self).setUp() diff -Nru cinder-12.0.5/cinder/volume/api.py cinder-12.0.7/cinder/volume/api.py --- cinder-12.0.5/cinder/volume/api.py 2019-01-29 01:46:26.000000000 +0000 +++ cinder-12.0.7/cinder/volume/api.py 2019-05-09 15:42:57.000000000 +0000 @@ -44,6 +44,7 @@ from cinder import objects from cinder.objects import base as objects_base from cinder.objects import fields +from cinder.objects import volume_type from cinder.policies import attachments as attachment_policy from cinder.policies import services as svr_policy from cinder.policies import snapshot_metadata as s_meta_policy @@ -1619,7 +1620,8 @@ # Support specifying volume type by ID or name try: new_type = ( - volume_types.get_by_name_or_id(context.elevated(), new_type)) + volume_type.VolumeType.get_by_name_or_id(context.elevated(), + new_type)) except exception.InvalidVolumeType: msg = _('Invalid volume_type passed: %s.') % new_type LOG.error(msg) @@ -2116,6 +2118,15 @@ """Create an attachment record for the specified volume.""" ctxt.authorize(attachment_policy.CREATE_POLICY, target_obj=volume_ref) connection_info = {} + if "error" in volume_ref.status: + msg = ('Volume attachments can not be created if the volume ' + 'is in an error state. ' + 'The Volume %(volume_id)s currently has a status of: ' + '%(volume_status)s ') % { + 'volume_id': volume_ref.id, + 'volume_status': volume_ref.status} + LOG.error(msg) + raise exception.InvalidVolume(reason=msg) attachment_ref = self._attachment_reserve(ctxt, volume_ref, instance_uuid) @@ -2147,6 +2158,14 @@ ctxt.authorize(attachment_policy.UPDATE_POLICY, target_obj=attachment_ref) volume_ref = objects.Volume.get_by_id(ctxt, attachment_ref.volume_id) + if "error" in volume_ref.status: + msg = ('Volume attachments can not be updated if the volume ' + 'is in an error state. The Volume %(volume_id)s ' + 'currently has a status of: %(volume_status)s ') % { + 'volume_id': volume_ref.id, + 'volume_status': volume_ref.status} + LOG.error(msg) + raise exception.InvalidVolume(reason=msg) connection_info = ( self.volume_rpcapi.attachment_update(ctxt, volume_ref, diff -Nru cinder-12.0.5/cinder/volume/drivers/dell_emc/vnx/adapter.py cinder-12.0.7/cinder/volume/drivers/dell_emc/vnx/adapter.py --- cinder-12.0.5/cinder/volume/drivers/dell_emc/vnx/adapter.py 2019-01-29 01:46:26.000000000 +0000 +++ cinder-12.0.7/cinder/volume/drivers/dell_emc/vnx/adapter.py 2019-05-09 15:42:57.000000000 +0000 @@ -1083,6 +1083,11 @@ LOG.info("Storage Group %s is empty.", sg.name) sg.disconnect_host(sg.name) sg.delete() + + # Update sg with poll makes the one in client.sg_cache is with + # latest status which is un-exist. This makes sure the sg is + # created during next attaching. + self.update_storage_group_if_required(sg) if host is not None and self.itor_auto_dereg: # `host` is None when force-detach self._deregister_initiator(host) diff -Nru cinder-12.0.5/cinder/volume/drivers/dell_emc/vnx/client.py cinder-12.0.7/cinder/volume/drivers/dell_emc/vnx/client.py --- cinder-12.0.5/cinder/volume/drivers/dell_emc/vnx/client.py 2019-01-29 01:46:26.000000000 +0000 +++ cinder-12.0.7/cinder/volume/drivers/dell_emc/vnx/client.py 2019-05-09 15:42:57.000000000 +0000 @@ -535,7 +535,10 @@ if not isinstance(initiators, list): initiators = [initiators] for initiator_uid in initiators: - self.vnx.remove_hba(initiator_uid) + try: + self.vnx.delete_hba(initiator_uid) + except AttributeError: + self.vnx.remove_hba(initiator_uid) def update_consistencygroup(self, cg, lun_ids_to_add, lun_ids_to_remove): lun_ids_in_cg = (set([l.lun_id for l in cg.lun_list]) if cg.lun_list diff -Nru cinder-12.0.5/cinder/volume/drivers/dell_emc/vnx/driver.py cinder-12.0.7/cinder/volume/drivers/dell_emc/vnx/driver.py --- cinder-12.0.5/cinder/volume/drivers/dell_emc/vnx/driver.py 2019-01-29 01:46:26.000000000 +0000 +++ cinder-12.0.7/cinder/volume/drivers/dell_emc/vnx/driver.py 2019-05-09 15:42:57.000000000 +0000 @@ -78,9 +78,12 @@ 10.2.0 - Add replication group support 11.0.0 - Fix failure of migration during cloning 11.0.1 - Fix perf issue when create/delete volume + 11.0.2 - Fix bug https://bugs.launchpad.net/cinder/+bug/1817385 to + make sure sg can be created again after it was destroyed + under `destroy_empty_stroage_group` setting to `True` """ - VERSION = '11.00.01' + VERSION = '11.00.02' VENDOR = 'Dell EMC' # ThirdPartySystems wiki page CI_WIKI_NAME = "EMC_VNX_CI" diff -Nru cinder-12.0.5/cinder/volume/drivers/dothill/dothill_client.py cinder-12.0.7/cinder/volume/drivers/dothill/dothill_client.py --- cinder-12.0.5/cinder/volume/drivers/dothill/dothill_client.py 2019-01-29 01:46:17.000000000 +0000 +++ cinder-12.0.7/cinder/volume/drivers/dothill/dothill_client.py 2019-05-09 15:42:50.000000000 +0000 @@ -56,10 +56,12 @@ self._session_key = None try: tree = etree.XML(xml) - if (tree.findtext(".//PROPERTY[@name='response-type']") == - "success"): - self._session_key = ( - tree.findtext(".//PROPERTY[@name='response']")) + # The 'return-code' property is not valid in this context, so we + # we check value of 'response-type-numeric' (0 => Success) + rtn = tree.findtext(".//PROPERTY[@name='response-type-numeric']") + session_key = tree.findtext(".//PROPERTY[@name='response']") + if rtn == '0': + self._session_key = session_key except Exception as e: msg = _("Cannot parse session key: %s") % e.msg raise exception.DotHillConnectionError(message=msg) diff -Nru cinder-12.0.5/cinder/volume/drivers/remotefs.py cinder-12.0.7/cinder/volume/drivers/remotefs.py --- cinder-12.0.5/cinder/volume/drivers/remotefs.py 2019-01-29 01:46:26.000000000 +0000 +++ cinder-12.0.7/cinder/volume/drivers/remotefs.py 2019-05-09 15:42:57.000000000 +0000 @@ -23,7 +23,6 @@ import os import re import shutil -import tempfile import time from oslo_config import cfg @@ -740,6 +739,13 @@ msg = _("'active' must be present when writing snap_info.") raise exception.RemoteFSException(msg) + if not (os.path.exists(info_path) or os.name == 'nt'): + # We're not managing file permissions on Windows. + # Plus, 'truncate' is not available. + self._execute('truncate', "-s0", info_path, + run_as_root=self._execute_as_root) + self._set_rw_permissions(info_path) + with open(info_path, 'w') as f: json.dump(snap_info, f, indent=1, sort_keys=True) @@ -909,26 +915,6 @@ def _get_mount_point_base(self): return self.base - def _ensure_share_writable(self, path): - """Ensure that the Cinder user can write to the share. - - If not, raise an exception. - - :param path: path to test - :raises: RemoteFSException - :returns: None - """ - - prefix = '.cinder-write-test-' + str(os.getpid()) + '-' - - try: - tempfile.NamedTemporaryFile(prefix=prefix, dir=path) - except OSError: - msg = _('Share at %(dir)s is not writable by the ' - 'Cinder volume service. Snapshot operations will not be ' - 'supported.') % {'dir': path} - raise exception.RemoteFSException(msg) - def _copy_volume_to_image(self, context, volume, image_service, image_meta): """Copy the volume to the specified image.""" @@ -1096,7 +1082,6 @@ self._validate_state(volume_status, acceptable_states) vol_path = self._local_volume_dir(snapshot.volume) - self._ensure_share_writable(vol_path) # Determine the true snapshot file for this snapshot # based on the .info file diff -Nru cinder-12.0.5/cinder/volume/flows/api/manage_existing.py cinder-12.0.7/cinder/volume/flows/api/manage_existing.py --- cinder-12.0.5/cinder/volume/flows/api/manage_existing.py 2019-01-29 01:46:26.000000000 +0000 +++ cinder-12.0.7/cinder/volume/flows/api/manage_existing.py 2019-05-09 15:42:50.000000000 +0000 @@ -53,6 +53,11 @@ volume_type = kwargs.pop('volume_type') volume_type_id = volume_type['id'] if volume_type else None + multiattach = False + if volume_type and volume_type.get('extra_specs'): + multiattach = volume_type['extra_specs'].get( + 'multiattach', '') == ' True' + volume_properties = { 'size': 0, 'user_id': context.user_id, @@ -68,6 +73,7 @@ 'volume_type_id': volume_type_id, 'metadata': kwargs.pop('metadata') or {}, 'bootable': kwargs.pop('bootable'), + 'multiattach': multiattach, } volume = objects.Volume(context=context, **volume_properties) diff -Nru cinder-12.0.5/cinder/volume/manager.py cinder-12.0.7/cinder/volume/manager.py --- cinder-12.0.5/cinder/volume/manager.py 2019-01-29 01:46:26.000000000 +0000 +++ cinder-12.0.7/cinder/volume/manager.py 2019-05-09 15:42:57.000000000 +0000 @@ -2338,7 +2338,7 @@ attachment.instance_uuid, attachment.attached_host, attachment.mountpoint, - 'rw') + attachment.attach_mode or 'rw') # At this point we now have done almost all of our swapping and # state-changes. The target volume is now marked back to # "in-use" the destination/worker volume is now in deleting diff -Nru cinder-12.0.5/cinder/zonemanager/drivers/brocade/brcd_http_fc_zone_client.py cinder-12.0.7/cinder/zonemanager/drivers/brocade/brcd_http_fc_zone_client.py --- cinder-12.0.5/cinder/zonemanager/drivers/brocade/brcd_http_fc_zone_client.py 2019-01-29 01:46:17.000000000 +0000 +++ cinder-12.0.7/cinder/zonemanager/drivers/brocade/brcd_http_fc_zone_client.py 2019-05-09 15:42:57.000000000 +0000 @@ -62,6 +62,7 @@ self.active_cfg = '' self.parsed_raw_zoneinfo = "" self.random_no = '' + self.auth_version = '' self.session = None # Create and assign the authentication header based on the credentials @@ -98,7 +99,7 @@ adapter = requests.adapters.HTTPAdapter(pool_connections=1, pool_maxsize=1) self.session.mount(protocol + '://', adapter) - url = protocol + "://" + self.switch_ip + requestURL + url = '%s://%s%s' % (protocol, self.switch_ip, requestURL) response = None if requestType == zone_constant.GET_METHOD: response = self.session.get(url, @@ -154,12 +155,19 @@ zone_constant.SECINFO_BEGIN, zone_constant.SECINFO_END) - # Extract the random no from secinfo.html response - self.random_no = self.get_nvp_value(parsed_data, - zone_constant.RANDOM) - # Form the authentication string - auth_string = (self.switch_user + ":" + self.switch_pwd + - ":" + self.random_no) + # Get the auth version for 8.1.0b+ switches + self.auth_version = self.get_nvp_value(parsed_data, + zone_constant.AUTHVERSION) + + if self.auth_version == "1": + # Extract the random no from secinfo.html response + self.random_no = self.get_nvp_value(parsed_data, + zone_constant.RANDOM) + # Form the authentication string + auth_string = '%s:%s:%s' % (self.switch_user, self.switch_pwd, + self.random_no) + else: + auth_string = '%s:%s' % (self.switch_user, self.switch_pwd) auth_token = base64.encode_as_text(auth_string).strip() auth_header = (zone_constant.AUTH_STRING + auth_token) # Build the proper header @@ -191,9 +199,14 @@ isauthenticated = self.get_nvp_value( parsed_data, zone_constant.AUTHENTICATED) if isauthenticated == "yes": - # Replace password in the authentication string with xxx - auth_string = (self.switch_user + - ":" + "xxx" + ":" + self.random_no) + if self.auth_version == "3": + auth_id = self.get_nvp_value(parsed_data, + zone_constant.IDENTIFIER) + auth_string = '%s:xxx:%s' % (self.switch_user, auth_id) + else: + # Replace password in the authentication string with xxx + auth_string = '%s:xxx:%s' % (self.switch_user, + self.random_no) auth_token = base64.encode_as_text(auth_string).strip() auth_header = zone_constant.AUTH_STRING + auth_token return True, auth_header @@ -763,15 +776,9 @@ response = self.connect(zone_constant.GET_METHOD, zone_constant.NS_PAGE, header=headers) # GET request to nsinfo.html - parsed_raw_zoneinfo = self.get_parsed_data( - response, - zone_constant.NSINFO_BEGIN, - zone_constant.NSINFO_END).strip("\t\n\r") - # build the name server information in the correct format - for line in parsed_raw_zoneinfo.splitlines(): - start_index = line.find(zone_constant.NS_DELIM) + 7 - if start_index != -1: - nsinfo.extend([line[start_index:start_index + 23].strip()]) + for line in response.splitlines(): + if line.startswith(zone_constant.NS_DELIM): + nsinfo.append(line.split('=')[-1]) return nsinfo def delete_zones_cfgs( diff -Nru cinder-12.0.5/cinder/zonemanager/drivers/brocade/fc_zone_constants.py cinder-12.0.7/cinder/zonemanager/drivers/brocade/fc_zone_constants.py --- cinder-12.0.5/cinder/zonemanager/drivers/brocade/fc_zone_constants.py 2019-01-29 01:46:17.000000000 +0000 +++ cinder-12.0.7/cinder/zonemanager/drivers/brocade/fc_zone_constants.py 2019-05-09 15:42:57.000000000 +0000 @@ -58,6 +58,8 @@ SECINFO_BEGIN = "--BEGIN SECINFO" SECINFO_END = "--END SECINFO" RANDOM = "RANDOM" +AUTHVERSION = "AUTHVERSION" +IDENTIFIER = "Identifier" AUTH_STRING = "Custom_Basic " # Trailing space is required, do not remove AUTHEN_BEGIN = "--BEGIN AUTHENTICATE" AUTHEN_END = "--END AUTHENTICATE" @@ -86,10 +88,8 @@ IFA_DELIM = "\x06" ACTIVE_CFG_DELIM = "\x07" DEFAULT_CFG = "d__efault__Cfg" -NS_PAGE = "/nsinfo.htm" -NSINFO_BEGIN = "--BEGIN NS INFO" -NSINFO_END = "--END NS INFO" -NS_DELIM = ";N ;" +NS_PAGE = "/nsinfo.htm?format=1&type=all" +NS_DELIM = "deviceport.portwwn=" ZONE_TX_BEGIN = "--BEGIN ZONE_TXN_INFO" ZONE_TX_END = "--END ZONE_TXN_INFO" ZONE_ERROR_CODE = "errorCode" diff -Nru cinder-12.0.5/cinder.egg-info/pbr.json cinder-12.0.7/cinder.egg-info/pbr.json --- cinder-12.0.5/cinder.egg-info/pbr.json 2019-01-29 01:48:02.000000000 +0000 +++ cinder-12.0.7/cinder.egg-info/pbr.json 2019-05-09 15:44:50.000000000 +0000 @@ -1 +1 @@ -{"git_version": "937af5b", "is_release": true} \ No newline at end of file +{"git_version": "96e093b8a", "is_release": true} \ No newline at end of file diff -Nru cinder-12.0.5/cinder.egg-info/PKG-INFO cinder-12.0.7/cinder.egg-info/PKG-INFO --- cinder-12.0.5/cinder.egg-info/PKG-INFO 2019-01-29 01:48:02.000000000 +0000 +++ cinder-12.0.7/cinder.egg-info/PKG-INFO 2019-05-09 15:44:50.000000000 +0000 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: cinder -Version: 12.0.5 +Version: 12.0.7 Summary: OpenStack Block Storage Home-page: https://docs.openstack.org/cinder/latest/ Author: OpenStack diff -Nru cinder-12.0.5/cinder.egg-info/SOURCES.txt cinder-12.0.7/cinder.egg-info/SOURCES.txt --- cinder-12.0.5/cinder.egg-info/SOURCES.txt 2019-01-29 01:48:02.000000000 +0000 +++ cinder-12.0.7/cinder.egg-info/SOURCES.txt 2019-05-09 15:44:50.000000000 +0000 @@ -1828,6 +1828,7 @@ rally-jobs/plugins/README.rst rally-jobs/plugins/__init__.py releasenotes/README.rst +releasenotes/bug-1783790-multiattach-none-when-manage-volume-yu7du8yth78i0e6b.yaml releasenotes/notes/1220b8a67602b8e7-update_rootwrap_volume_filters.yaml releasenotes/notes/3par-create-cg-from-source-cg-5634dcf9feb813f6.yaml releasenotes/notes/3par-create-fc-vlun-match-set-type-babcf2cbce1ce317.yaml @@ -1929,6 +1930,7 @@ releasenotes/notes/bug-1723226-allow-purging-0day-4de8979db7215cf3.yaml releasenotes/notes/bug-1730933-1bb0272e3c51eed3.yaml releasenotes/notes/bug-1762424-f76af2f37fe408f1.yaml +releasenotes/notes/bug-1773446-984d76ed29445c9b.yaml releasenotes/notes/bug-1775518-fix-unity-empty-list-issue-2d6b7c33aae1ffcc.yaml releasenotes/notes/bug-1790141-vmax-powermaxos-upgrade-fix-4c76186cfca66790.yaml releasenotes/notes/bug-1799221-fix-truncated-volumes-in-case-of-glance-errors-6cae19218249c3cf.yaml @@ -2345,6 +2347,7 @@ releasenotes/notes/vnx-replication-group-2ebf04c80e2171f7.yaml releasenotes/notes/vnx-replication-v2.1-4d89935547183cc9.yaml releasenotes/notes/vnx-repv2.1-config-update-cc2f60c20aec88dd.yaml +releasenotes/notes/vnx-update-sg-in-cache-3ecb673727bea79b.yaml releasenotes/notes/vnx_clone_cg-db74ee2ea71bedcb.yaml releasenotes/notes/volume-filtering-for-quoted-display-name-7f5e8ac888a73001.yaml releasenotes/notes/volumes-summary-6b2485f339c88a91.yaml diff -Nru cinder-12.0.5/debian/changelog cinder-12.0.7/debian/changelog --- cinder-12.0.5/debian/changelog 2019-03-06 09:23:08.000000000 +0000 +++ cinder-12.0.7/debian/changelog 2019-07-04 09:47:37.000000000 +0000 @@ -1,3 +1,15 @@ +cinder (2:12.0.7-0ubuntu2) bionic; urgency=medium + + * d/cinder-common.install: Install of resource_filters.json. + + -- Sahid Orentino Ferdjaoui Thu, 04 Jul 2019 11:47:37 +0200 + +cinder (2:12.0.7-0ubuntu1) bionic; urgency=medium + + * New stable point release for OpenStack Queens (LP: #1830341). + + -- Sahid Orentino Ferdjaoui Fri, 24 May 2019 10:58:33 +0200 + cinder (2:12.0.5-0ubuntu1) bionic; urgency=medium * New stable point release for OpenStack Queens (LP: #1818069). diff -Nru cinder-12.0.5/debian/cinder-common.install cinder-12.0.7/debian/cinder-common.install --- cinder-12.0.5/debian/cinder-common.install 2019-03-06 09:23:08.000000000 +0000 +++ cinder-12.0.7/debian/cinder-common.install 2019-07-04 09:47:37.000000000 +0000 @@ -7,3 +7,4 @@ usr/bin/cinder-wsgi usr/etc/cinder/api-paste.ini etc/cinder usr/etc/cinder/rootwrap.conf etc/cinder +usr/etc/cinder/resource_filters.json etc/cinder diff -Nru cinder-12.0.5/doc/source/configuration/block-storage/drivers/emc-vmax-driver.rst cinder-12.0.7/doc/source/configuration/block-storage/drivers/emc-vmax-driver.rst --- cinder-12.0.5/doc/source/configuration/block-storage/drivers/emc-vmax-driver.rst 2019-01-29 01:46:26.000000000 +0000 +++ cinder-12.0.7/doc/source/configuration/block-storage/drivers/emc-vmax-driver.rst 2019-05-09 15:42:57.000000000 +0000 @@ -14,14 +14,12 @@ .. note:: - KNOWN ISSUE: - Workload support was dropped in ucode 5978. If a VMAX All Flash array is - upgraded to 5978 or greater and existing volume types leveraged workload - e.g. DSS, DSS_REP, OLTP and OLTP_REP, attaching and detaching will no - longer work and the volume type will be unusable. Refrain from upgrading - to ucode 5978 or greater on an All Flash until a fix is merged. Please - contact your Dell EMC VMAX customer support representative if in any - doubt. + Workload support was dropped in PowerMax OS 5978. A fix has been merged to + Queens to support a PowerMax OS 5878 upgrade on a VMAX All Flash, so all + functionality on existing OpenStack Instances and Volumes created from + VMAX All Flash storage, will work as before. Please contact your OpenStack + distributor to make sure the fix has been included, before attempting an OS + upgrade of a VMAX All Flash. ``_ System requirements ~~~~~~~~~~~~~~~~~~~ diff -Nru cinder-12.0.5/doc/source/configuration/block-storage/drivers/hp-msa-driver.rst cinder-12.0.7/doc/source/configuration/block-storage/drivers/hp-msa-driver.rst --- cinder-12.0.5/doc/source/configuration/block-storage/drivers/hp-msa-driver.rst 2019-01-29 01:46:26.000000000 +0000 +++ cinder-12.0.7/doc/source/configuration/block-storage/drivers/hp-msa-driver.rst 2019-05-09 15:42:57.000000000 +0000 @@ -2,15 +2,16 @@ HP MSA Fibre Channel and iSCSI drivers ====================================== -The ``HPMSAFCDriver`` and ``HPMSAISCSIDriver`` Cinder drivers allow HP MSA -2040 or 1040 arrays to be used for Block Storage in OpenStack deployments. +The ``HPMSAFCDriver`` and ``HPMSAISCSIDriver`` Cinder drivers allow the +HPE MSA 2050, 1050, 2040, and 1040 arrays to be used for Block Storage in +OpenStack deployments. System requirements ~~~~~~~~~~~~~~~~~~~ To use the HP MSA drivers, the following are required: -- HP MSA 2040 or 1040 array with: +- HPE MSA 2050, 1050, 2040 or 1040 array with: - iSCSI or FC host interfaces - G22x firmware or later @@ -62,11 +63,13 @@ array, or a name that is shared among multiple storage pools to let the volume scheduler choose where new volumes are allocated. - * The rest of the options will be repeated for each storage pool in a given - array: the appropriate Cinder driver name; IP address or host name of the - array management interface; the username and password of an array user - account with ``manage`` privileges; and the iSCSI IP addresses for the - array if using the iSCSI transport protocol. + * The rest of the options will be repeated for each storage pool in a + given array: ``volume_driver`` specifies the Cinder driver name; + ``san_ip`` specifies the IP addresses or host names of the array's + management controllers; ``san_login`` and ``san_password`` specify + the username and password of an array user account with ``manage`` + privileges; and ``hpmsa_iscsi_ips`` specfies the iSCSI IP addresses + for the array if using the iSCSI transport protocol. In the examples below, two back ends are defined, one for pool A and one for pool B, and a common ``volume_backend_name`` is used so that a single @@ -80,7 +83,7 @@ hpmsa_backend_name = A volume_backend_name = hpmsa-array volume_driver = cinder.volume.drivers.san.hp.hpmsa_iscsi.HPMSAISCSIDriver - san_ip = 10.1.2.3 + san_ip = 10.1.2.3,10.1.2.4 san_login = manage san_password = !manage hpmsa_iscsi_ips = 10.2.3.4,10.2.3.5 @@ -89,7 +92,7 @@ hpmsa_backend_name = B volume_backend_name = hpmsa-array volume_driver = cinder.volume.drivers.san.hp.hpmsa_iscsi.HPMSAISCSIDriver - san_ip = 10.1.2.3 + san_ip = 10.1.2.3,10.1.2.4 san_login = manage san_password = !manage hpmsa_iscsi_ips = 10.2.3.4,10.2.3.5 @@ -102,7 +105,7 @@ hpmsa_backend_name = A volume_backend_name = hpmsa-array volume_driver = cinder.volume.drivers.san.hp.hpmsa_fc.HPMSAFCDriver - san_ip = 10.1.2.3 + san_ip = 10.1.2.3,10.1.2.4 san_login = manage san_password = !manage @@ -110,7 +113,7 @@ hpmsa_backend_name = B volume_backend_name = hpmsa-array volume_driver = cinder.volume.drivers.san.hp.hpmsa_fc.HPMSAFCDriver - san_ip = 10.1.2.3 + san_ip = 10.1.2.3,10.1.2.4 san_login = manage san_password = !manage diff -Nru cinder-12.0.5/doc/source/configuration/block-storage/drivers/lenovo-driver.rst cinder-12.0.7/doc/source/configuration/block-storage/drivers/lenovo-driver.rst --- cinder-12.0.5/doc/source/configuration/block-storage/drivers/lenovo-driver.rst 2019-01-29 01:46:26.000000000 +0000 +++ cinder-12.0.7/doc/source/configuration/block-storage/drivers/lenovo-driver.rst 2019-05-09 15:42:57.000000000 +0000 @@ -65,9 +65,11 @@ let the volume scheduler choose where new volumes are allocated. - The rest of the options will be repeated for each storage pool in a - given array: the appropriate Cinder driver name; IP address or - host name of the array management interface; the username and password - of an array user account with ``manage`` privileges; and the iSCSI IP + given array: ``volume_driver`` specifies the Cinder driver name; + ``san_ip`` specifies the IP addresses or host names of the array's + management controllers; ``san_login`` and ``san_password`` specify + the username and password of an array user account with ``manage`` + privileges; and ``lenovo_iscsi_ips`` specfies the iSCSI IP addresses for the array if using the iSCSI transport protocol. In the examples below, two back ends are defined, one for pool A and one diff -Nru cinder-12.0.5/PKG-INFO cinder-12.0.7/PKG-INFO --- cinder-12.0.5/PKG-INFO 2019-01-29 01:48:03.000000000 +0000 +++ cinder-12.0.7/PKG-INFO 2019-05-09 15:44:51.000000000 +0000 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: cinder -Version: 12.0.5 +Version: 12.0.7 Summary: OpenStack Block Storage Home-page: https://docs.openstack.org/cinder/latest/ Author: OpenStack diff -Nru cinder-12.0.5/playbooks/legacy/cinder-tempest-dsvm-lvm-lio-barbican/run.yaml cinder-12.0.7/playbooks/legacy/cinder-tempest-dsvm-lvm-lio-barbican/run.yaml --- cinder-12.0.5/playbooks/legacy/cinder-tempest-dsvm-lvm-lio-barbican/run.yaml 2019-01-29 01:46:26.000000000 +0000 +++ cinder-12.0.7/playbooks/legacy/cinder-tempest-dsvm-lvm-lio-barbican/run.yaml 2019-05-09 15:42:57.000000000 +0000 @@ -17,7 +17,7 @@ dest: devstack-gate EOF /usr/zuul-env/bin/zuul-cloner -m clonemap.yaml --cache-dir /opt/git \ - git://git.openstack.org \ + https://git.openstack.org \ openstack-infra/devstack-gate executable: /bin/bash chdir: '{{ ansible_user_dir }}/workspace' @@ -32,7 +32,7 @@ CINDER_ISCSI_HELPER=lioadm CINDER_LVM_TYPE=thin enable_service barbican - enable_plugin barbican git://git.openstack.org/openstack/barbican + enable_plugin barbican https://git.openstack.org/openstack/barbican EOF executable: /bin/bash diff -Nru cinder-12.0.5/releasenotes/bug-1783790-multiattach-none-when-manage-volume-yu7du8yth78i0e6b.yaml cinder-12.0.7/releasenotes/bug-1783790-multiattach-none-when-manage-volume-yu7du8yth78i0e6b.yaml --- cinder-12.0.5/releasenotes/bug-1783790-multiattach-none-when-manage-volume-yu7du8yth78i0e6b.yaml 1970-01-01 00:00:00.000000000 +0000 +++ cinder-12.0.7/releasenotes/bug-1783790-multiattach-none-when-manage-volume-yu7du8yth78i0e6b.yaml 2019-05-09 15:42:57.000000000 +0000 @@ -0,0 +1,4 @@ +--- +fixes: + - Now cinder will keep track of 'multiattach' attribute when managing + backend volumes. diff -Nru cinder-12.0.5/releasenotes/notes/bug-1773446-984d76ed29445c9b.yaml cinder-12.0.7/releasenotes/notes/bug-1773446-984d76ed29445c9b.yaml --- cinder-12.0.5/releasenotes/notes/bug-1773446-984d76ed29445c9b.yaml 1970-01-01 00:00:00.000000000 +0000 +++ cinder-12.0.7/releasenotes/notes/bug-1773446-984d76ed29445c9b.yaml 2019-05-09 15:42:50.000000000 +0000 @@ -0,0 +1,5 @@ +--- +fixes: + - | + Fixed group availability zone-backend host mismatch + [`Bug 1773446 `_]. diff -Nru cinder-12.0.5/releasenotes/notes/vnx-update-sg-in-cache-3ecb673727bea79b.yaml cinder-12.0.7/releasenotes/notes/vnx-update-sg-in-cache-3ecb673727bea79b.yaml --- cinder-12.0.5/releasenotes/notes/vnx-update-sg-in-cache-3ecb673727bea79b.yaml 1970-01-01 00:00:00.000000000 +0000 +++ cinder-12.0.7/releasenotes/notes/vnx-update-sg-in-cache-3ecb673727bea79b.yaml 2019-05-09 15:42:51.000000000 +0000 @@ -0,0 +1,7 @@ +--- +fixes: + - | + Dell EMC VNX Driver: Fixes `bug 1817385 + `__ to make sure the sg can + be created again after it was destroyed under `destroy_empty_storage_group` + setting to `True`. diff -Nru cinder-12.0.5/setup.cfg cinder-12.0.7/setup.cfg --- cinder-12.0.5/setup.cfg 2019-01-29 01:48:03.000000000 +0000 +++ cinder-12.0.7/setup.cfg 2019-05-09 15:44:51.000000000 +0000 @@ -25,6 +25,7 @@ etc/cinder = etc/cinder/api-paste.ini etc/cinder/rootwrap.conf + etc/cinder/resource_filters.json etc/cinder/rootwrap.d = etc/cinder/rootwrap.d/* packages = cinder