TheGrandWazoo / freenas-proxmox

ZFS over iSCSI to FreeNAS API's from Proxmox VE
MIT License
237 stars 41 forks source link

truenas scale TrueNAS-SCALE-23.10.1 incompatibility #180

Closed rumblpak closed 2 months ago

rumblpak commented 6 months ago

A default new install of truenas scale will receive the following errors during a vm create.

Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/PVE/Storage/LunCmd/FreeNAS.pm line 597.
Use of uninitialized value $target_id in concatenation (.) or string at /usr/share/perl5/PVE/Storage/LunCmd/FreeNAS.pm line 787.
Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/PVE/Storage/LunCmd/FreeNAS.pm line 618.
Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/PVE/Storage/LunCmd/FreeNAS.pm line 597.
Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/PVE/Storage/LunCmd/FreeNAS.pm line 597.
Use of uninitialized value $target_id in concatenation (.) or string at /usr/share/perl5/PVE/Storage/LunCmd/FreeNAS.pm line 787.
Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/PVE/Storage/LunCmd/FreeNAS.pm line 597.
Use of uninitialized value $target_id in concatenation (.) or string at /usr/share/perl5/PVE/Storage/LunCmd/FreeNAS.pm line 787.
TASK ERROR: unable to create VM 100 - Unable to find the target id for iqn.2005-10.org.freenas.ctl:images at /usr/share/perl5/PVE/Storage/LunCmd/FreeNAS.pm line 259.

Upon further investigation in syslog, I found that it is common to receive either http 302s or 301s and fail as a result. Example follows:

Feb 27 11:15:36 pve pvedaemon[187090]: Use of uninitialized value $target_id in concatenation (.) or string at /usr/share/perl5/PVE/Storage/LunCmd/FreeNAS.pm line 787.
Feb 27 11:15:36 pve pvedaemon[187090]: PVE::Storage::LunCmd::FreeNAS::freenas_get_targetid : successful :
Feb 27 11:15:36 pve pvedaemon[187090]: PVE::Storage::LunCmd::FreeNAS::freenas_list_lu : successful
Feb 27 11:15:36 pve pvedaemon[187090]: PVE::Storage::LunCmd::FreeNAS::run_list_lu : called with (method: 'create_lu'; result_value_type: 'name'; param[0]: '/dev/zvol/kracko/proxmox/images/vm-100-disk-1')
Feb 27 11:15:36 pve pvedaemon[187090]: PVE::Storage::LunCmd::FreeNAS::run_list_lu : TrueNAS object to find: '/dev/zvol/kracko/proxmox/images/vm-100-disk-1'
Feb 27 11:15:36 pve pvedaemon[187090]: PVE::Storage::LunCmd::FreeNAS::run_list_lu '/dev/zvol/kracko/proxmox/images/vm-100-disk-1' with key 'name' was not found
Feb 27 11:15:36 pve pvedaemon[187090]: PVE::Storage::LunCmd::FreeNAS::freenas_get_targetid : called
Feb 27 11:15:36 pve pvedaemon[187090]: PVE::Storage::LunCmd::FreeNAS::freenas_iscsi_get_target : called
Feb 27 11:15:36 pve pvedaemon[187090]: Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/PVE/Storage/LunCmd/FreeNAS.pm line 597.
Feb 27 11:15:36 pve pvedaemon[187090]: PVE::Storage::LunCmd::FreeNAS::freenas_api_call : called for host '10.0.0.8'
Feb 27 11:15:36 pve pvedaemon[187090]: PVE::Storage::LunCmd::FreeNAS::freenas_api_call : successful
Feb 27 11:15:36 pve pvedaemon[187090]: [ERROR]FreeNAS::API::PVE::Storage::LunCmd::FreeNAS::freenas_iscsi_get_target : Response code: 302
Feb 27 11:15:36 pve pvedaemon[187090]: [ERROR]FreeNAS::API::PVE::Storage::LunCmd::FreeNAS::freenas_iscsi_get_target : Response content: <html>
<head><title>302 Found</title></head>
<body>
<center><h1>302 Found</h1></center>
<hr><center>nginx</center>
</body>
</html>

A disk is created on the truenas side but is never accessible due to errors in the above process.

I found a working workaround by executing the following on the truenas scale side:

midclt call system.general.update '{"ui_httpsredirect": false}'
service middlewared restart
service nginx restart
TheGrandWazoo commented 6 months ago

Could you post the syslog from the start of the FreeNAS command to its failure.

stale[bot] commented 3 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.