Migrate.sh to swift "No module named rados"

Attempting ./migrate.sh from a local data setup to an OpenStack Swift backend.
This is a test configuration. The local data is nearly empty except the default “My Library” created in the admin account by login in once to that account.

If I overwrite my seafile.conf with the one properly setup for Swift, .seaf-fsck.sh properly says there is one commit missing and no backups to revert to (which is expected: the data on swift is empty, while the database has knowledge of some data, which currently are only stored locally).

If I put back my initial seafile.conf, .seaf-fsck.sh properly says all is ok. All seems fine to proceed with the migration.

So I place my swift seafile.conf on /opt/seafile, while leaving the local one on /opt/seafile/conf and run ./migrate.sh /opt/seafile, leading to:

Traceback (most recent call last):
  File "/opt/seafile/seafile-pro-server-6.1.9/migrate.py", line 8, in <module>
    import rados
ImportError: No module named rados
Done.

I guess whatever python-related things which got installed during seafile pro setup is missing something. But have no experience to identify what exactly and how to get it / set it up. This is Debian 8 by the way. Default install, and Seafile Pro was setup (without license, so 3 users, this is a test environment) using the seafile_debian.sh script. Then a new seafile.conf was built for the swift backend configuration.

Would someone have some hint at what to check for / and do?
Thanks!

Alternatively, is there a way to ‘wipe’ the database just as if the installation had just been done and admin user did not even log in a first time (so I assume his/her My Library has not yet been auto-created)? At this point, I’m more interested in stress-testing the Seafile ‘on Swift’ configuration, than actually migrate the default admin’s ‘My Library’. For my production server, which has to be migrated to another data center also, I think I’ll go the way of configuring my new production setup using Swift as a backup-server for the original one and switch users to the new one when backup complete.

Well, ‘apt-get install python-ceph’ solves the missing rados module and ./migrate.sh now starts. That is fixed, though my Swift backend setup is probably wrong or somehow not right for compatibility with OpenStack Swift as exposed by ovh.com. I get these kind of errors (and nothing is, properly, done):

[fs] Failed to check object b88ab96740ef53249b9d21fb3fa28050842266ba existence from repo f8baadf00d8c-dada-dodo-9032-6baadf00da6ce7

Get those too on commits and blocks. I interpret this as authentication has been successful, but somehow the right URL to access the containers has not been properly deducted from the long catalog the authentication server returns.

How can I gather more documentation on the exact usage made of each parameters in sections [xxx_backend] in seafile.conf? I fear the way to select the right container URLs from the catalog info based on the region might be wrong, or not doing exactly what I think it does…

[block_backend]
name = swift
tenant = yourTenant (looks like wants TenantName and not TenantID)
user_name = user
password = secret
container = seafile-blocks
auth_host = 192.168.56.31:5000
auth_ver = v2.0
region = yourRegion 
memcached_options = --SERVER=192.168.1.134:11211 --POOL-MIN=10 --POOL-MAX=100

Any previous experience you would like to share, I’m all ears. :slight_smile:
Thanks!

Actually you don’t need lib ‘rados’ in OpenStack Swift backend, you can simply comment #import rados in migrate.py, this issue has been fixed in seafile v6.1.9-pro.