Error reading old-style pickled ring upgrading from 1.7 to 1.10

Bug #1248919 reported by Juan J. Martínez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
Fix Released
Undecided
Juan J. Martínez

Bug Description

I'm running 1.7.4 SAIO (Swift All In One) in Debian Squeeze and when I upgrade to 1.10.0 I get this error when different components try to load the ring:

Traceback (most recent call last):
  File "/usr/bin/swift-container-replicator", line 23, in <module>
    run_daemon(ContainerReplicator, conf_file, **options)
  File "/usr/lib/pymodules/python2.6/swift/common/daemon.py", line 110, in run_daemon
    klass(conf).run(once=once, **kwargs)
  File "/usr/lib/pymodules/python2.6/swift/common/db_replicator.py", line 159, in __init__
    self.ring = ring.Ring(swift_dir, ring_name=self.server_type)
  File "/usr/lib/pymodules/python2.6/swift/common/ring/ring.py", line 141, in __init__
    self._reload(force=True)
  File "/usr/lib/pymodules/python2.6/swift/common/ring/ring.py", line 164, in _reload
    self._rebuild_tier_data()
  File "/usr/lib/pymodules/python2.6/swift/common/ring/ring.py", line 184, in _rebuild_tier_data
    for tier in tiers_for_dev(dev):
  File "/usr/lib/pymodules/python2.6/swift/common/ring/utils.py", line 26, in tiers_for_dev
    t1 = dev['region']
KeyError: 'region'

(in this example, swift-container-replicator)

I don't know if this upgrade path is supported (1.7 to 1.10), and this cluster has been upgraded several time (I think first version was Bexar!), but the problem can be fixed easily with the attached patch (applies to 1.10.0).

UPDATE: seems that the problem is when loading an old-style pickled ring.

Tags: upgrade
Revision history for this message
Juan J. Martínez (jjmartinez) wrote :
Revision history for this message
Juan J. Martínez (jjmartinez) wrote :

Uploaded the patch for review: https://review.openstack.org/#/c/55536/

Revision history for this message
Juan J. Martínez (jjmartinez) wrote :

devs in ring_data in 1.7 are:

[{'zone': 1, 'weight': 1.0, 'ip': '127.0.0.1', 'id': 0, 'meta': '', 'device': 'device1', 'port': 6010}, {'zone': 2, 'weight': 1.0, 'ip': '127.0.0.1', 'port': 6020, 'meta': '', 'device': 'device1', 'id': 1}, {'zone': 3, 'weight': 1.0, 'ip': '127.0.0.1', 'id': 2, 'meta': '', 'device': 'device1', 'port': 6030}, {'zone': 4, 'weight': 1.0, 'ip': '127.0.0.1', 'port': 6040, 'meta': '', 'device': 'device1', 'id': 3}, {'zone': 5, 'weight': 1.0, 'ip': '127.0.0.1', 'id': 4, 'meta': '', 'device': 'device1', 'port': 6050}]

With no region or replication information.

Changed in swift:
assignee: nobody → Juan J. Martínez (jjmartinez)
Changed in swift:
status: New → In Progress
summary: - Error reading ring upgrading from 1.7 to 1.10
+ Error reading old-style pickled ring upgrading from 1.7 to 1.10
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to swift (master)

Reviewed: https://review.openstack.org/55536
Committed: http://github.com/openstack/swift/commit/845b8beeb5d7b32fce66e6e9100d232970dcc595
Submitter: Jenkins
Branch: master

commit 845b8beeb5d7b32fce66e6e9100d232970dcc595
Author: Juan J. Martinez <email address hidden>
Date: Thu Nov 7 11:36:55 2013 +0000

    Default region loading an old-style pickled ring

    This is to support upgrades from swift < 1.8 using old-style pickled
    rings to 1.10. Old-style pickled rings won't have region information.

    Change-Id: I18b2acba3d346e41def9d25d3d4dbd12705e5375
    Closes-Bug: #1248919

Changed in swift:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to swift (feature/ec)

Fix proposed to branch: feature/ec
Review: https://review.openstack.org/59766

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to swift (feature/ec)
Download full text (43.6 KiB)

Reviewed: https://review.openstack.org/59766
Committed: http://github.com/openstack/swift/commit/239f88a42b00a71a07860f953d00771c8aef4305
Submitter: Jenkins
Branch: feature/ec

commit 8a64bff2dc28b43b3ed4fa7b65da1a9ea29677cc
Author: Samuel Merritt <email address hidden>
Date: Wed Nov 27 17:23:59 2013 -0800

    Report transaction ID in failure exceptions

    This way, when something fails in Jenkins, you have some chance of
    searching the logs for the relevant transaction.

    Change-Id: I3cf606cb4963e32b5c6ac3deda08e73541b3ff7d

commit e0147e60d800fd67bc05bc4299c315f1761bd60b
Author: Peter Portante <email address hidden>
Date: Fri Nov 22 16:59:09 2013 -0500

    Add a unit test to verify proxy logging fields

    Also bring unit test coverage to 100% (well, at least every line is
    reported as "covered").

    Change-Id: I659d0c02008368897b1307a7a5c9aaba73b80588
    Signed-off-by: Peter Portante <email address hidden>

commit 87cd5598476d0835c526918a9e1f03fe2d698866
Author: Alex Gaynor <email address hidden>
Date: Sun Nov 24 20:24:45 2013 -0600

    Account for a platform difference in semaphores

    On OS X (and probably other Operating Systems) it isn't possible to
    introspect the value of a semaphore. Account for this by skipping a
    test about this.

    Change-Id: I97824f9fc4e36de4f7a62c8ce53865e6977dfdfe

commit 3c7c355120a3ebe5c3f47e62176cec8cab824143
Author: Peter Portante <email address hidden>
Date: Mon Nov 25 13:30:41 2013 -0500

    Use TCP_NODELAY for created sockets.

    Mark Seger at HP has been looking at small objects, 1 and 2 KB size,
    and with Rick Jones' help noticed that TCP protocol traces showed
    effects from the Nagel algorithm client-to-server and
    server-to-client.

    This patch just addresses our WSGI server responses, but does not
    address out-bound connections from the various servers.

    Change-Id: I11f86df1f56fba1c6ab6084dc1f580c395f072dc
    Signed-off-by: Peter Portante <email address hidden>

commit 39032c359f01a5e397fce2eb8326b961c9673607
Author: Darrell Bishop <email address hidden>
Date: Wed Nov 27 12:07:42 2013 -0500

    Add HTML reporting for test branch coverage.

    When including branch coverage results, also generate HTML reports into
    a "cover" subdirectory under the directory in which .unittests resides
    (i.e. known location at the top of the swift tree).

    Change-Id: I493d74f38755f7bf0d7043052585efb27840b238

commit 0ba071f27c009e1d028189e812f722e8583a07ee
Author: Darrell Bishop <email address hidden>
Date: Tue Nov 26 15:08:13 2013 -0500

    Fix bug in obj updater run_once().

    The "not" in front of the ismount() call got accidentally dropped in a
    recent change. This patch adds it back along with a few more tests.

    Note that this bug only showed up on an SAIO during probe tests because
    I used actually-mounted (virtual) "disks". So keep that in mind when
    building SAIOs for development/testing.

    Change-Id: Ia193f3c4b73203605954036863575c22ddab6b03

commit edc9f62ed6c537c4c112cf552310705b99fa08b8
Author: Peter Portante <peter.portante@redha...

Changed in swift:
milestone: none → 1.11.0
Thierry Carrez (ttx)
Changed in swift:
status: Fix Committed → 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.