-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Swift as external storage fails in Nextcloud 12 #5882
Comments
Nextcloud version 12.0.0 installed via https://cloud.techandme.se/index.php/s/whxC00V1I0l4CY8 |
Hi, Steps to reproduce
Expected behaviourThe upload should succeed. Actual behaviour"Internal server error" is shown in browser Server configurationOperating system: Debian 9.1 Web server: Apache 2.4.25-3+deb9u2 Database: PostgreSQL PHP version: 7.0+49 Nextcloud version: 12.0.0 Updated from an older Nextcloud/ownCloud or fresh install: fresh install Where did you install Nextcloud from: tarball Signing status: Signing status
List of activated apps: App list
Nextcloud configuration: Config report
Are you using external storage, if yes which one: OpenStack Swift (OVH) Are you using encryption: no Are you using an external user-backend, if yes which one: none Client configurationBrowser: Firefox (v54.0.1) and Chrome (60.0.3112.78) Operating system: multiple OSes LogsWeb server error logWeb server error log
Nextcloud log (data/nextcloud.log)Nextcloud log
Browser logBrowser log
|
We have just noticed that when individual users mount Swift as external storage, it does work. So if as an admin, I allow users to mount Swift as external storage, and they do so, it will work for them. But if as an admin I mount Swift myself, all users see it, but it does not work. |
cc @icewind1991 |
The first issue described in this bug report is fixed through PR #6101 (don't know if it will be merged in release 12.0.3) but concerning the issue described by @jmdeboer-surfsara about the rights for mounting external storages I cannot tell. |
Hello, The first issue does not seem to be solved. Several reports seem to show it: Thank you |
I am using NC stable v13 on an up-to-date Debian 9 and I can confirm OVH S3 storage is working perfectly (modulo OVH random crashes). |
Hi @mirtouf , Could you share a screenshot of your external storage conf? Thank you |
Thank you for the info @mirtouf I am trying to understand what I did wrong here. |
Wow so I finally understood what I got wrong. The TENANT_NAME has to be used and it is indeed only showed in the OVH OpenStack File. I will comment the aforementioned forums for the other people who got it wrong. |
@icewind1991 @rullzer We did quite some changes in the more recent 12 and 13 releases. Could this one be solved as well? I guess trying those releases might be helpful. Also in the upcoming Nextcloud 14 we improved massively the swift support (especially v3): Just to reference some of the issues/PRs:
Let's close this for now. |
Swiftv3 should work as primary storage, but might need more work as external storage. Help is of course welcome and if you need this in your company, best contact support at our portal: portal.nextcloud.com (you should have received credentials with your customer onboarding email). |
Both External and primary storage work fine now for the OVH cloud hosting provider. For the record I opened a new issue about Openstack swift as a primary storage: 10737. |
@remidebette could you share the ENV Variable names that u used in the form i can't figure it out for v3 and nextcloud 15 |
Hi @frank-dspeed , my configuration has been working on swift v2 since Nextcloud 12. @jospoortvliet could you help us figure out what I do wrong? What I did is the following: #!/bin/bash
# To use an Openstack cloud you need to authenticate against keystone, which
# returns a **Token** and **Service Catalog**. The catalog contains the
# endpoint for all services the user/tenant has access to - including nova,
# glance, keystone, swift.
#
export OS_AUTH_URL=https://auth.cloud.ovh.net/v3/
export OS_IDENTITY_API_VERSION=3
export OS_USER_DOMAIN_NAME=${OS_USER_DOMAIN_NAME:-"Default"}
export OS_PROJECT_DOMAIN_NAME=${OS_PROJECT_DOMAIN_NAME:-"Default"}
# With the addition of Keystone we have standardized on the term **tenant**
# as the entity that owns the resources.
export OS_TENANT_ID=<__REDACTED__>
export OS_TENANT_NAME=<__REDACTED__>
# In addition to the owning entity (tenant), openstack stores the entity
# performing the action as the **user**.
export OS_USERNAME=<__REDACTED__>
# With Keystone you pass the keystone password.
echo "Please enter your OpenStack Password: "
read -sr OS_PASSWORD_INPUT
export OS_PASSWORD=$OS_PASSWORD_INPUT
# If your configuration has multiple regions, we set that information here.
# OS_REGION_NAME is optional and only valid in certain environments.
export OS_REGION_NAME="GRA3"
# Don't leave a blank variable, unset it if it was empty
if [ -z "$OS_REGION_NAME" ]; then unset OS_REGION_NAME; fi The swift v2 configuration that has worked for me in the last year is: <?php
$CONFIG = array (
'objectstore' =>
array (
'class' => 'OC\\Files\\ObjectStore\\Swift',
'arguments' =>
array (
'username' => '<OS_USERNAME from RC file>',
'password' => '<OS_PASSWORD>',
'container' => '<Bucket>',
'objectPrefix' => 'oid:urn:',
'autocreate' => true,
'region' => 'GRA3',
'url' => 'https://auth.cloud.ovh.net/v2.0/',
'tenantName' => '<OS_TENANT_NAME from RC file>',
'serviceName' => 'swift',
),
),
'trusted_domains' =>
array (
0 => '<__REDACTED__>',
1 => '<__REDACTED__>',
2 => '<__REDACTED__>',
),
'passwordsalt' => '<__REDACTED__>',
'secret' => '<__REDACTED__>',
'datadirectory' => '/var/www/nextcloud/data',
'overwrite.cli.url' => '<__REDACTED__>',
'dbtype' => 'pgsql',
'version' => '15.0.7.0',
'dbname' => 'nextcloud',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'dbuser' => '<__REDACTED__>',
'dbpassword' => '<__REDACTED__>',
'installed' => true,
'instanceid' => '<__REDACTED__>',
'logtimezone' => 'UTC',
'ldapIgnoreNamingRules' => false,
'ldapUserCleanupInterval' => '51',
'memcache.local' => '\\OC\\Memcache\\APCu',
'filelocking.enabled' => 'true',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
'host' => 'localhost',
'port' => 6379,
'timeout' => 0.0,
),
'appstore.experimental.enabled' => true,
'mail_smtpmode' => 'sendmail',
'mail_domain' => '<__REDACTED__>',
'mail_from_address' => 'admin',
'updater.release.channel' => 'stable',
'skeletondirectory' => '',
'trashbin_retention_obligation' => 'auto',
'enable_previews' => true,
'loglevel' => 1,
'ldapProviderFactory' => '\\OCA\\User_LDAP\\LDAPProviderFactory',
'htaccess.RewriteBase' => '/',
'maintenance' => false,
'updater.secret' => '<__REDACTED__>',
); The new swift v3 configuration I tried following this PR : 'objectstore' =>
array (
'class' => 'OC\\Files\\ObjectStore\\Swift',
'arguments' =>
array (
'user' => [
'name' => '<OS_USERNAME from RC file>',
'password' => '<OS_PASSWORD>',
'domain' => [
'name' => 'default',
]
],
'bucket' => '<Bucket>',
'objectPrefix' => 'oid:urn:',
'autocreate' => true,
'region' => 'GRA3',
'url' => 'https://auth.cloud.ovh.net/v3/',
'tenantName' => '<OS_TENANT_NAME from RC file>',
'serviceName' => 'swift',
),
), This is the final error I get when accessing my instance: I have no idea what the objectstore.user.domain.name should be in my case, removing it does not work either: |
Hello @remidebette , I facing to the exactly same problem, migrating from V2 to V3 keystone OpenStack version (OVH object storage too). The V2 endpoint will soon be down (deprecated), did you find a way to well works with V3 ? Thanks a lot 👍 |
Hi @BloodMotion I encountered problems as well , eventually found the solution ! 1/ My config in config/config.php :
2/ I also did this modification (commenting scope code in /lib/private/Files/ObjectStore/SwiftFactory.php) : Hope it helps |
Hi @Turbomortel ! Thanks a lot for that |
Hi @Turbomortel. Thanks a lot for the solution. I hadn't tried again since last year and that does the trick with OVH. |
Fixed via #19540 |
@Turbomortel, @remidebette do you have the information on which filed on OVH side need to go in which field of the Nextcloud GUI ? I appiied the modification of the patch from #19540 on my instance, but still no luck (I am on Nextcloud 17.0.6).
When I found out how to make it work, I'll update the documentation (cf. nextcloud/documentation#1846) |
Hi @doc75 , it has been a long time now, but my remembrance is: An important point is to use the OS_TENANT_NAME of OVH as stated here: #5882 (comment) Nothing worked for me for both config.php primary storage or Nextcloud UI secondary storage before I understood that. Also, sometimes the changes were not actually applied before I restarted the server and made sure the caches were cleaned. Make sure to do that between each iteration before stating your configuration is wrong. Does it solve you issue? |
@remidebette thanks for your feedback. It helped me in finding my mistake (it was the bad Service Name indeed). Here is the correct settings in the GUI for an external storage in OpenStack v3:
|
Steps to reproduce
Expected behaviour
The upload should succeed
Actual behaviour
"Internal server error" is shown in browser
"server replied: Internal Server Error (Could not rename part file to final file)" is shown in desktop client
Server configuration
Operating system: CentOS 7.2
Web server: Apache
Database: MySQL
PHP version: 7.0.20
Nextcloud version: 12.0.1 RC2 Build:2017-07-26T01:01:43+00:00
Updated from an older Nextcloud/ownCloud or fresh install: Fresh install
Where did you install Nextcloud from: Daily build tarball
Signing status:
Signing status
List of activated apps:
App list
Nextcloud configuration:
Config report
Are you using external storage, if yes which one: Openstack Swift
Are you using encryption: no
Are you using an external user-backend, if yes which one: None
Client configuration
Browser: Firefox, but also sync client
Operating system: Multiple
Logs
Web server error log
Web server error log
Nextcloud log (data/nextcloud.log)
Nextcloud log
The text was updated successfully, but these errors were encountered: