Fixed malfunctioning patches

This commit is contained in:
Eugene Chow 2018-06-04 15:06:36 +08:00
parent 0261bac9ec
commit 25fcda3598
4 changed files with 91 additions and 88 deletions

29
README
View File

@ -1,27 +1,34 @@
FreeNAS ZFS over iSCSI interface
# FreeNAS ZFS over iSCSI interface
Please be aware that this enhancment uses the FreeNAS API's and NOT the ssh/scp
like the other interface provide.
Please be aware that this enhancment uses the FreeNAS API's and NOT the ssh/scp like the other interface provide.
1) First use the following commands to patch the needed files forthe FreeNAS Interface
1. First use the following commands to patch the needed files forthe FreeNAS Interface
```bash
patch /usr/share/pve-manager/js/pvemanagerlib.js < pve-manager/js/pvemanagerlib.js.patch
patch /usr/share/perl5/PVE/Storage/ZFSPlugin.pm < perl5/PVE/Storage/ZFSPlugin.pm.patch
patch /usr/share/pve-docs/api-viewer/apidoc.js < pve-docs/api-viewer/apidoc.js.patch
```
2) Use the following commands to copy the needed files for the FreeNAS
1. Use the following commands to copy the needed files for the FreeNAS
```bash
mkdir -p /usr/share/perl5/REST
cp perl5/REST/Client.pm /usr/share/perl5/REST/Client.pm
cp perl5/PVE/Storage/LunCmd/FreeNAS.pm /usr/share/perl5/PVE/Storage/LunCmd/FreeNAS.pm
```
3) Edit /usr/bin/pvedaemon and remove the '-T' from the perl command line.
vi /usr/bin/pvedaemon
Not really sure about 'why' this is do I need to do some research on this PERL
directive option.
1. Edit /usr/bin/pvedaemon and remove the '-T' from the perl command line.
```bash
sed -E -i.orig 's|^(#!/usr/bin/perl) -T|\1|' /usr/bin/pvedaemon
```
4) Execute the following at a console command prompt to active the above
Not really sure about 'why' this is do I need to do some research on this PERL directive option.
1. Execute the following at a console command prompt to active the above
```bash
systemctl restart pvedaemon
```
5) Either goto the URL for the Proxmox GUI in your favorite browser
1. Either goto the URL for the Proxmox GUI in your favorite browser
or
If you are already logged in via the GUI just refresh your browser to receive
the new Javascript code.

View File

@ -1,5 +1,5 @@
--- ZFSPlugin.pm.orig 2018-04-17 09:52:36.917394028 -0400
+++ ZFSPlugin.pm 2018-04-18 14:20:52.711457607 -0400
--- /usr/share/perl5/PVE/Storage/ZFSPlugin.pm.orig 2018-06-04 11:59:59.851426278 +0800
+++ /usr/share/perl5/PVE/Storage/ZFSPlugin.pm 2018-06-04 12:04:56.781049166 +0800
@@ -10,6 +10,7 @@
use base qw(PVE::Storage::ZFSPoolPlugin);
@ -35,8 +35,8 @@
} elsif ($scfg->{iscsiprovider} eq 'istgt') {
$msg = PVE::Storage::LunCmd::Istgt::run_lun_command($scfg, $timeout, $method, @params);
} elsif ($scfg->{iscsiprovider} eq 'iet') {
@@ -188,6 +193,14 @@
description => "host group for comstar views",
@@ -173,6 +178,14 @@
description => "iscsi provider",
type => 'string',
},
+ freenas_user => {
@ -47,9 +47,9 @@
+ description => "FreeNAS API Password",
+ type => 'string',
+ },
};
}
# this will disable write caching on comstar and istgt.
# it is not implemented for iet. iet blockio always operates with
# writethrough caching when not in readonly mode
@@ -204,6 +217,8 @@
sparse => { optional => 1 },
comstar_hg => { optional => 1 },

View File

@ -1,5 +1,5 @@
--- /usr/share/pve-docs/api-viewer/apidoc.js.orig 2018-05-24 10:18:20.694525300 -0400
+++ /usr/share/pve-docs/api-viewer/apidoc.js 2018-05-24 10:11:22.329925779 -0400
--- /usr/share/pve-docs/api-viewer/apidoc.js.orig 2018-06-04 12:08:17.416780601 +0800
+++ /usr/share/pve-docs/api-viewer/apidoc.js 2018-06-04 12:07:28.073832212 +0800
@@ -27549,6 +27549,18 @@
"type" : "string",
"typetext" : "<string>"

View File

@ -1,5 +1,5 @@
--- /usr/share/pve-manager/js/pvemanagerlib.js.orig 2018-05-23 16:53:17.014250092 -0400
+++ /usr/share/pve-manager/js/pvemanagerlib.js 2018-05-23 16:58:22.848825697 -0400
--- /usr/share/pve-manager/js/pvemanagerlib.js.orig 2018-06-04 11:21:26.419121310 +0800
+++ /usr/share/pve-manager/js/pvemanagerlib.js 2018-06-04 11:52:58.628592707 +0800
@@ -5303,6 +5303,7 @@
alias: ['widget.pveiScsiProviderSelector'],
comboItems: [
@ -8,11 +8,10 @@
[ 'istgt', 'istgt'],
[ 'iet', 'IET']
]
@@ -27145,7 +27146,14 @@
@@ -27145,6 +27146,13 @@
value: '',
fieldLabel: gettext('Target group'),
allowBlank: true
- }
+ },
+ {
+ xtype: me.isCreate ? 'textfield' : 'displayfield',
@ -20,15 +19,13 @@
+ value: '',
+ fieldLabel: gettext('FreeNAS User'),
+ allowBlank: true
+ }
}
];
me.column2 = [
@@ -27176,7 +27184,14 @@
@@ -27176,6 +27184,13 @@
value: '',
fieldLabel: gettext('Host group'),
allowBlank: true
- }
+ },
+ {
+ xtype: me.isCreate ? 'textfield' : 'displayfield',
@ -36,7 +33,6 @@
+ value: '',
+ fieldLabel: gettext('FreeNAS Password'),
+ allowBlank: true
+ }
}
];
me.callParent();