passbolt / passbolt_help

Passbolt help and knowledge base site for the open source password manager for teams!
https://help.passbolt.com
GNU Affero General Public License v3.0
52 stars 183 forks source link

Update via apt might fail #80

Closed b-me1 closed 1 year ago

b-me1 commented 1 year ago

I just run into an error while updating a passbolt-ce-server on Ubuntu Server 20.04 and was about to update the documentation accordingly. But unfortunately all package-managers are mixed in the same doc passbolt_help/_includes/hosting/update/package-update.md and I'm unable to test the others.

When mariadb is updated in the same apt upgrade-run as passbolt then the database upgrade fails.

$ sudo apt upgade
...
The following packages will be upgraded:
  apport apt apt-transport-https apt-utils base-files cloud-init distro-info-data fwupd grub-efi-amd64 grub-efi-amd64-bin grub-efi-amd64-signed keyutils libapt-pkg6.0 libexpat1 libfwupd2 libfwupdplugin5 libkeyutils1 libmbim-glib4
  libmbim-proxy libmm-glib0 libnetplan0 libnss-systemd libpam-systemd libqmi-glib5 libqmi-proxy libsystemd0 libtss2-esys0 libudev1 linux-firmware mariadb-client-10.3 mariadb-client-core-10.3 mariadb-common mariadb-server
  mariadb-server-10.3 mariadb-server-core-10.3 modemmanager motd-news-config netplan.io passbolt-ce-server python-apt-common python3-apport python3-apt python3-distupgrade python3-problem-report snapd sosreport systemd systemd-sysv
  systemd-timesyncd ubuntu-advantage-tools ubuntu-release-upgrader-core udev unattended-upgrades update-notifier-common
54 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.

...

Setting up passbolt-ce-server (3.8.1-1) ...
Installing new version of config file /etc/passbolt/app.default.php ...
Installing new version of config file /etc/passbolt/app.php ...
Installing new version of config file /etc/passbolt/bootstrap.php ...
Installing new version of config file /etc/passbolt/default.php ...
Installing new version of config file /etc/passbolt/routes.php ...
Installing new version of config file /etc/passbolt/version.php ...

     ____                  __          ____
    / __ \____  _____ ____/ /_  ____  / / /_
   / /_/ / __ `/ ___/ ___/ __ \/ __ \/ / __/
  / ____/ /_/ (__  |__  ) /_/ / /_/ / / /
 /_/    \__,_/____/____/_.___/\____/_/\__/

 Open source password manager for teams
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
 Running migration scripts.
-------------------------------------------------------------------------------
using migration paths
 - /etc/passbolt/Migrations
using seed paths
 - /etc/passbolt/Seeds
Exception: There was a problem connecting to the database: SQLSTATE[HY000] [2002] Connection refused
In [/usr/share/php/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php, line 96]

dpkg: error processing package passbolt-ce-server (--configure):
 installed passbolt-ce-server package post-installation script subprocess returned error exit status 1

So using apt the passbolt upgade should be triggered before the remaining system.


sudo apt update
sudo apt --only-upgrade install passbolt-ce-server
sudo apt upgrade
dlen commented 1 year ago

Nice! Thanks for the workaround. This is a side effect of setting mysql-server as recommends instead of a hard dependency. The options I can think of are:

If there is no other option the last one seems like a fair trade-off for me but it should be documented as you request. :+1:

claytontstevenson commented 1 year ago

Added internal ticket for this CS-67

claytontstevenson commented 1 year ago

This has been added to the relevant help pages so I'll close this issue