Receiving a 400 error on DELETEing an extent via the API

Description

Seems an issue appeared between the 11.2-U5 and 11.2-U6 that is not allowing the removable of the iSCSI extent which then will not allow the removal of the zvol. The error returned is:

Response code: 400

Response Content: {"_all_": [Warning: Target is in use"]}

You may look at our discussion on the issue at my github.com repo for the Proxmox VE plugin for FreeNAS.

https://github.com/TheGrandWazoo/freenas-proxmox/issues/51

It does seem that if the amount of extents or zvols are low (my lab just has like 2-4) I don't have an issue. But, if you have many, lets say over 16 (just a number not sure what the actual floor limit is), then the error condition occurs. We are able to remove the extent and the zvol from the UI after the condition occurs.

Now I believe there was a change to the iSCSI service not being reset/started in 11.2-U6 and I have seen some discussion in JIRA on this for the 11.3 version. Could this be the issues that we are running into?

Thanks,

KSA-TGW

Problem/Justification

None

Impact

None

SmartDraw Connector

Katalon Manual Tests (BETA)

Activity

Show:

Bug Clerk January 27, 2020 at 11:14 PM

Bug Clerk January 27, 2020 at 11:13 PM

Waqar Ahmed January 23, 2020 at 7:59 PM
Edited

so the number of targets on a FN host is high. I am not sure how much, but i suspect you won't reach that number. For maximum number of lun's please have a peek at `kern.cam.ctl.max_luns` sysctl in FreeBSD.

In coming 11.3-RELEASE, there is a force option in the API v2 which can be used to bypass this check and you can remove an extent from an active target.

Kevin Scott Adams January 17, 2020 at 11:56 AM

after I posted that comment, I went and did a PoC on changing to individual targets to individual VM"s and it seems to be working. l Was able to snapshot and revert without issues. Remove/Move disks from a VM without errors or warnings.
A few questions to help me for the future development of the plugin on the Proxmox side:

1) How many targets can there be to one FreeNAS box? Under one dataset?

2 ) Max number of LUN's per target?

I am thinking of doing a PoC of the plugin to do some automated dataset/target creations under the Parent dataset based on a VM's name, ID or a users input on the GUI.

 

Thanks for you help so far. I will be posting to my github project informing users of the new and suggested procedure.

Waqar Ahmed January 15, 2020 at 9:43 PM

I am saying that when you configure multiple extents on a target and then try removing one while the target is active, FreeNAS refuses to do that and raises an error.

Now I am not sure if we it's okay to remove an extent from a target while it's active without the target being reinitialised. I'l verify this bit, and then make PR's accordingly if required.

However, with the current FreeNAS setup, you have to ensure that you don't try removing an extent which is associated to a target. In plain words, safest scenario is one VM with one target.

Complete
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Labels

Components

Fix versions

Priority

More fields

Katalon Platform

Created December 26, 2019 at 3:56 PM
Updated July 1, 2022 at 4:46 PM
Resolved January 27, 2020 at 11:14 PM