Object Storage replicator deamon start fails

Bug #996944 reported by Marco CONSONNI
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
openstack-manuals
Fix Released
Medium
Tom Fifield

Bug Description

I'm installing swift following instructions here http://docs.openstack.org/trunk/openstack-compute/install/content/installing-and-configuring-storage-nodes.html.

At step 9, all the commands aimed to start replicator daemons (e.g. swift-init object-replicator start) fail with a traceback like the following:

root@nova-controller:~# swift-init object-replicator start
Starting object-replicator...(/etc/swift/object-server.conf)
Traceback (most recent call last):
  File "/usr/bin/swift-object-replicator", line 23, in <module>
    run_daemon(ObjectReplicator, conf_file, **options)
  File "/usr/lib/python2.7/dist-packages/swift/common/daemon.py", line 88, in run_daemon
    klass(conf).run(once=once, **kwargs)
  File "/usr/lib/python2.7/dist-packages/swift/obj/replicator.py", line 239, in __init__
    self.object_ring = Ring(join(self.swift_dir, 'object.ring.gz'))
  File "/usr/lib/python2.7/dist-packages/swift/common/ring/ring.py", line 51, in __init__
    self._reload(force=True)
  File "/usr/lib/python2.7/dist-packages/swift/common/ring/ring.py", line 56, in _reload
    ring_data = pickle.load(GzipFile(self.pickle_gz_path, 'rb'))
  File "/usr/lib/python2.7/gzip.py", line 89, in __init__
    fileobj = self.myfileobj = __builtin__.open(filename, mode or 'rb')
IOError: [Errno 2] No such file or directory: '/etc/swift/object.ring.gz'

As far as I understand, this is due to the fact that "ring files" (e.g. object.ring.gz) are created by the sequence of commands:

swift-ring-builder object.builder create 18 3 # create object.builder file
swift-ring-builder account.builder add z<ZONE>-<STORAGE_LOCAL_NET_IP>:6002/<DEVICE> 100 # add ring participant
swift-ring-builder object.builder rebalance # create object.ring.gz file

(Please note that the last command is the one that really creates the ring.gz file)

This sequence is described only *after* the command that fails (see http://docs.openstack.org/trunk/openstack-compute/install/content/installing-and-configuring-the-proxy-node.html).

In my understanding, the sequence that starts the daemons could be moved after the sequence aimed to create the ring and it would be useful to specify that *.ring.gz files are to be copied "to all the account server nodes in your Swift environment, and put them in the /etc/swift directory on these nodes.", as reported here http://swift.openstack.org/admin_guide.html (at paragraph "Scripting Ring Creation", bullet 3).

Tags: swift
Anne Gentle (annegentle)
Changed in openstack-manuals:
status: New → Triaged
importance: Undecided → Medium
Tom Fifield (fifieldt)
tags: added: swift
Tom Fifield (fifieldt)
Changed in openstack-manuals:
assignee: nobody → Tom Fifield (fifieldt)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-manuals (master)

Fix proposed to branch: master
Review: https://review.openstack.org/11614

Changed in openstack-manuals:
status: Triaged → In Progress
Revision history for this message
Tom Fifield (fifieldt) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-manuals (master)

Reviewed: https://review.openstack.org/11614
Committed: http://github.com/openstack/openstack-manuals/commit/6437918326735717a037361cf4f2069ee72713a8
Submitter: Jenkins
Branch: master

commit 6437918326735717a037361cf4f2069ee72713a8
Author: Tom Fifield <email address hidden>
Date: Sun Aug 19 12:24:35 2012 +1000

    doc swift service start issues with no ring

    fixes bug 996944

    As in the bug report, users following this guide exactly
    will encounter a failed service start at this point in the
    manual. This isn't a big problem - the ring files just need to be
    copied first.

    Rather than significantly changing the flow of the docs, this change
    adds a simple warning so that first-time users aren't alarmed.

    Change-Id: Ibaff34a14e7d82f674b6fe9b47923f7465d8825b

Changed in openstack-manuals:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.