TheGrandWazoo / freenas-proxmox

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

Installing freenas-proxmox fails on fresh Proxmox install #95

Closed Uplink-snafu closed 3 years ago

Uplink-snafu commented 3 years ago

I have a fresh install + update of Proxmox 6.3-6 using the no-subscription repo

I've run the following commands:

apt update -y apt full-upgrade -y apt install -y qemu-guest-agent bmon git emacs openvswitch-switch wget http://repo.ksatechnologies.com/debian/pve/ksatechnologies-release.gpg -O /etc/apt/trusted.gpg.d/ksatechnologies-repo.gpg echo "deb http://repo.ksatechnologies.com/debian/pve stable freenas-proxmox" > /etc/apt/sources.list.d/ksatechnologies-repo.list apt update apt install freenas-proxmox

Installing freenas-proxmox outputs:

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  librest-client-perl
The following NEW packages will be installed:
  freenas-proxmox librest-client-perl
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 13.1 kB of archives.
After this operation, 32.8 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ftp.us.debian.org/debian buster/main amd64 librest-client-perl all 273-1 [10.3 kB]
Get:2 http://repo.ksatechnologies.com/debian/pve stable/freenas-proxmox amd64 freenas-proxmox all 2.0.2-1 [2,886 B]
Fetched 13.1 kB in 0s (120 kB/s)
Selecting previously unselected package librest-client-perl.
(Reading database ... 66896 files and directories currently installed.)
Preparing to unpack .../librest-client-perl_273-1_all.deb ...
Unpacking librest-client-perl (273-1) ...
Setting up librest-client-perl (273-1) ...
Selecting previously unselected package freenas-proxmox.
(Reading database ... 66903 files and directories currently installed.)
Preparing to unpack .../freenas-proxmox_2.0.2-1_all.deb ...
Unpacking freenas-proxmox (2.0.2-1) ...
Setting up freenas-proxmox (2.0.2-1) ...
Cloning into 'freenas-proxmox'...
remote: Enumerating objects: 195, done.
remote: Counting objects: 100% (195/195), done.
remote: Compressing objects: 100% (145/145), done.
remote: Total 604 (delta 72), reused 93 (delta 10), pack-reused 409
Receiving objects: 100% (604/604), 127.22 KiB | 2.83 MiB/s, done.
Resolving deltas: 100% (200/200), done.
Configuring freenas-proxmox
Branch '2.0' set up to track remote branch '2.0' from 'origin'.
Switched to a new branch '2.0'
dpkg: error processing package freenas-proxmox (--configure):
 installed freenas-proxmox package post-installation script subprocess returned error exit status 1
Processing triggers for man-db (2.8.5-2) ...
Errors were encountered while processing:
 freenas-proxmox
E: Sub-process /usr/bin/dpkg returned an error code (1)

Purging the package similarly fails:


Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
  librest-client-perl
Use 'apt autoremove' to remove it.
The following packages will be REMOVED:
  freenas-proxmox*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 66902 files and directories currently installed.)
Removing freenas-proxmox (2.0.2-1) ...
Reinstalling original Proxmox VE files
cp: cannot stat '/usr/share/pve-docs/api-viewer/apidoc.js.orig': No such file or directory
dpkg: error processing package freenas-proxmox (--remove):
 installed freenas-proxmox package post-removal script subprocess returned error exit status 1
Errors were encountered while processing:
 freenas-proxmox
E: Sub-process /usr/bin/dpkg returned an error code (1)
Trakkasure commented 3 years ago

Same here. received error installing the package. Same version of PVE.

Trakkasure commented 3 years ago

Solution: Add --ignore-whitespace (or -l) to PATCH_ARGS in freenas-proxmox.postinst line 24.

Uplink-snafu commented 3 years ago

That worked for me as, well. I added the flag to the postinst and postrm scripts

Just to be save, I apt reinstalled, apt purged, apt reinstalled pve-manager, pve-docs, and libpve-storage-perl, and then apt installed freenas-proxmox again

I'll try to integrate with my test environment and report back if I run into any further issues

TheGrandWazoo commented 3 years ago

Thanks for the information and fix. Will be updating the postinst script on the package.

Uplink-snafu commented 3 years ago

@TheGrandWazoo the fix is needed on the postrm script as well :)

TheGrandWazoo commented 3 years ago

freenas-proxmox-packager actions has been fixed due to deprecated env and add-path.

Package should be 2.0.2-3 with the fix for both postinst and postrm.

TheGrandWazoo commented 3 years ago

PR and merged to the 2.0 branch.