swiftonfile doesn't work on Liberty storage node?

Asked by Gregory Touretsky

I've installed a Swift cluster (1 proxy + 2 storage nodes) as described in http://docs.openstack.org/liberty/install-guide-ubuntu/swift.html
After that I've installed additional storage node with a single XFS volume mounted as /srv/swiftonfiles/vol1, and installed swiftonfile as described in https://github.com/openstack/swiftonfile/blob/master/doc/markdown/quick_start_guide.md

My Swift cluster now has 2 storage policies:
/etc/swift# swift info | grep policie
  policies: [{u'default': True, u'name': u'Policy-0'}, {u'name': u'swiftonfile'}]

However, when I create a container with policy:1 (swiftonfile) and upload an object to this container it doesn't use swiftonfile placement. Instead, it goes with usual Swift naming:

/etc/swift# swift post sofContainer -H 'X-Storage-Policy: swiftonfile'
/etc/swift# swift upload sofContainer /tmp/SOFfile
tmp/SOFfile

/etc/swift# ls /srv/swiftonfiles/vol1/objects-1/0/548/6d2570fff0be730c3e439acdd384a548/1449207264.75529.data
/srv/swiftonfiles/vol1/objects-1/0/548/6d2570fff0be730c3e439acdd384a548/1449207264.75529.data

I expected the object to appear as /srv/swiftonfiles/vol1/AUTH_test/sofContainer/tmp/SOFfile

Configuration:
---------------------------------------------------
cat /etc/swift/object-server.conf
[DEFAULT]
bind_ip = 172.16.83.201
bind_port = 6050
devices = /srv/swiftonfiles
mount_check = false
max_clients = 1024
workers = 1
disable_fallocate = true

[pipeline:main]
pipeline = object-server

[app:object-server]
use = egg:swift#object
user = swift
log_facility = LOG_LOCAL2
log_level = DEBUG
log_requests = on
disk_chunk_size = 65536

[object-replicator]

[object-updater]

[object-auditor]

---------------------------------------------------
cat /etc/swift/swift.conf
[swift-hash]
swift_hash_path_suffix = XXXXX
swift_hash_path_prefix = XXXXX

[storage-policy:0]
name = Policy-0
default = yes

[storage-policy:1]
name = swiftonfile

[swift-constraints]
---------------------------------------------------

Did I miss anything in the configuration?
Thanks in advance,
   Gregory Touretsky

Question information

Language:
English Edit question
Status:
Answered
For:
swiftonfile Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Gregory Touretsky (gtouretsky) said :
#1

Reading again your installation guide - it looks like it should work for SAIO as opposed to normal setup which I'm using.
Do you have a recommendation how to SwiftOnFile with a regular Liberty deployment?

Revision history for this message
Gregory Touretsky (gtouretsky) said :
#2

ok, I found an issue in my configuration - I changed
[app:object-server]
use = egg:swiftonfile#object

After that, and attempt to put an object to Swiftonfile still has failed:
Dec 7 10:02:57 gtouret-sw4 object-server: ERROR __call__ error with PUT /vol1/1/AUTH_7c0ed552cae644908cb34faf8d4517d8/sofContainer3/tmp/SOFfile : #012Traceback (most recent call last):#012 File "/usr/lib/python2.7/dist-packages/swift/obj/server.py", line 955, in __call__#012 res = method(req)#012 File "/usr/lib/python2.7/dist-packages/swift/common/utils.py", line 2693, in wrapped#012 return func(*a, **kw)#012 File "/usr/lib/python2.7/dist-packages/swift/common/utils.py", line 1230, in _timing_stats#012 resp = func(ctrl, *args, **kwargs)#012 File "/root/swiftonfile/swiftonfile/swift/obj/server.py", line 80, in PUT#012 File "/usr/lib/python2.7/dist-packages/swift/common/utils.py", line 2693, in wrapped#012 return func(*a, **kw)#012 File "/usr/lib/python2.7/dist-packages/swift/common/utils.py", line 1230, in _timing_stats#012 resp = func(ctrl, *args, **kwargs)#012 File "/usr/lib/python2.7/dist-packages/swift/obj/server.py", line 551, in PUT#012 policy=policy, frag_index=frag_index)#012 File "/usr/lib/python2.7/dist-packages/swift/obj/server.py", line 201, in get_diskfile#012 device, partition, account, container, obj, policy, **kwargs)#012 File "/root/swiftonfile/swiftonfile/swift/obj/diskfile.py", line 226, in get_diskfile#012TypeError: __init__() got an unexpected keyword argument 'frag_index' (txn: tx41e1cb9908c049bc9fabc-0056653d35)

I commented out frag_index from the server.py - it works for my demo purposes now, but it certainly should be fixed in swiftonfile

 diff /usr/lib/python2.7/dist-packages/swift/obj/server.py /tmp/server.py
551,552c551
< policy=policy)
< # , frag_index=frag_index)
---
> policy=policy, frag_index=frag_index)

Revision history for this message
Prashanth Pai (ppai) said :
#3

Hi, currently swiftonfile 2.3.0 release is compatible with swift 2.3.0 (kilo)

We will create a swiftonfile 2.5.0 release compatible with swift 2.5.0 (liberty). This is expected to happen within two weeks.

Can you help with this problem?

Provide an answer of your own, or ask Gregory Touretsky for more information if necessary.

To post a message you must log in.