#Bug in ONTAP /api/storage/qtrees...

1 messages · Page 1 of 1 (latest)

green nacelle
#

There's a longstanding bug in ONTAP which bothered me some time, but I seem to have narrowed it down somewhat now.

Background: I teach ONTAP RESTful API courses (https://www.flane.de/en/course/netapp-rstapi)
In the course's exercises we're supposed to create a QTree with QoS. This never works 😦

I was doing some digging with 9.14.1RC1 (local sim) and the current 9.14 Python library.

The Python documentation (even the online API one in the Sim https://192.168.xxx.yyy/docs/api/#/storage/qtree_create) states:

{
"_tags": [
"team:csi",
"environment:test"
],
"export_policy": {
"id": 100,
"name": "default"
},
"group": {
"id": "20001",
"name": "unix_group1"
},
"name": "string",
"nas": {},
** "qos_policy": {
"max_throughput_iops": 10000,
"max_throughput_mbps": 500,
"min_throughput_iops": 2000,
"min_throughput_mbps": 500,
"name": "performance",
"uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
},**
"security_style": "unix",
"svm": {
"name": "svm1",
"uuid": "02c9e252-41be-11e9-81d5-00a0986138f7"
},...

#

If you reference a correctly created pre-existing QoS Policy (in my case created in "VServer1"), the API call (or the job, if you do not wait) fails with reason "entry doesn't exist":

Aggregate Sim914_01_SSD_1 found: 7769935872 Bytes free, 10GB ( 10737418240 Bytes ) asked for 1 Aggregate(s) with 7769935872 Bytes free space found SVM 'VServer1' already exists Volume 'Vol1' already exists in SVM 'VServer1' QoS policy qos_max_1000 created successfully Qtree({'name': 'QTree1', 'qos_policy': {'name': 'qos_max_1000'}, 'svm': {'name': 'VServer1'}, 'volume': {'name': 'Vol1'}}) [2023-12-13 10:01:49,478] [ INFO] [utils:179] Job (failure): Failed to create qtree "QTree1" in volume "Vol1" Vserver "VServer1". Reason: entry doesn't exist.. Timeout remaining: 30. Error: QTree was not created: Job failed: Failed to create qtree "QTree1" in volume "Vol1" Vserver "VServer1". Reason: entry doesn't exist.

If you give no QoS Policy name, but give it straight min/max values, a QoS Policy will be created automatically, but in the wrong SVM! (svm0 in this case, which happens to contain a pre-existing QTree named "qtree1" with different capitalization)

`Sim914::> workload show
(qos workload show)
Workload Wid Policy Group Vserver Volume LUN Qtree File Path


EncTest-wid36977
36977 extreme-fixed
svm0 EncTest - - -
Test2-wid43355 43355 extreme-fixed
svm0 Test2 - - -
qtree1-wid23865
23865 svm0_auto_gen_policy_834c83ad_70f6_11ee_b9d9_000c2982f5c1
svm0 NASTest - qtree1 -

3 entries were displayed.`

#

I'll do some more troubleshooting without the similarly named "qtree1" and checking on pre-existing QoS policies in the "wrong" SVM...

Until then, please create a bug/burt (I'm just a Technical Instructor, FastLane uses quite a few NetApp systems, but I'm not authorized to create cases/bug reports)

green nacelle
#

Deleted the "svm0/NASTest/qtree1 QTree, tried creating VServer1/Vol1/QTree1 with qos_max_iops (no qos_pol name given):

No Errors, QTree created, BUT no automatic QoS policy created or attached to it

=> Inconsistent behavior
=> I'll assume the whole qtree.qos_policy tree is broken

green nacelle
#

Tried PATCHing it afterwards, but no "qos_policy" will be attached...

    qtree = Qtree.find(id=qtree["id"], )
    print("QoS UUID:  ", QoS["uuid"])
    qtree.qos_policy = {"qos_policy": QoS.to_dict()}
    qtree.patch(poll=True)
    print("QTree %s modified successfully" % qtree.name)
    print(qtree)
#

Qtree UUID: Qtree({'_links': {'self': {'href': '/api/storage/qtrees/c18119d8-913e-11ee-8a32-000c29d436d3/1'}}, 'id': 1, 'name': 'QTree1', 'svm': {'name': 'VServer1'}, 'volume': {'_links': {'self': {'href': '/api/storage/volumes/c18119d8-913e-11ee-8a32-000c29d436d3'}}, 'name': 'Vol1', 'uuid': 'c18119d8-913e-11ee-8a32-000c29d436d3'}})

QoS UUID: adf37236-94f1-11ee-8a45-000c29d436d3
[2023-12-14 16:35:50,572] [ INFO] [utils:179] Job (success): success. Timeout remaining: 30.

QTree QTree1 modified successfully

Qtree({'_links': {'self': {'href': '/api/storage/qtrees/c18119d8-913e-11ee-8a32-000c29d436d3/1'}}, 'export_policy': {'_links': {'self': {'href': '/api/protocols/nfs/export-policies/21474836481'}}, 'id': 21474836481, 'name': 'default'}, 'group': {'id': '0'}, 'id': 1, 'name': 'QTree1', 'qos_policy': {}, 'security_style': 'unix', 'svm': {'_links': {'self': {'href': '/api/svm/svms/e67856b0-913b-11ee-8a32-000c29d436d3'}}, 'name': 'VServer1', 'uuid': 'e67856b0-913b-11ee-8a32-000c29d436d3'}, 'unix_permissions': 755, 'user': {'id': '0'}, 'volume': {'_links': {'self': {'href': '/api/storage/volumes/c18119d8-913e-11ee-8a32-000c29d436d3'}}, 'name': 'Vol1', 'uuid': 'c18119d8-913e-11ee-8a32-000c29d436d3'}})

carmine night
#

Are you trying to create a qtree and assign it to existing QoS or AQOS policy?

green nacelle
#

According to the Swagger documentation you can create a QTree and assign a QoS policy to it at the same time. I've never got that one to work, not even directly from the Swagger interface ("Execute").

Assigning a QoS policy afterward works.

#

But the weirdest thing was, what I described at the top:
Creating a QTree in SVM2 (with a QoS policy), to have the policy created, BUT APPLIED to the wrong SVM (containing a QTree with (almost) the same name...