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

[files_external] swift tests #14077

Merged
merged 7 commits into from
Nov 20, 2015
Merged

[files_external] swift tests #14077

merged 7 commits into from
Nov 20, 2015

Conversation

MorrisJobke
Copy link
Contributor

I just gave this a try, but I guess someone with more knowledge about Swift should have a look.

There seem to be some authentication problems. Is this url parameter the URL for getting the authentication?

In the README of the docker container it is used like this:

vagrant@host1:~$ swift -A http://127.0.0.1:12345/auth/v1.0 -U test:tester -K testing stat
       Account: AUTH_test
    Containers: 0
       Objects: 0
         Bytes: 0
  Content-Type: text/plain; charset=utf-8
   X-Timestamp: 1402463864.77057
    X-Trans-Id: tx4e7861ebab8244c09dad9-005397e678
X-Put-Timestamp: 1402463864.77057

(-A to specify the URL for the authentication token retrieval, -U for user and -K for the key)

Is this then the correct syntax in our files_external code?

cc @butonic @DeepDiver1975

'key'=>'$password',
'bucket'=>'swift',
'region' => 'DFW',
);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

THe above lines are the ones where I'm not sure if I did that correct.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DeepDiver1975 DeepDiver1975 modified the milestones: 8.1-current, 8.2-next Mar 2, 2015
@PVince81
Copy link
Contributor

PVince81 commented Sep 1, 2015

What's the status ?

@MorrisJobke
Copy link
Contributor Author

What's the status ?

Needs further work, because I didn't figured out how to connect from ownCloud to swift ... maybe @Xenopathic can help here.

Maybe we can use the ceph/demo docker container that also exposes swift.

@RobinMcCorkell RobinMcCorkell self-assigned this Sep 1, 2015
@RobinMcCorkell
Copy link
Member

So, it turns out the PHP library we use to connect to Swift only supports Keystone authentication (v2), not Swift built-in authentication (v1), which the current Docker image and Ceph support. It will be possible to get Keystone integrated with Ceph, but it could take some time...

@butonic
Copy link
Member

butonic commented Sep 9, 2015

@MorrisJobke nope. swift with ceph wont work because the libs we use don't support Keystone v1.

@Xenopathic I think time would be better invested in a devstack docker container. see https://wiki.openstack.org/wiki/Docker ... it seems several people are trying this: https://hub.docker.com/search/?q=devstack&page=1&isAutomated=0&isOfficial=0&starCount=0&pullCount=0

@RobinMcCorkell
Copy link
Member

@butonic With a bit of luck, setting up Keystone and connecting it to Ceph should be relatively straight-forward. Hopefully, I can avoid needing a MySQL database...: http://ceph.com/docs/master/radosgw/keystone/

@butonic
Copy link
Member

butonic commented Sep 9, 2015

@Xenopathic AFAIU you need to set up an openstack instance with keystone to make ceph hand over auth to that service. So ... twice the trouble. But please prove me wrong ;)

@RobinMcCorkell
Copy link
Member

@butonic Sorry to break the bad news, but I just got Keystone working with Ceph without needing the whole OpenStack full-stack. I nearly swallowed my own tongue when the little green dot appeared...

@scrutinizer-notifier
Copy link

A new inspection was created.

@RobinMcCorkell
Copy link
Member

@MorrisJobke @butonic Get testing! The Docker image is available at https://hub.docker.com/r/xenopathic/ceph-keystone/, and I have full intentions of creating an S3 test around the same image.

@MorrisJobke
Copy link
Contributor Author

I nearly swallowed my own tongue when the little green dot appeared...

? Jenkins needs to be configured to actually run this one ;)

@RobinMcCorkell
Copy link
Member

@MorrisJobke No, in the admin interface, manually configuring it to see if it actually worked. But I can guarantee that Jenkins will fail, since one of the tests fails on Swift (good we've got unit testing now!)

@RobinMcCorkell
Copy link
Member

@icewind1991 @MorrisJobke @butonic Review?

Note that the tests actually fail at the moment (two failures), but the tests do run, so this PR can be considered successful.

@MorrisJobke
Copy link
Contributor Author

Can we reuse the objectstore primary test setup here somehow? cc @Xenopathic @butonic

@RobinMcCorkell
Copy link
Member

@MorrisJobke The start/stop scripts are ever so slightly different, it might not be worth trying to combine them. These files are unlikely to change much, and when they do we can just port changes between them.

BTW, I've added you as a collaborator on the xenopathic/ceph-keystone image, so if any changes need to be made you can make them directly 😄

@RobinMcCorkell
Copy link
Member

Can we get this retested and merged?

@MorrisJobke
Copy link
Contributor Author

Docker logs:

docker logs -f aac
creating /etc/ceph/ceph.client.admin.keyring
creating /etc/ceph/ceph.mon.keyring
monmaptool: monmap file /etc/ceph/monmap
monmaptool: set fsid to 8ab4d030-204c-4627-b073-3c9bf6fd39e5
monmaptool: writing epoch 0 to /etc/ceph/monmap (1 monitors)
creating /tmp/ceph.mon.keyring
importing contents of /etc/ceph/ceph.client.admin.keyring into /tmp/ceph.mon.keyring
importing contents of /etc/ceph/ceph.mon.keyring into /tmp/ceph.mon.keyring
ceph-mon: set fsid to 8ab4d030-204c-4627-b073-3c9bf6fd39e5
ceph-mon: created monfs at /var/lib/ceph/mon/ceph-aacb8faf079a for mon.aacb8faf079a
set pool 0 size to 1
0
2015-11-04 15:39:54.405959 7f6c59cf2900 -1 journal FileJournal::_open: disabling aio for non-block journal.  Use journal_force_aio to force use of aio anyway




2015-11-04 15:39:56.372399 7f6c59cf2900 -1 journal FileJournal::_open: disabling aio for non-block journal.  Use journal_force_aio to force use of aio anyway
2015-11-04 15:39:56.399258 7f6c59cf2900 -1 filestore(/var/lib/ceph/osd/ceph-0) could not find 23c2fcde/osd_superblock/0//-1 in index: (2) No such file or directory
2015-11-04 15:39:57.550100 7f6c59cf2900 -1 created object store /var/lib/ceph/osd/ceph-0 journal /var/lib/ceph/osd/ceph-0/journal for osd.0 fsid 8ab4d030-204c-4627-b073-3c9bf6fd39e5
add item id 0 name 'osd.0' weight 1 at location {host=aacb8faf079a,root=default} to crush map
starting osd.0 at :/0 osd_data /var/lib/ceph/osd/ceph-0 /var/lib/ceph/osd/ceph-0/journal
starting osd.0 at :/0 osd_data /var/lib/ceph/osd/ceph-0 /var/lib/ceph/osd/ceph-0/journal
pool 'cephfs_data' created
pool 'cephfs_metadata' created
new fs with metadata pool 2 and data pool 1
2015-11-04 15:40:04.905476 7fa7e97cf800 -1 deprecation warning: MDS id 'mds.0' is invalid and will be forbidden in a future version.  MDS names may not start with a numeric digit.
starting mds.0 at :/0

autotest logs:

Status: Image is up to date for xenopathic/ceph-keystone:latest
xenopathic/ceph-keystone container: aacb8faf079a91a7d793cf304777a16009d072a24481b905ed8100dc4751084e
Waiting for ceph initialization............................................................
[ERROR] Waited 60 seconds, no response
stop: stop-swift-ceph.sh
Docker executable found - stop and remove docker containers
Stopping and removing docker container aacb8faf079a91a7d793cf304777a16009d072a24481b905ed8100dc4751084e
Error response from daemon: Cannot destroy container aacb8faf079a91a7d793cf304777a16009d072a24481b905ed8100dc4751084e: Driver btrfs failed to remove root filesystem aacb8faf079a91a7d793cf304777a16009d072a24481b905ed8100dc4751084e: Failed to destroy btrfs snapshot: directory not empty
Error: failed to remove containers: [aacb8faf079a91a7d793cf304777a16009d072a24481b905ed8100dc4751084e]
rm: das Entfernen von „./../apps/files_external/tests//config.swift.php“ ist nicht möglich: Datei oder Verzeichnis nicht gefunden
skip: start-webdav-ownCloud.sh

@RobinMcCorkell
Copy link
Member

Is this that btrfs loopback thing with Ceph again?

@MorrisJobke
Copy link
Contributor Author

Is this that btrfs loopback thing with Ceph again?

Could be.

@PVince81
Copy link
Contributor

Almost there:

Configuration read from /srv/www/htdocs/owncloud/tests/phpunit-autotest-external.xml

S................................................................ 65 / 73 ( 89%)
........

Time: 33.12 seconds, Memory: 24.00Mb

There was 1 skipped test:

1) Test\Files\Storage\Swift::testStat
Swift doesn't update the parents folder mtime

/srv/www/htdocs/owncloud/apps/files_external/tests/backends/swift.php:64

OK, but incomplete, skipped, or risky tests!
Tests: 73, Assertions: 323, Skipped: 1.
stop: stop-swift-ceph.sh
Docker executable found - stop and remove docker containers
Stopping and removing docker container 2659814329cba585215a939126e57e871b967ba95387d6bda99496ec86e35882
Error response from daemon: Cannot destroy container 2659814329cba585215a939126e57e871b967ba95387d6bda99496ec86e35882: Driver btrfs failed to remove root filesystem 2659814329cba585215a939126e57e871b967ba95387d6bda99496ec86e35882: Failed to destroy btrfs snapshot: directory not empty
Error: failed to remove containers: [2659814329cba585215a939126e57e871b967ba95387d6bda99496ec86e35882]
skip: start-webdav-ownCloud.sh

Tests passed, there was just an issue when cleaning up. Might not be critical.
This is with a BTRFS file system on the host.

@PVince81
Copy link
Contributor

The error code is still 0, so if this is run on CI it would like interpret it as a success.

  • TEST: ./autotest-external.sh sqlite swift-ceph
  • TEST: ./autotest-external.sh sqlite amazons3-ceph

👍 from me

@icewind1991
Copy link
Contributor

👍 looks good

@RobinMcCorkell
Copy link
Member

@MorrisJobke Please confirm if we need to port the Btrfs thing into this branch?

@icewind1991
Copy link
Contributor

Improved the command to get the ip for the swift container

@MorrisJobke
Copy link
Contributor Author

@MorrisJobke Please confirm if we need to port the Btrfs thing into this branch?

It doesn't work here directly but I need to investigate further because the startup of the container looks good (It needed a longer time to start than 60 seconds).

I would accept this, if this runs fine on Jenkins. @DeepDiver1975 Can you setup the CI run for this? Thanks

@PVince81
Copy link
Contributor

Can we move this forward ? There are at least 4 improvement PRs for SWIFT that are waiting for these tests.

@MorrisJobke
Copy link
Contributor Author

I'm fine with merging. @DeepDiver1975 The CI job shouldn't be that hard to setup, right? 😉

@DeepDiver1975
Copy link
Member

I'm fine with merging. @DeepDiver1975 The CI job shouldn't be that hard to setup, right? 😉

no

@MorrisJobke
Copy link
Contributor Author

no

Then please merge ;)

DeepDiver1975 added a commit that referenced this pull request Nov 20, 2015
@DeepDiver1975 DeepDiver1975 merged commit 308aaf8 into master Nov 20, 2015
@DeepDiver1975 DeepDiver1975 deleted the autotest-external-swift branch November 20, 2015 12:57
@lock lock bot locked as resolved and limited conversation to collaborators Aug 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants