datto / dattobd

kernel module for taking block-level snapshots and incremental backups of Linux block devices
GNU General Public License v2.0
576 stars 122 forks source link

Packaging broken on Kubuntu 20.04.3 LTS -- neither installs nor uninstalls #262

Open david-kapital opened 3 years ago

david-kapital commented 3 years ago

Attempted to install dattobd-dkms and dattobd-utils on a fresh Kubuntu 20.04.3 LTS, but both the installation and subsequent removal failed.

Issuing the following commands, per install instructions:

# apt-key adv --fetch-keys https://cpkg.datto.com/DATTO-PKGS-GPG-KEY
# echo "deb [arch=amd64] https://cpkg.datto.com/datto-deb/public/$(lsb_release -sc) $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/datto-linux-agent.list
# apt update
# apt install dattobd-dkms dattobd-utils

Results in:

[many successful messages elided]
Loading new dattobd-0.10.15 DKMS files...
Building for 5.11.0-40-generic
Building initial module for 5.11.0-40-generic
Error! Bad return status for module build on kernel: 5.11.0-40-generic (x86_64)
Consult /var/lib/dkms/dattobd/0.10.15/build/make.log for more information.
dpkg: error processing package dattobd-dkms (--configure):
 installed dattobd-dkms package post-installation script subprocess returned error exit status 10
Setting up linux-libc-dev:amd64 (5.4.0-90.101) ...
Setting up libfakeroot:amd64 (1.24-1) ...
Setting up fakeroot (1.24-1) ...
update-alternatives: using /usr/bin/fakeroot-sysv to provide /usr/bin/fakeroot (fakeroot) in auto mode
Setting up libdattobd1 (0.10.15-29.1ubuntu20.04) ...
dpkg: dependency problems prevent configuration of dattobd-utils:
 dattobd-utils depends on dattobd-dkms (= 0.10.15-29.1ubuntu20.04); however:
  Package dattobd-dkms is not configured yet.

dpkg: error processing package dattobd-utils (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Setting up libcrypt-dev:amd64 (1:4.4.10-10ubuntu4) ...
Setting up libc-dev-bin (2.31-0ubuntu9.2) ...
Setting up libalgorithm-diff-xs-perl (0.04-6) ...
Setting up libalgorithm-merge-perl (0.08-3) ...
Setting up libc6-dev:amd64 (2.31-0ubuntu9.2) ...
Setting up libstdc++-9-dev:amd64 (9.3.0-17ubuntu1~20.04) ...
Setting up g++-9 (9.3.0-17ubuntu1~20.04) ...
Setting up g++ (4:9.3.0-1ubuntu2) ...
update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode
Setting up build-essential (12.8ubuntu1.1) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
Errors were encountered while processing:
 dattobd-dkms
 dattobd-utils
E: Sub-process /usr/bin/dpkg returned an error code (1)

The aforementioned make.log file has a size of 1.7M, and contains 887 different error statements.

Attempts to remove the packages also fail: # apt remove dattobd-dkms dattobd-utils

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  dctrl-tools dkms libdattobd1
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  dattobd-dkms dattobd-utils
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 282 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 229026 files and directories currently installed.)
Removing dattobd-utils (0.10.15-29.1ubuntu20.04) ...
Configuring initramfs, please wait...
update-initramfs: deferring update (trigger activated)
Removing dattobd-dkms (0.10.15-29.1ubuntu20.04) ...
dpkg: error processing package dattobd-dkms (--remove):
 installed dattobd-dkms package pre-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
 dattobd-dkms
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
yito24 commented 3 years ago

Please uninstall after deleting the following files. /var/lib/dpkg/info/dattobd-dkms.prerm

This issue is fixed with the code below. https://github.com/elastio/elastio-snap

Please refer to #252

malcolmradelet commented 2 years ago

@yito24 I installed elastio-snap but still have the same issues installing the above packages. Am I missing a step?

Datto support simply states that Ubuntu 20.04 is not supported by the Linux Agent, so I suppose I will have to abandon this for now. Was hoping this workaround would be sufficient 😞

yito24 commented 2 years ago

@malcolmradelet

I built with the latest source code in elastio-snap. And I was able to successfully install the package on Ubuntu 20.04(5.11.0-38-generic). Please try using the attached package.

elastio-snap.zip

malcolmradelet commented 2 years ago

@yito24 Oh, thanks for that, that is awesome! However, what I meant was that after installing the elastio-snap package I was still unable to install dattobd-dkms & dattobd-utils

yito24 commented 2 years ago

@malcolmradelet

Did you do the following? 1) Delete /var/lib/dpkg/info/dattobd-dkms.prerm 2) Uninstall dattobd packages 3) Install attached packages.

malcolmradelet commented 2 years ago

@yito24 Sorry for the delay, I was off work. Looks like I had the wrong elastio package. I had "elastio-snap-dkms (0.10.16-1debian10)" and your package was "elastio-snap-dkms (0.10.16-1ubuntu20.04)". All 3 packages installed fine :)

So after installing them, I attempted to install dlad again, which tries to install dattobd-dkms and dattobd-utils. I get this error:

Unpacking dattobd-utils (0.10.15-29.1ubuntu20.04) ...
dpkg: error processing archive /tmp/apt-dpkg-install-9d76tB/2-dattobd-utils_0.10.15-29.1ubuntu20.04_amd64.deb (--unpack):
 trying to overwrite '/usr/bin/update-img', which is also in package elastio-snap-utils 0.10.16-1ubuntu20.04
Selecting previously unselected package dlad.
Preparing to unpack .../5-dlad_2.7.1.1-1.1ubuntu20.04_amd64.deb ...
Unpacking dlad (2.7.1.1-1.1ubuntu20.04) ...
Errors were encountered while processing:
 /tmp/apt-dpkg-install-9d76tB/2-dattobd-utils_0.10.15-29.1ubuntu20.04_amd64.deb
yito24 commented 2 years ago

@malcolmradelet

I couldn't understand. Why are you installing dattobd-utils_0.10.15-29.1ubuntu20.04 again?

Install the three packages(attached pkges) and you're done.

malcolmradelet commented 2 years ago

@yito24 Well, I am trying to install the Datto Linux Agent on one of my servers. When I attempt to install the agent (package name "dlad") it also installs a few other packages: dattobd-dkms dattobd-utils libdattobd1 libmercury++0 libmercuryftp0

If I attempt to install dlad without dattobd-utils, it says unable to correct problems and does not install.

yito24 commented 2 years ago

@malcolmradelet

It can be difficult to install the required packages for the Datto Linux Agent. Because what I built is elastio-snap, which is different from dattobd.

First of all, I don't think that dattobd(Datto Linux Agent) supports kernel 5.8 or later. https://help.datto.com/s/article/KB360040893811

malcolmradelet commented 2 years ago

I understand, thank you for your assistance! I was hoping that maybe the elastio-snap packages would work in place of the dattobd ones.

yito24 commented 2 years ago

I have reported this issue. elastio-snap is compatible with the latest kernels. I am reporting to merge into elastio-snap ---> dattobd.

However, this has not yet been achieved.

masterwishx commented 2 years ago

can be elastio-snap adopted to urbackup instead of dattodb ?

JavaScriptDude commented 2 years ago

Same issues here with installing on fully updated Ubuntu 20.04.1 LTS. No special kernels installed. Docs mention that Ubuntu 20.04+ is supported. What is the reality on the ground?

I thought that the Datto appliances run Ubuntu 20.04 LTS with ZFS root; exactly the setup I have.

nickchen-cpu commented 2 years ago

Hi @JavaScriptDude If you use 20.04 Desktop, its kernel is probably over 5.10 (uname -r) , and dattobd has not supported it yet.

I guess the docs you pointed out is only for Server 20.04 instead of Desktop 20.04

JavaScriptDude commented 2 years ago

Yes, its XUbuntu Desktop 20.04 LTS. I find ZFS crutial for my devops workflows and desktop distro makes ZFS root install just a single click.

If someone has access to the docs, I suggest adding the following to the installation instructions:

  1. Add a note in the installation instructions that only Ubuntu server 20.04 is supported. There is ambiguity because it does say Ubuntu 20.04 in a few places.
  2. Add troubleshooting note on deleting /var/lib/dpkg/info/dattobd-dkms.prerm if having difficulty removing dattobd-dkms.

The above would have saved me a few hours and no. 3 alone was a bit stressing and difficult to find a solution.

Thanks!