Skip to content

[QA] upgrade 10.8 to 10.9 fails on Ubuntu 18.04 - rollback is not possible #39783

Closed

Description

@jnweiger

Seen with owncloud complete 10.8.0 running on Ubuntu 18.04
The system is running with php-7.2.24 -- that is sufficient for owncloud 10.8 -- but (probably unknown to the user) not for 10.9

  • Admin is greeted with ownCloud 10.9.1 is available. Get more information on how to update.

  • Admin goes to
    Settings->Admin->General
    -> Updater -> Open updater
    -> Start
    image


  • The Web-UI is now unusable:
    image

  • Admin logs in to Linux as root and tries to rescue the situation with
sudo -E -u www-data /usr/bin/php /var/www/owncloud/occ upgrade
This version of ownCloud requires at least PHP 7.3.0
You are currently running PHP 7.2.24-0ubuntu0.18.04.10. Please update your PHP version.

In case updating the PHP version is not an option, the admin would want to use the checkpoint
that was created during the owncloud upgrade attempt.

Expected behaviour:

  • The online updater ends with a more helpful diagnostics than undefined
  • occ would still run.
  • There is instructions how to roll back to a checkpoint.

Activity

  1. jnweiger commented on Feb 11, 2022

    @jnweiger
    ContributorAuthor

    Manual rollback:

    cd /var/www/owncloud/data/updater-data/checkpoint/
    ls
    10.7.0.4-62066d5b4a6b8  10.8.0.4-62067848e49ab
    cd 10.8.0.4-62067848e49ab
    
    ls -la
    total 16
    drwxr-xr-x  4 www-data www-data 4096 Feb 11 14:52 .
    drwxr-xr-x  4 www-data www-data 4096 Feb 11 14:52 ..
    drwxr-xr-x 53 www-data www-data 4096 Feb 11 14:53 apps
    drwxr-xr-x 10 www-data www-data 4096 Feb 11 14:52 core
    
    sudo cp -a core/* /var/www/owncloud/
    sudo cp -a apps/* /var/www/owncloud/apps/
    
  2. jnweiger commented on Feb 11, 2022

    @jnweiger
    ContributorAuthor

    Manual PHP upgrade procedure (instead of the rollback):

    # register the php update repository and see if we can get a new php.
    sudo add-apt-repository ppa:ondrej/php
    sudo apt-get install -y php7.4 
    
    # walk through the list of installed php7.2 modules and install their php7.4 counterparts
    for pkg in $(dpkg -l 'php7.2-*' | cut -d' ' -f3); do
      newpkg=php7.4-$(echo $pkg | cut -d- -f2)
      echo $newpkg
      sudo apt install -y $newpkg
    done
    
    # tell apache about the new php
    sudo a2dismod php7.2
    sudo a2enmod php7.4
    sudo systemctl restart apache2
    
    # remove unused php7.2 packages (not required)
    sudo apt autoremove
    
    # avoid php8.1 (just in case ...)
    apt purge 'php8*' -y
    
    # let owncloud do all its internal repair and update steps
    sudo -E -u www-data /usr/bin/php /var/www/owncloud/occ upgrade
    

    The ownCloud web interface should now be up and running again.

  3. fluutn commented on Feb 12, 2022

    @fluutn

    The expected behavior of the Updater should be a Warning "You run PHP 7.2.x, at least PHP 7.3 is required for oc 9.x" before the User klicks on Update. Ran also into that this morning ;-)

  4. phil-davis commented on Feb 12, 2022

    @phil-davis
    Contributor

    Was there the same problem when PHP 7.1 was dropped? What happened for upgrades with that release?

  5. github-actions commented on Aug 12, 2022

    @github-actions

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

  6. github-actions commented on Aug 22, 2022

    @github-actions

    This issue has been automatically closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions