- When SSL redirect is enabled on TrueNAS and a change from V1 to V2
api's needs to happen then we overrun the limit of 1 on the recursion
loop. Set it to 2.
- Added some logging for TrueNAS-Scale conversion from slash (/) to dash
(-).
- When changing from slashes (/) to dashes (-), I did not provide the
global parameter so a Storage/Tank/Disks would turn out to be
Storage-Tank/Disks causing a iSCSI: Failed to connect to LUN :
iscsi_service failed with : iscsi_service_reconnect_if_loggedin. Can not
reconnect right now.
- Created conditional to parse new TrueNAS 13 version.
- Created conditional to check for a 200 and that the Content-Type is
text/html so it will change to v2.0 of the API's. This is new behavior
in TrueNAS-Core 13.
- Add the true path to the debug statement when comparing targets.
- Add patch set for ZFSPlugin.pm for Storage lib 7.1-1
- Add patch set for pvemanagerlib.js for pve-manager version 7.1-11
- Add patch set for apidoc.js for pve-docs version 7.1-2.
- Create stable-7 directory for future installs based on Proxmox major
version each modules version.
- The eval{} block was originally returning a value that would allow
execution in the $@ conditional. This changed between Proxmox 6 and 7.
Why, no idea at the moment. Also, the original HASH was no longer valid
as a variable. I don't like the code block at this moment, I need to do
some regression testing to Proxmox 5 and FreeNAS/TrueNAS 11 and 12 to
see if I can clean up the conditional block. It was there for a reason I
just don't know at this moment.
- Added a '}' at line 515.
- Fixes issues reported in #98 abd #75.
- freenas-proxmox-packer also fixed. The stable build directory somehow
was moved to the development building directory.
- Adjusted Regex to parse the current TrueNAS-SCALE product and
versioning. Also changed the FreeNAS and TrueNAS so releases will be a
variable (e.g. - U, BETA, RC, MASTER)
- Used the $product_name to change use either a slash (/) for
FreeNAS/TrueNAS-CORE and a dash (-) for FreeNAS-SCALE.
- Under a certain condition, the variable $freenas_rest_connection would
not be defined resulting in a perl ‘blessed’ error. Added logic to see
if a variable is being passed in the @_ and use it, else use
$freenas_rest_connection.
- Use caller (1)[3] instead of passing the function name through the @_.
- Just addign a 'last' statement once an extent is found. No since
looking for more after the extent is found because there is no more.
Should make plugin run a bit faster.
- When cleaning up code from last commit, I removed a line from the
run_lun_command that initialize the code thinking that the way it would
work would be throught the freenas_api_check when calling the
freenas_api_call. Well certain procedures from the Proxmox ZFSPlugin
call procedures that do not have the $freenas_api_methods variable set
yet because freenas_api_check has NOT been called yet. Inserted the
freenas_api_check() in the run_lun_command() to get the variable
initialized. Fixes#62 and other tests that I found to have this issue.
freenas-proxmox-2.0.0-0beta4 will also have the fix.
- When optimizing the code to remove the redundant calls to create a
'new' REST::Client this had a single variable to hold the instance. If
you were moving between two different servers then the variables would
not match the destination parameters of the [Free|True]NAS server.
Implemented a hashref of the construct of REST:Client with the hashref
being the IP address of the portal or API IP. Fixes#61.
- Remove some white spacing and superfluous code.
- Added some comments so I know what I was changing.
other changes.
- Add logic to freenas_api_connect to handle a '302 Found' which seems
to mean it does not handle v1.0 API's. Fixes#60.
- Add logic to freenas_api_connect to handle a '307 Temporary Redirect'
which is when the redirect http to https box is checked. Fixes#59.
- Redesign the RegEx that validates and pulls the version information
from the API system/version call. This is due to a format like
TrueNAS-12.0-BETA instead of [FreeNAS|TrueNAS]-12.0-U1.1. Also make sure
empty RegEx return variables are zero (0) so the version number that is
formulated is correct (e.g. 12000000, 11030302). Fixes#60.
- During testing needed to add a check due to the
api/v2.0/system/version returning a quoted string where
api/v1.0/system/version returned a JSON-format data.
- Tested against baremetal FreeNAS 11.3-U3.2 and virtual TrueNAS
12.0-BETA machines.
- Cleaned up the API calling routine so it will only create one instance
of the REST::Client module. Typically was 10 to 30+ instances per VM
disk CRUD.
- Due to this some variables needed to be “global” to the plugin.
- Removed some superfluous hashes and variables.
- Repetitive code reduced to only on call.
- Created one “Frankenstein” hash that retains all API methods,
variables and json body structures for each API version used by the
plugin.
- One call to the global configuration in the version check to reduce
execution time.
- Cleanup some code and formatting.
- Added some comments.
- Allows the use of FreeNAS API v2.0 so we can finally remove a VM drive
from the Proxmox VE GUI.
- Created a Frankenstein of out of FreeNAS.pm to allow 'one module to
rule them all' for v1.0 and v2.0 API's to FreeNAS.
- librest-client-perl changes so the call can have a <body/> to it on
GET and DELETE methods.
- Some spelling mistakes.
- Better syslog entries.
- More debbugging for testing purposes to the syslog.
- Update pvemanagerlib.js patch for Proxmox version to 6.0-7
- Update ZFSPlugin.pm patch for Proxmox version 6.0-8
- Adjusted new directory structure and added some missing files.
button.
- Update README.md to include a requested donation button for the
project. Thank you.
- Updated patch for pvemanagerlib.js for Proxmox VE pve-manager: 6.0-5
- Updated patch for apidoc.js for Proxmox VE pve-docs: 6.0-4
- Updated patch for ZFSPlugin.pm for Proxmox VE libpve-storage-perl:
6.0-6
- Patch created for pve-manager 5.4-11 specifically for pvemanagerlib.js
- Patch created for pve-manager 5.4-13 specifically for pvemanagerlib.js
- Patch created for libpve-storage-perl 5.0-44 specifically for
ZFSPlugin.pm
- Updated apidoc.js.patch to reflect pve-docs: 5.4-2
- New apidoc-5.4-2_1.js.patch
- Updated pvemanagerlib.js.patch to reflect pve-manager: 5.4-5
- New pvemanagerlib-5.4-5_1.js.patch
- Updated ZFSPlugin.pm.patch to reflect libpve-storage-perl: 5.0-42
- New ZFSPlugin-5.0-42.pm.patch
- Revised the README.md
- Updated ZFSPlugin.pm.patch for libpve-storage-perl: 5.3-34
- Updated pvemanagerlib.js.patch for pve-manager: 5.3-6
- Patch file versions will now have a '_<#>' (e.g. 5.3-34_1) appended to
it denoting the patch version for that Proxmox VE lib/file version.
- Removed code in FreeNAS.PM that used the blocksize field from the GUI
for the use of iSCSI block size causing migration and large extent
sizes. Fixes issues #9 and #33.
- Prefixed 'ZFS' to the 'Block Size' label on the GUI.
- Updated for 5.3-5
- Updated patch file for pvemanagerlib.js to pve-manager: 5.3-5
- Updated patch file for apidoc.js to pve-docs: 5.3-1
- Updated patch file for ZFSPlugin.pm to libpve-storage-perl: 5.0-33
- When changing the 'target' and 'pool' field to be editable in the Edit
ZFS over iSCSI panel it created an issue when you went to save any
change to that panel. The parameters were defined as { fixed => 1 }. Now
I don't know the backend of this but I changed it to { optional => 1} or
to { fixed => 0} they both worked. So I went with the { fixed => 0 } on
the 'target' and 'pool'. This fixes issue #27.
- Added a file with the version of the 'libpve-storage-perl' (e.g. -
ZFSPlugin-5.0-30.pm.patch to follow each version has it is changed.
- Updated pvemanagerlib.js.patch to reflect pve-manager version 5.2-9
- Updated ZFSPlugin.pm.patch to reflect libpve-storage-perl version
5.0-30
- Fixed issue with multipathing when NOT multipathing on the run_command
function.
- Fixed whitespace in README.md
- Added patch from @tl8roy to add multipathing to the ZFSPluging.pm for
FreeNAS. I believe this was only patched and tested for FreeNAS. I
tested WITHOUT using multipathing and I have had no issues. Closes
enhancement request #15 and reference #11.
- This change allows the API traffic to be on a different interface then
the iSCSI Provider interface. This allows the selection of the FreeNAS
WebGUI address for HTTP/HTTPS to be on a specific interface instead of
"ALL" (0.0.0.0) interfaces. If the API Host is not defined then the API
traffic will default to the iSCSI Provider interface.
- Add a simple API test using the FreeNAS API call to get its version
number, which could prove useful in future versions. Closes#17
- Whitespace cleanup
- Whitespace cleanup
- Removed the 'hardcoded' username and password. Will not throw an error
if it is not defined or blank in /etc/pve/storage.cfg for each ZFS via
ISCSI definition.
- Used a Ternary (Elvis - ?:) Operator for the scheme variable.
- The perl code was creating a new variable in the ‘if’ code block by
using 'my' at the beginning of the assignment at line 452. Once the code
exited this block that variable was released and now defaulted to the
main block variable at line 441 which is still set to 'undef'. Removing
the 'my' from the assignment line allowed the code to use the main block
$iscsi_lunid variable.
Fixes issue #7
- So we do not have to change the /usr/bin/pvedaemon a small fix to
check the $item->{'iscsi_target'} varaible from the API call is needed.
This closes issue #3.
- Added the ability to process two new fields in the storage.cfg under
an iSCSI configuration.
freenas_user <username>
freenas_password <password>
No more editing the FreeNAS.pm file
- In FreeNAS 11.1 it seems like a Lun of 0 becomes 'Auto'. When the API
returns the targent_to_extent data any Lun of "Auto" become 'undef' and
causes issues and errors in the syslog. This change corrects this
behavior. Have tested with adding, detaching, removing and "Moving Disk"
functions of Proxmox version 5.1-51.