Cannot configure swift primary object storage

After struggling with
https://docs.nextcloud.com/server/18/admin_manual/configuration_files/primary_storage.html

I determined the a configuration to access OVH swift’s object storage except but still the server leads to an internal server error.

BTW the swift command line has no problems at all:

swift -A $OS_AUTH_URL -U $OS_USERNAME -K $OS_PASSWORD list -l mybucket

config/config.php is:

  'logfile' => '/var/www/html/nextcloud/data/nextcloud.log',
'loglevel' => 0,
  'objectstore' => 
  array (
    'class' => 'OC\\Files\\ObjectStore\\Swift',
    'arguments' => 
    array (
      'autocreate' => true,
      'user' => 
      array (
        'name' => $_ENV('OS_USERNAME'),
        'password' => $_ENV('OS_PASSWORD'),
        'domain' => 
        array (
          'name' => 'Default',
        ),
      ),
      'scope' => 
      array (
        'project' => 
        array (
          'name' => $_ENV('OS_TENANT_NAME'),
          'domain' => 
          array (
            'name' => 'Default',
          ),
        ),
      ),
      'tenantName' => $_ENV('OS_TENANT_NAME'),
      'serviceName' => 'swift',
      'region' => $_ENV('OS_REGION_NAME'),
      'bucket' => 'mybucket',
      'url' => $_ENV('OS_AUTH_URL'),
    ),
  ),

log file is:

{"reqId":"V7K5JgOgmTtbyqa0Ql1h","level":3,"time":"2020-05-16T21:24:37+00:00","remoteAddr":"82.84.141.129","user":"lrkwz","app":"index","method":"GET","url":"/apps/files/","message":{"Exception":"OCP\\Files\\NotFoundException","Message":"","Code":0,"Trace":[{"file":"/var/www/html/nextcloud/apps/files/lib/Controller/ViewController.php","line":139,"function":"getStorageInfo","class":"OC_Helper","type":"::"},{"file":"/var/www/html/nextcloud/apps/files/lib/Controller/ViewController.php","line":187,"function":"getStorageInfo","class":"OCA\\Files\\Controller\\ViewController","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":170,"function":"index","class":"OCA\\Files\\Controller\\ViewController","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":99,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/App.php","line":125,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Route/Router.php","line":299,"function":"call_user_func"},{"file":"/var/www/html/nextcloud/lib/base.php","line":1008,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/html/nextcloud/index.php","line":38,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/html/nextcloud/lib/private/legacy/helper.php","Line":490,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36","version":"18.0.4.2"}

Executing occ leads to:

./occ
An unhandled exception has been thrown:
OC\HintException: [1]:  (Storage is temporarily not available)

No expert here but have been happily using OVH for primary containers via Swift V3 for some time now.

This is the objectstore section of our config.php for use with an OVH Object Storage container for NextCloud primary storage:

  'objectstore' =>
  array (
'class' => 'OC\\Files\\ObjectStore\\Swift',
'arguments' =>
array (
  'autocreate' => true,
  'user' =>
  array (
    'name' => 'OS_USERNAME',
    'password' => 'OS_PASSWORD',
    'domain' =>
    array (
      'name' => 'Default',
    ),
  ),
  'scope' =>
  array (
    'project' =>
    array (
      'name' => 'OS_TENANT_NAME',
      'domain' =>
      array (
        'name' => 'Default',
      ),
    ),
  ),
  'serviceName' => 'swift',
  'region' => 'REGION',
  'url' => 'https://auth.cloud.ovh.net/v3',
  'bucket' => 'CONTAINERNAME',
),
  ),

and then in storage.config.php (this will create the container if it doesn’t exist)

<?php
$CONFIG = array (
'objectstore' => array(
   'class' => 'OC\\Files\\ObjectStore\\Swift',
          'arguments' => array(
                 'autocreate' => true,
                'user' => [
                       'name' => 'OS_USERNAME',
                      'password' => 'OS_PASSWORD',
                     'domain' => [
                            'name' => 'Default'
                 ]
                  ],
                 'scope' => [
                        'project' => [
                              'name' => 'OS_TENANT_NAME',
                              'domain' => [
                                     'name' => 'Default',
                            ],
                   ],
                 ],
                 'serviceName' => 'swift',
                'region' => 'REGION',
               'url' => "https://auth.cloud.ovh.net/v3",
              'bucket' => 'CONTAINERNAME',
     ),
),
);

I just wish we could figure out how to get Swift V3 auth working for external storage via the NextCloud GUI given the cut off for V2 is June 23.

Config.php is identical, added config/storage.config.php but still no success at login:

{
  "reqId": "G7Rr6W3mY3hH82TEMByE",
  "level": 3,
  "time": "2020-05-20T09:10:08+00:00",
  "remoteAddr": "82.84.141.129",
  "user": "lrkwz",
  "app": "index",
  "method": "GET",
  "url": "/apps/files/",
  "message": {
    "Exception": "OCP\\Files\\NotFoundException",
    "Message": "",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/html/nextcloud/apps/files/lib/Controller/ViewController.php",
        "line": 139,
        "function": "getStorageInfo",
        "class": "OC_Helper",
        "type": "::"
      },
      {
        "file": "/var/www/html/nextcloud/apps/files/lib/Controller/ViewController.php",
        "line": 187,
        "function": "getStorageInfo",
        "class": "OCA\\Files\\Controller\\ViewController",
        "type": "->"
      },
      {
        "file": "/var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 170,
        "function": "index",
        "class": "OCA\\Files\\Controller\\ViewController",
        "type": "->"
      },
      {
        "file": "/var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 99,
        "function": "executeController",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->"
      },
      {
        "file": "/var/www/html/nextcloud/lib/private/AppFramework/App.php",
        "line": 125,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->"
      },
      {
        "file": "/var/www/html/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php",
        "line": 47,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::"
      },
      {
        "function": "__invoke",
        "class": "OC\\AppFramework\\Routing\\RouteActionHandler",
        "type": "->"
      },
      {
        "file": "/var/www/html/nextcloud/lib/private/Route/Router.php",
        "line": 299,
        "function": "call_user_func"
      },
      {
        "file": "/var/www/html/nextcloud/lib/base.php",
        "line": 1008,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->"
      },
      {
        "file": "/var/www/html/nextcloud/index.php",
        "line": 38,
        "function": "handleRequest",
        "class": "OC",
        "type": "::"
      }
    ],
    "File": "/var/www/html/nextcloud/lib/private/legacy/helper.php",
    "Line": 490,
    "CustomMessage": "--"
  },
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36",
  "version": "18.0.4.2"
}

Something has changed anyhow:

$ ./occ config:list
{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "labfoto.associazioneroccabrivio.com",
            "localhost"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "18.0.4.2",
        "overwrite.cli.url": "https:\/\/labfoto.associazioneroccabrivio.com",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "logfile": "\/var\/www\/labfoto.it\/nextcloud\/data\/nextcloud.log",
        "loglevel": 0,
        "objectstore": {
            "class": "OC\\Files\\ObjectStore\\Swift",
            "arguments": {
                "autocreate": true,
                "user": {
                    "name": "***REMOVED SENSITIVE VALUE***",
                    "password": "***REMOVED SENSITIVE VALUE***",
                    "domain": {
                        "name": "Default"
                    }
                },
                "scope": {
                    "project": {
                        "name": "4877444813151481",
                        "domain": {
                            "name": "Default"
                        }
                    }
                },
                "serviceName": "swift",
                "region": "GRA",
                "url": "https:\/\/auth.cloud.ovh.net\/v3",
                "bucket": "foto-condivise"
            }
        }
    },
    "apps": {
        "accessibility": {
            "enabled": "yes",
            "installed_version": "1.4.0",
            "types": ""
        },
        "activity": {
            "enabled": "yes",
            "installed_version": "2.11.0",
            "types": "filesystem"
        },
        "backgroundjob": {
            "lastjob": "6"
        },
        "bruteforcesettings": {
            "enabled": "yes",
            "installed_version": "1.6.0",
            "types": ""
        },
        "cloud_federation_api": {
            "enabled": "yes",
            "installed_version": "1.1.0",
            "types": "filesystem"
        },
        "comments": {
            "enabled": "yes",
            "installed_version": "1.8.0",
            "types": "logging"
        },
        "core": {
            "installed.bundles": "[\"CoreBundle\"]",
            "installedat": "1589658509.0044",
            "lastcron": "1589965594",
            "lastupdateResult": "[]",
            "lastupdatedat": "1589664175",
            "oc.integritycheck.checker": "[]",
            "public_files": "files_sharing\/public.php",
            "public_webdav": "dav\/appinfo\/v1\/publicwebdav.php",
            "theming.variables": "b92d206521717ac032f8aa58d3c7ff2f",
            "vendor": "nextcloud"
        },
        "dav": {
            "enabled": "yes",
            "installed_version": "1.14.0",
            "types": "filesystem"
        },
        "federatedfilesharing": {
            "enabled": "yes",
            "installed_version": "1.8.0",
            "types": ""
        },
        "federation": {
            "enabled": "yes",
            "installed_version": "1.8.0",
            "types": "authentication"
        },
        "files": {
            "enabled": "yes",
            "installed_version": "1.13.1",
            "types": "filesystem"
        },
        "files_pdfviewer": {
            "enabled": "yes",
            "installed_version": "1.7.0",
            "types": ""
        },
        "files_rightclick": {
            "enabled": "yes",
            "installed_version": "0.15.2",
            "types": ""
        },
        "files_sharing": {
            "enabled": "yes",
            "installed_version": "1.10.1",
            "types": "filesystem"
        },
        "files_trashbin": {
            "enabled": "yes",
            "installed_version": "1.8.0",
            "types": "filesystem,dav"
        },
        "files_versions": {
            "enabled": "yes",
            "installed_version": "1.11.0",
            "types": "filesystem,dav"
        },
        "files_videoplayer": {
            "enabled": "yes",
            "installed_version": "1.7.0",
            "types": ""
        },
        "firstrunwizard": {
            "enabled": "yes",
            "installed_version": "2.7.0",
            "types": "logging"
        },
        "logreader": {
            "enabled": "yes",
            "installed_version": "2.3.0",
            "types": ""
        },
        "lookup_server_connector": {
            "enabled": "yes",
            "installed_version": "1.6.0",
            "types": "authentication"
        },
        "nextcloud_announcements": {
            "enabled": "yes",
            "installed_version": "1.7.0",
            "types": "logging"
        },
        "notifications": {
            "enabled": "yes",
            "installed_version": "2.6.0",
            "types": "logging"
        },
        "oauth2": {
            "enabled": "yes",
            "installed_version": "1.6.0",
            "types": "authentication"
        },
        "password_policy": {
            "enabled": "yes",
            "installed_version": "1.8.0",
            "types": ""
        },
        "photos": {
            "enabled": "yes",
            "installed_version": "1.0.0",
            "types": ""
        },
        "privacy": {
            "enabled": "yes",
            "installed_version": "1.2.0",
            "types": ""
        },
        "provisioning_api": {
            "enabled": "yes",
            "installed_version": "1.8.0",
            "types": "prevent_group_restriction"
        },
        "recommendations": {
            "enabled": "yes",
            "installed_version": "0.6.0",
            "types": ""
        },
        "serverinfo": {
            "enabled": "yes",
            "installed_version": "1.8.0",
            "types": ""
        },
        "settings": {
            "enabled": "yes",
            "installed_version": "1.0.0",
            "types": ""
        },
        "sharebymail": {
            "enabled": "yes",
            "installed_version": "1.8.0",
            "types": "filesystem"
        },
        "support": {
            "enabled": "yes",
            "installed_version": "1.1.0",
            "types": "session"
        },
        "survey_client": {
            "enabled": "yes",
            "installed_version": "1.6.0",
            "types": ""
        },
        "systemtags": {
            "enabled": "yes",
            "installed_version": "1.8.0",
            "types": "logging"
        },
        "text": {
            "enabled": "yes",
            "installed_version": "2.0.0",
            "types": "dav"
        },
        "theming": {
            "enabled": "yes",
            "installed_version": "1.9.0",
            "types": "logging"
        },
        "twofactor_backupcodes": {
            "enabled": "yes",
            "installed_version": "1.7.0",
            "types": ""
        },
        "updatenotification": {
            "enabled": "yes",
            "installed_version": "1.8.0",
            "types": ""
        },
        "viewer": {
            "enabled": "yes",
            "installed_version": "1.2.0",
            "types": ""
        },
        "workflowengine": {
            "enabled": "yes",
            "installed_version": "2.0.0",
            "types": "filesystem"
        }
    }
}