Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions api-ref/source/qos-types.inc
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ Response parameters
- name: qos_type_name
- description: qos_type_description
- specs: qos_type_specs
- created_at: created_at
- updated_at: updated_at

Response example
----------------
Expand Down Expand Up @@ -93,6 +95,8 @@ Response Parameters
- name: qos_type_name
- description: qos_type_description
- specs: qos_type_specs
- created_at: created_at
- updated_at: updated_at

Response Example
----------------
Expand Down Expand Up @@ -189,6 +193,8 @@ Response parameters
- name: qos_type_name
- description: qos_type_description
- specs: qos_type_specs
- created_at: created_at
- updated_at: updated_at

Response example
----------------
Expand Down Expand Up @@ -352,6 +358,8 @@ Response parameters
- name: qos_type_name
- description: qos_type_description
- specs: qos_type_specs
- created_at: created_at
- updated_at: updated_at

Response example
----------------
Expand Down
4 changes: 3 additions & 1 deletion api-ref/source/samples/qos-type-create-response.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
"expected_iops": 2000
},
"name": "testing",
"description": "qos type description"
"description": "qos type description",
"created_at": "2026-02-18T05:09:54.000000",
"updated_at": null
}
}
4 changes: 3 additions & 1 deletion api-ref/source/samples/qos-type-show-response.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
"expected_iops": 2000
},
"name": "testing",
"description": "qos type description"
"description": "qos type description",
"created_at": "2026-02-18T05:09:54.000000",
"updated_at": null
}
}
4 changes: 3 additions & 1 deletion api-ref/source/samples/qos-type-update-response.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
"expected_iops": 2000
},
"name": "testing",
"description": "qos type description2"
"description": "qos type description2",
"created_at": "2026-02-18T05:09:54.000000",
"updated_at": "2026-02-18T06:12:33.000000"
}
}
8 changes: 6 additions & 2 deletions api-ref/source/samples/qos-types-list-response.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
"expected_iops": 2000
},
"name": "testing",
"description": "qos type description"
"description": "qos type description",
"created_at": "2026-02-18T05:09:54.000000",
"updated_at": null
},
{
"id": "2fa1342b-de9d-4d89-bdc8-af67795c0e52",
Expand All @@ -18,7 +20,9 @@
"expected_iops": 1000
},
"name": "testing2",
"description": "qos type description2"
"description": "qos type description2",
"created_at": "2026-02-18T05:10:12.000000",
"updated_at": null
}
]
}
1 change: 1 addition & 0 deletions devstack/upgrade/shutdown.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ source $BASE_DEVSTACK_DIR/stackrc # needed for status directory

# Locate the manila plugin and get its functions
MANILA_DEVSTACK_DIR=$(dirname $(dirname $0))
source $MANILA_DEVSTACK_DIR/settings
source $MANILA_DEVSTACK_DIR/plugin.sh

set -o xtrace
Expand Down
9 changes: 6 additions & 3 deletions manila/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ def __init__(self, user_id=None, project_id=None, is_admin=None,
kwargs.setdefault('user_id', user_id)
kwargs.setdefault('project_id', project_id)

super().__init__(is_admin=is_admin, **kwargs)

self.project_name = project_name
# _read_deleted must exist before super().__init__() because the
# parent class may access the read_deleted, remote_address, timestamp,
# quota_class, service_catalog property during init.
self.read_deleted = read_deleted
self.remote_address = remote_address
if not timestamp:
Expand All @@ -68,6 +68,9 @@ def __init__(self, user_id=None, project_id=None, is_admin=None,
else:
self.service_catalog = []

super().__init__(is_admin=is_admin, **kwargs)

self.project_name = project_name
if self.is_admin is None:
self.is_admin = policy.check_is_admin(self)
elif self.is_admin and 'admin' not in self.roles:
Expand Down
2 changes: 1 addition & 1 deletion manila/share/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2051,7 +2051,7 @@ def migration_start(
raise exception.InvalidInput(reason=msg)
self._modify_quotas_for_share_migration(context, share,
new_share_type)
qos_type = share_type.get('extra_specs').get(
qos_type = share_type.get('extra_specs', {}).get(
constants.ExtraSpecs.DEFAULT_QOS_TYPE)
if qos_type:
qos_db = self.db.qos_type_get_by_name_or_id(context, qos_type)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,12 @@ def setup_server_with_lock():
raise

if metadata.get('encryption_key_ref'):
self._create_barbican_kms_config_for_specified_vserver(
vserver_name, metadata)
try:
self._create_barbican_kms_config_for_specified_vserver(
vserver_name, metadata)
except Exception as e:
e.detail_data = {'server_details': server_details}
raise

return server_details
return setup_server_with_lock()
Expand Down
2 changes: 2 additions & 0 deletions manila/tests/api/v2/test_qos_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ def stub_qos_type(id):
'name': name,
'description': description,
'specs': specs,
'created_at': '2026-02-18T05:09:54.000000',
'updated_at': None,
}
return qos_type

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,56 @@ def test_setup_server_with_error(self):
}},
fake_exception.detail_data)

def test_setup_server_with_barbican_error(self):
self.library.is_nfs_config_supported = False
mock_get_vserver_name = self.mock_object(
self.library,
'_get_vserver_name',
mock.Mock(return_value=fake.VSERVER1))

mock_create_vserver = self.mock_object(
self.library, '_create_vserver')

fake_exception = exception.NetAppException("fake")
self.mock_object(
self.library,
'_create_barbican_kms_config_for_specified_vserver',
mock.Mock(side_effect=fake_exception))

mock_validate_network_type = self.mock_object(
self.library,
'_validate_network_type')

mock_validate_share_network_subnets = self.mock_object(
self.library,
'_validate_share_network_subnets')
self.mock_object(self.library, '_set_network_with_metadata')
self.library.configuration.netapp_restrict_lif_creation_per_ha_pair = (
False
)

self.assertRaises(
exception.ManilaException,
self.library.setup_server,
fake.NETWORK_INFO_LIST,
fake.SERVER_METADATA_WITH_ENCRYPTION)

ports = {}
for network_allocation in fake.NETWORK_INFO['network_allocations']:
ports[network_allocation['id']] = network_allocation['ip_address']

self.assertTrue(mock_validate_network_type.called)
self.assertTrue(mock_validate_share_network_subnets.called)
self.assertTrue(mock_get_vserver_name.called)
self.assertTrue(mock_create_vserver.called)

self.assertDictEqual(
{'server_details': {
'vserver_name': fake.VSERVER1,
'ports': jsonutils.dumps(ports),
}},
fake_exception.detail_data)

def test_setup_server_invalid_subnet(self):
invalid_subnet_exception = exception.NetworkBadConfigurationException(
reason='This is a fake message')
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
fixes:
- |
Fixed an issue in the NetApp ONTAP driver where communication failures
with Barbican prevented share servers from saving internal details
upon creation failure, blocking operators from deleting them. Manila
now properly saves these details, allowing share server deletion.
For more details, see
`Launchpad bug <https://bugs.launchpad.net/manila/+bug/2163166>`_.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
fixes:
- |
Fixed a race condition in ``manila.context.RequestContext`` where
an ``AttributeError`` occurred during object initialization.
Attributes such as ``read_deleted``, ``remote_address``, ``timestamp``,
``quota_class`` and ``service_catalog`` are now initialized before calling
the parent class constructor to ensure they are available for any early
calls to ``to_dict()`` made by the ``oslo_context``.