Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Time out during upgrade due to huge data folder lead to incoherent package #666

Open
Krakinou opened this issue Feb 19, 2024 · 5 comments
Open

Comments

@Krakinou
Copy link

Describe the bug

When upgrading a nextcloud instance, the line find $data_dir/data/ -type f -print0 | xargs -r0 chmod 0640 can take a very long time if the data folder is big.
This leads to time-out when an upgrade is performed from the web admin interface and left the package broken as the upgrade process just stop mid-way.
This does not happen from command line.
Please refer to this thread.

Context

  • Hardware: Raspberry 4 with data folder on an external SSD HDD.
  • YunoHost version: 11.2.10
  • I have access to my server: Through SSH & through the webadmin
  • Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: yes
    • External HDD mounted on /home/yunohost.app/nextcloud is mounted on the external HDD, but I'm not sure this has an impact.
    • The data folder is >400Gb, with many small files so this can take a very long time to chmod...
  • If upgrading, current package version: In my example 27.1.4ynh1 to 28.0.2ynh1 but I assume this may happen in any situation.

Steps to reproduce

  1. Have a big data folder
  2. Try to upgrade the app through the webadmin
  3. Wait
  4. Once time out occurs, check the version of the instance & the package with yunohost app info nextcloud => the package is still at the old version
  5. Connect to the nextcloud instance and check the nextcloud version => it's the version from the new package.

Logs

Here is the end of the log of the upgrade from the webadmin (it's just stop there):

2024-02-07 22:54:53,353: INFO - [##############++....] > Reapplying file permissions...
2024-02-07 22:54:53,354: DEBUG - + chown -R nextcloud:www-data /var/www/nextcloud
2024-02-07 22:54:55,930: DEBUG - + chown -R nextcloud: /home/yunohost.app/nextcloud
2024-02-07 22:54:55,935: DEBUG - + find /var/www/nextcloud/ -type f -print0
2024-02-07 22:54:55,936: DEBUG - + xargs -r0 chmod 0644
2024-02-07 22:54:56,557: DEBUG - + find /var/www/nextcloud/ -type d -print0
2024-02-07 22:54:56,559: DEBUG - + xargs -r0 chmod 0755
2024-02-07 22:54:56,909: DEBUG - + find /home/yunohost.app/nextcloud/data/ -type f -print0
2024-02-07 22:54:56,910: DEBUG - + xargs -r0 chmod 0640
```
@Krakinou
Copy link
Author

I love the 666 issue number :)

@OniriCorpe
Copy link
Member

The web interface times out, but the upgrade should continue to run in the background without issue

@Krakinou
Copy link
Author

Well, I also thought so. But from what I had on my system it does not : All files in /etc/yunohost/apps/nextcloud were from previous version.
When upgrading from command line, all files were updated to last version.

@Psycojoker Psycojoker moved this to In Progress in technical stuff Feb 20, 2024
@OniriCorpe
Copy link
Member

i manually tested by closing my tab during the yesterday's nextcloud upgrade and it completed smoothly in background without the webpage openned

so i'm confused

@Krakinou
Copy link
Author

Krakinou commented Mar 4, 2024

I'm trying to reproduce the issue on a VM, will keep you posted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants