Adding Openstack objectstore on Nextcloud 15

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version 15
Operating system and version Ubuntu 16.04
PHP version (eg, 7.0):

The issue you are facing:

I’m trying to add openstack v2.0 objectstorage, without any succes. I am using the GUI, openstack v2 gives a red explanation-point-icon.

It should be enough, no firewall issues. Is there any other config file I should edit?

Is this the first time you’ve seen this error? (Y/N): Y

I just installed the product, never used it before.

The output of your Nextcloud log in Admin > Logging:

[files_external] Error: OCP\Files\StorageBadConfigException: Storage incomplete configuration. API Key or password, Username, Bucket and Region have to be configured. at <<closure>>

 0. /var/www/nextcloud/apps/files_external/lib/Service/StoragesService.php line 510
    __construct({service_name: " ... "})
 1. /var/www/nextcloud/apps/files_external/lib/Service/StoragesService.php line 476
    getRustyStorageIdFromConfig(OCA\Files_External\Lib\StorageConfig {})
 2. /var/www/nextcloud/apps/files_external/lib/Controller/StoragesController.php line 330
    removeStorage(2)
 3. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 166
    destroy(2)
 4. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 99
    executeController(OCA\Files_Extern ... {}, "destroy")
 5. /var/www/nextcloud/lib/private/AppFramework/App.php line 118
    dispatch(OCA\Files_Extern ... {}, "destroy")
 6. /var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php line 47
    main("OCA\\Files_Exte ... r", "destroy", OC\AppFramework\ ... {}, {id: "2",_route: ... "})
 7. <<closure>>
    __invoke({id: "2",_route: ... "})
 8. /var/www/nextcloud/lib/private/Route/Router.php line 297
    call_user_func(OC\AppFramework\ ... {}, {id: "2",_route: ... "})
 9. /var/www/nextcloud/lib/base.php line 987
    match("/apps/files_external/globalstorages/2")
10. /var/www/nextcloud/index.php line 42
    handleRequest()

DELETE /apps/files_external/globalstorages/2
from 194.13.133.3 by admin at 2019-01-02T11:36:39+00:00

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

$CONFIG = array (
  'instanceid' => 'ocwgkrp39w27',
  'passwordsalt' => '',
  'secret' => '',
  'trusted_domains' => 
  array (
    0 => 'cloud.*****l',
  ),
  'datadirectory' => '/var/www/nextcloud/data',
  'dbtype' => 'pgsql',
  'version' => '15.0.0.10',
  'overwrite.cli.url' => 'https://cloud********',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost:5432',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'admin',
  'dbpassword' => '',
  'installed' => true,
  'mail_domain' => '',
  'mail_from_address' => 'noreply',
  'mail_smtpmode' => 'smtp',
  'mail_smtphost' => '',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_sendmailmode' => 'smtp',
  'mail_smtpauth' => 1,
  'mail_smtpport' => '587',
  'mail_smtpname' => '',
  'mail_smtppassword' => '',

According to your config.php file you have no Bucket or anything configured. Could you show a print screen of what you have configured in the NC web ui?

I assume you have set up api tokens etc. in Openstack already for NC to write to buckets etc?

If you configured it correctly, you should be able to something like this in your config.php file:

‘objectstore’ =>
array (
‘class’ => ‘OC\Files\ObjectStore\Swift’,
‘arguments’ =>
array (
‘username’ => ‘USERNAME_SET_IN_OPENSTACK’,
‘password’ => ‘PASSWORD_GENERATED_OPENSTACK’,
‘container’ => ‘CONTAINER_NAME’,
‘autocreate’ => true,
‘region’ => ‘RegionOne’,
‘url’ => ‘http://KEYSTORE_URL:5000/v2.0’,
‘tenantName’ => ‘admin’,
‘serviceName’ => ‘swift’,
),
),

Hans,

I’m using the GUI.

I don see the entry on my config.php

Do I need to edit the config.php manually?

What happens when you click that little correct mark next to the three dots on the right hand side? Normally that tests the settings to see whether it can auth to keystone to write to the specified bucket.
You can just use the gui, then those settings should show up in config.php AFAIK.

Hans,

I’m using the gui (printscreen added)

in openstack I created a new container, see printscreen2 (XQ6SUZ)

the explanation point in red, no added lines on the config.php

It does the same… it checks the setting and return a red explanation
point.

I keep reading about bucket, i think it’s the same as container on
openstack? because we can create buckets on openstack, only
container…so it’s an objectstore.

when i remove or change the regioncode or bucket (according to the
manual the bucket isn’t mandatory on swift) I still get the same
results.

Could you try adding your config to config.php like in my previous post, just adding your details? See if that works?

Hi Hans,

done that already, if I do that the website crashes.

for tenantname, I tried the projectID aswell as the projectname.

I added this to the config.php:

‘objectstore’ =>
array (
‘class’ => ‘OC\Files\ObjectStore\Swift’,
‘arguments’ =>
array (
‘username’ => ‘nextcloud_user’,
‘password’ => ‘’,
‘container’ => ‘nextcloud_container’,
‘autocreate’ => true,
‘region’ => ‘RegionOne’,
‘url’ => ‘https://identity.stack.cloudvps.com/v2.0’,
‘tenantName’ => ‘fbf14702738648acb2ce1ce49aedc6ed’,
‘serviceName’ => ‘swift’,
),
),
);

This may be very stupid, but have you tried adding it as an admin user? Just to check whether it has full read/write access? Maybe it is trying to write something to the container, but can’t due to permissions?

Sorry, it has been a while since I have tried to add Openstack to NC, so I can only refer you to what I did way back then to get this up and running.

Hans,

the objectstore has only one account, nextcloud_user, having role swift operator.

when using rclone with the same credentials, the connection works fine.

when connecting to the openstack admin site, the credentials also work.

other apps installed on this server, don’t have these connection problems.

config.php:

-rw-r----- 1 www-data www-data 943 jan 7 07:38 config.php

**root@****taiga**:**/var/www/nextcloud**# sudo -u www-data php occ files_external:list

<img src='/uploads/default/original/2X/0/0def6944dd7c0330ba33d3fe0a5c0a24bee6cad7.png' width='977' height='453'>

That tells me it is missing a value for some/all of the parameters.

The tenantname I used way-back-when was the admin user defined in Openstack itself. Not the admin user for NC, if that makes sense.

The only way for me to further be able to help you, is if you were to create a test user on your Openstack instance which I could possibly add a POC instance of my own to, to see what happens. The initial error you posted, tells me that NC is not able to write to the container due to a lack of authorization. I understand what you wrote in the last post, but I think one of the settings are just not adding up.

problem is solved, the region code. The API doesn use the specific zone, but the generic zone.

Hi,

My version is Nextcloud 16.0.6, and I cannot add open stack v3 as external storage in external storages app.

I am sure that all my information has been entered correctly, but it still cannot be added as external storage.

Can you help me?

Hello there.

I have the exact same issue. I’m trying to add on OVH Openstack Swift (using api v3) on my fresh new nextcloud instance and it still give me the red dot.

I can’t find anylog about that, and in the network i can see this:

{
“id”: 1,
“mountPoint”: “/ARCHIVE”,
“backend”: “swift”,
“authMechanism”: “openstack::openstackv3”,
“backendOptions”: {
“service_name”: “swift”,
“region”: “GRA3”,
“bucket”: “ARCHIVENEXTCLOUD”,
“timeout”: “”,
“user”: “xxx”,
“domain”: “default”,
“password”: “xxx”,
“url”: “https://auth.cloud.ovh.net/v3”,
“tenant”: “xxx”
},
“priority”: 100,
“applicableGroups”: [“admin”],
“mountOptions”: {
“encrypt”: true,
“previews”: true,
“enable_sharing”: true,
“filesystem_check_changes”: 1,
“encoding_compatibility”: false,
“readonly”: false
},
“status”: 1,
“userProvided”: false,
“type”: “system”
}

Anyone?