Server: ncdata unavailable should not be shown on UI if maintenance is on

Created on 16 Jan 2020  路  4Comments  路  Source: nextcloud/server

Steps to reproduce

  1. Put ncdata on a external drive
  2. Put Nextcloud in maintenance mode
  3. Check the web UI (You should see the message saying NC is in maintenance mode)
  4. Unplug the disk
  5. Check the web UI (error about the ncdata not accessible)

Expected behaviour

I am doing maintenance on the data disk, I would like my users to see that there is maintenance, not an error that is cryptic to them. Maintenance page check should take precendence over the ncdata check. I would expect that error, and wish to have that error is there was problem with the ncdata and nc not being in maintenance mode

Actual behaviour

Ui shows a cryptic error message instead of the maintenance

Server configuration

Operating system: Debian buster

Web server: apache 2.24

Database: mariadb 10

PHP version: 7.2

Nextcloud version: 17.0.2

Updated from an older Nextcloud/ownCloud or fresh install: Updated since NC 14

Where did you install Nextcloud from: Official release

Signing status:


Signing status

No errors have been found.

List of activated apps:


App list

Enabled:
  - accessibility: 1.3.0
  - activity: 2.10.1
  - calendar: 1.7.1
  - cloud_federation_api: 1.0.0
  - comments: 1.7.0
  - contacts: 3.1.6
  - dav: 1.13.0
  - federatedfilesharing: 1.7.0
  - federation: 1.7.0
  - files: 1.12.0
  - files_pdfviewer: 1.6.0
  - files_rightclick: 0.15.1
  - files_sharing: 1.9.0
  - files_trashbin: 1.7.0
  - files_versions: 1.10.0
  - files_videoplayer: 1.6.0
  - firstrunwizard: 2.6.0
  - gallery: 18.4.0
  - logreader: 2.2.0
  - lookup_server_connector: 1.5.0
  - news: 14.0.2
  - nextcloud_announcements: 1.6.0
  - notes: 3.1.0
  - notifications: 2.5.0
  - oauth2: 1.5.0
  - password_policy: 1.7.0
  - previewgenerator: 2.2.0
  - privacy: 1.1.0
  - provisioning_api: 1.7.0
  - recommendations: 0.5.0
  - serverinfo: 1.7.0
  - sharebymail: 1.7.0
  - support: 1.0.1
  - survey_client: 1.5.0
  - systemtags: 1.7.0
  - tasks: 0.11.3
  - text: 1.1.1
  - theming: 1.8.0
  - twofactor_backupcodes: 1.6.0
  - twofactor_totp: 4.1.1
  - updatenotification: 1.7.0
  - viewer: 1.2.0
  - workflowengine: 1.7.0
Disabled:
  - admin_audit
  - encryption
  - files_external
  - files_texteditor
  - previewgenerator.orig
  - user_ldap

Nextcloud configuration:


Config report

{
    "system": {
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": {
              ***REMOVED SENSITIVE VALUE***
        },
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "17.0.2.1",
        "overwrite.cli.url":  "***REMOVED SENSITIVE VALUE***",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 0,
            "password": "***REMOVED SENSITIVE VALUE***"
        },
        "tempdirectory": "\/media\/usbdrive\/ncdata\/tmp",
        "mail_smtpmode": "smtp",
        "mail_smtpauthtype": "LOGIN",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "preview_max_x": "2048",
        "preview_max_y": "2048",
        "jpeg_quality": "60",
        "overwriteprotocol": "https",
        "maintenance": false,
        "loglevel": "2",
        "log_type": "file",
        "htaccess.RewriteBase": "\/",
        "logfile": "\/media\/usbdrive\/ncdata\/nextcloud.log",
        "mail_sendmailmode": "smtp",
        "mail_smtpsecure": "tls",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***"
    }
}

Are you using external storage, if yes which one: Usb Drive

Are you using encryption: no

Are you using an external user-backend, if yes which one: N/A

Client configuration

Browser: any

Operating system: any

0. Needs triage bug

All 4 comments

I think that would require the maintenance state to be put into multiple locations. Currently, this is in your config.php, which is located in your data folder.

which is located in your data folder.

No. datadirectory is a configuration value hence if config.php would be in the datadirectory that would be a unsolvable dependency ;)

@kesselb is right. the "installation" directory is not the same as the data directory. My nextcloud installation is on a local disk in /var/www/nextcloud, where the config.php is. In that config.php, there is the path to the data dir, which is on a external removable drive.

@kesslb @manofthepeace Oh, I see. I misunderstood that.

Was this page helpful?
0 / 5 - 0 ratings