Commit Graph

110 Commits

Author SHA1 Message Date
Kevin Scott Adams 08bd48f35c
Merge pull request #111 from hans00/master
Fix bug for TrueNAS-SCALE
2022-03-02 08:57:03 -05:00
Hans 4b0ec91508
Don't replace scfg data
Fix TheGrandWazoo/freenas-proxmox#107
2022-02-24 01:07:32 +08:00
Kevin Scott Adams bcf0f78514
Create stale.yml 2021-11-21 21:35:35 -05:00
Kevin Scott Adams 55f699e0b1 Update for issues with Proxmox 7.
- 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.
2021-08-08 09:30:49 -04:00
Kevin Scott Adams 572c81a95e Updated patch files.
- Updated patch file for 6.4-8 due to changes in functions declarations.
2021-06-10 11:47:14 -04:00
Kevin Scott Adams 1048ee23a7 Missing right curly bracket in TrueNAS-SCALE Fix.
- 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.
2021-04-15 20:29:59 -04:00
Kevin Scott Adams cc9707a14c TrueNAS-Scale slash substitution.
- Changed a slash (/) to a dash (-) on the $cfg->{'pool'} reference.
SCST does not support '/' characters on the device.
- Possible fix for #75.
2021-04-13 14:47:21 -04:00
Kevin Scott Adams bd13f0a8c8 Damn copy and paste.
- Copy and pasting just does not work.
2021-03-20 15:24:22 -04:00
Kevin Scott Adams bf5bec6dcb Merge branch 'master' of https://github.com/TheGrandWazoo/freenas-proxmox.git 2021-03-20 15:11:41 -04:00
Kevin Scott Adams 4b70332734 Update pvemanagerlib patch.
- Was failing due to source file using some commas in certain places.
2021-03-20 15:11:10 -04:00
Kevin Scott Adams e572b82565
Merge pull request #84 from qskwood/qskwood-patch-1
Removed Unicode character
2020-12-01 07:12:00 -05:00
Quinn Wood 94cc0a67f9
Removed Unicode character
in favor of inline code tags. The characters don't display on my machine, but this may just be me.
2020-11-28 22:16:22 -06:00
Kevin Scott Adams 818d81fa7a
Merge pull request #81 from sontru/master
Update ZFSPlugin.pm.patch
2020-10-16 17:46:36 -04:00
sontru 6a1d82c8cd
Update ZFSPlugin.pm.patch
Full path added to multipath command.
Also need to install this tool: apt install multipath-tools
2020-10-16 16:24:37 +01:00
Kevin Scott Adams 084faf9903 Fixed pull request to support FreeNAS, TrueNAS-CORE and TrueNAS-SCALE.
- 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.
2020-09-24 12:32:19 -04:00
Kevin Scott Adams 9aa40c7d7d
Merge pull request #76 from hans00/master
Support for TrueNAS SCALE
2020-09-24 12:25:36 -04:00
Hans 6eedef4137 fix bug when method is DELETE 2020-09-20 21:44:22 +08:00
Hans 29cf4c48cd extent name replace / to - 2020-09-20 16:23:57 +08:00
Hans 401bcfce53 Support for TrueNAS SCALE version pattern 2020-09-20 15:08:32 +08:00
Kevin Scott Adams c9ecef474b Fix issue with JSON variable names in V1.0 api
- JSON return variables for V1.0 api are iscsi_extent and iscsi_target.
The 'id' was a copy and paste error.

Fixes #72
2020-09-10 15:36:41 -04:00
Kevin Scott Adams 7c0738bab4 Added a space to kick off a build.
- Checking the build of branch 2.0.
2020-09-02 16:37:24 -04:00
Kevin Scott Adams 3dd67fbf57 Trying GitVersioning
- See if I can make a version number on builds using a premade action.
2020-09-01 21:16:11 -04:00
Kevin Scott Adams a6e9229677 New build process
- Testing the github actions to build the debian package.
2020-08-28 15:22:01 -04:00
Kevin Scott Adams cad1ef6d44
Merge pull request #67 from TheGrandWazoo/add-license-1
Create LICENSE
2020-08-27 15:19:41 -04:00
Kevin Scott Adams 06da4b488a
Create LICENSE 2020-08-27 15:16:14 -04:00
Kevin Scott Adams 13a93e653b
Update FUNDING.yml 2020-08-27 15:10:14 -04:00
Kevin Scott Adams e43ad9a94f
Update FUNDING.yml 2020-08-27 15:06:04 -04:00
Kevin Scott Adams 3f82fd8782
Delete FUNDING.yml 2020-08-27 15:05:27 -04:00
Kevin Scott Adams 40c0dcff93
Update FUNDING.yml 2020-08-27 14:00:02 -04:00
Kevin Scott Adams 1356c4fad9
Update FUNDING.yml 2020-08-27 13:57:51 -04:00
Kevin Scott Adams 37e1da70aa
Update FUNDING.yml 2020-08-27 13:54:51 -04:00
Kevin Scott Adams 4c8564908e
Update FUNDING.yml 2020-08-27 13:53:15 -04:00
Kevin Scott Adams c23f037ab6
Create FUNDING.yml 2020-08-27 13:47:03 -04:00
Kevin Scott Adams 1570f3cb60
Create FUNDING.yml 2020-08-27 13:46:54 -04:00
Kevin Scott Adams a40e0ac299 Rework the error routine so it will not error out.
- 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 @_.
2020-08-27 13:05:56 -04:00
Kevin Scott Adams 739b6fb0f6 Update README.md
- Added Martin and sorted
2020-07-30 14:51:41 -04:00
Kevin Scott Adams 91c192f349 Reduce loop from running through all elements
- 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.
2020-07-30 14:22:22 -04:00
Kevin Scott Adams 11dc7e78bd
Merge pull request #64 from tl8roy/patch-1
Update the Readme to more accurately reflect the donation
2020-07-28 08:34:40 -04:00
Tristan Lostroh 2cd8ac2a1d
Update the Readme to more accurately reflect the donation 2020-07-28 15:18:08 +10:00
Kevin Scott Adams b4a9cd27ea Cleanup of code created issue for some calls to run_lun_command
- 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.
2020-07-20 09:59:52 -04:00
Kevin Scott Adams 3e128e673c Allow multiple instances of the [Free|True}NAS REST::Client construct.
- 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.
2020-07-14 17:54:37 -04:00
Kevin Scott Adams c3935785c0 Update comments/doc of the methods changes
- Just a change to two doc of 'GET' and 'DELETE' method subs.
2020-07-14 17:32:53 -04:00
Kevin Scott Adams ac1c31f2d0 Added 302 and 307 code handlers on initial API connection and various
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.
2020-07-07 11:14:30 -04:00
Kevin Scott Adams aa11d596bd Code efficiency improvements.
- 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.
2020-06-11 12:49:28 -04:00
Kevin Scott Adams 977b00a178 FreeNAS API v2.0 features
- 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.
2020-06-09 12:31:31 -04:00
Kevin Scott Adams 006dacc479 Add librest-client-perl to the package.
- librest-client-perl needs to be updated so it can have data in the
body of the call for GET and DELETE's.
2020-06-09 09:59:39 -04:00
Kevin Scott Adams 9f9b6ed171 Formatting and spelling errors
- Change some formatting and placement of lines.
- Fixed a few typos
2020-06-02 08:31:44 -04:00
Kevin Scott Adams 17e3625094 Merge remote-tracking branch 'origin/master' 2020-06-01 16:28:42 -04:00
Kevin Scott Adams 2a9e478704 Update the README.md for new features.
- Instruct the use of the package system to auto update the needed files
on the Prommox system
- Archive original README.md in the WIKI.
2020-06-01 16:24:55 -04:00
Kevin Scott Adams d46334e46a Set theme jekyll-theme-merlot 2020-05-26 12:22:36 -04:00