Regression in python2.7 SRU breaks python-cassandra

Bug #1603436 reported by Max Bowsher on 2016-07-15
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-cassandra-driver (Ubuntu)
Undecided
Unassigned
Xenial
High
Dimitri John Ledkov
Yakkety
Undecided
Unassigned
python2.7 (Ubuntu)
High
Dimitri John Ledkov
Xenial
Undecided
Dimitri John Ledkov
Yakkety
High
Dimitri John Ledkov

Bug Description

"SRU: backport python 2.7.12 to 16.04 LTS" (bug 1591895) has caused a regression in (at least) python-cassandra. Any attempt to connect to a cluster fails due to:

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/cassandra/cluster.py", line 1894, in _reconnect_internal
    return self._try_connect(host)
  File "/usr/lib/python2.7/dist-packages/cassandra/cluster.py", line 1921, in _try_connect
    self_weakref = weakref.ref(self, callback=partial(_clear_watcher, weakref.proxy(connection)))
TypeError: ref() does not take keyword arguments

It would appear that Python 2.7.12 has made the permitted calling conventions for weakref.ref() stricter.

See https://github.com/datastax/python-driver/pull/585 for upstream discussion of the issue.

tags: added: xenial
Changed in python2.7 (Ubuntu):
importance: Undecided → High
Changed in python2.7 (Ubuntu):
status: New → Confirmed
Dimitri John Ledkov (xnox) wrote :

Best course of action, imho, is to still take python SRU. But also backport the python-cassandra fix as an SRU.

Changed in python2.7 (Ubuntu Xenial):
assignee: nobody → Dimitri John Ledkov (xnox)
Changed in python2.7 (Ubuntu Yakkety):
assignee: nobody → Dimitri John Ledkov (xnox)
Changed in python2.7 (Ubuntu Yakkety):
status: Confirmed → Invalid
Changed in python-cassandra-driver (Ubuntu Yakkety):
status: New → Fix Released
Changed in python2.7 (Ubuntu Xenial):
status: New → Invalid
Changed in python-cassandra-driver (Ubuntu Xenial):
status: New → In Progress

Hello Max, or anyone else affected,

Accepted python-cassandra-driver into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/python-cassandra-driver/2.5.1-1ubuntu0.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in python-cassandra-driver (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed

The fix for this bug has been awaiting testing feedback in the -proposed repository for xenial for more than 90 days. Please test this fix and update the bug appropriately with the results. In the event that the fix for this bug is still not verified 15 days from now, the package will be removed from the -proposed repository.

tags: added: removal-candidate
Matthias Klose (doko) wrote :

please check the build in xenial-proposed. We won't rollback python2.7, so the way forward is to check the fixed cassandra package

Changed in python-cassandra-driver (Ubuntu Xenial):
assignee: nobody → Dimitri John Ledkov (xnox)
importance: Undecided → High
milestone: none → xenial-updates
Brian Murray (brian-murray) wrote :

With the version of python-cassandra from xenial-proposed I no longer receive the Traceback.

[ 8:22AM 10135 ] [ bdmurray@impulse:~/source-trees/daisy/trunk ]
 $ ./tools/cql-check-oopses-for-arches.py
Traceback (most recent call last):
  File "./tools/cql-check-oopses-for-arches.py", line 33, in <module>
    session = cluster.connect(config.cassandra_keyspace)
  File "/usr/lib/python2.7/dist-packages/cassandra/cluster.py", line 755, in connect
    self.control_connection.connect()
  File "/usr/lib/python2.7/dist-packages/cassandra/cluster.py", line 1868, in connect
    self._set_new_connection(self._reconnect_internal())
  File "/usr/lib/python2.7/dist-packages/cassandra/cluster.py", line 1903, in _reconnect_internal
    raise NoHostAvailable("Unable to connect to any servers", errors)
cassandra.cluster.NoHostAvailable: ('Unable to connect to any servers', {'192.168.10.2': TypeError('ref() does not take keyword arguments',)})
[ 8:22AM 10136 ] [ bdmurray@impulse:~/source-trees/daisy/trunk ]
 $ sudo apt-get install python-cassandra
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  python-snappy python-lz4 python-blist
The following packages will be upgraded:
  python-cassandra
1 upgraded, 0 newly installed, 0 to remove and 143 not upgraded.
Need to get 0 B/122 kB of archives.
After this operation, 2,048 B disk space will be freed.
Sorry, your system lacks support for the snapshot feature
Reading changelogs... Done
(Reading database ... 887629 files and directories currently installed.)
Preparing to unpack .../python-cassandra_2.5.1-1ubuntu0.1_all.deb ...
Unpacking python-cassandra (2.5.1-1ubuntu0.1) over (2.5.1-1) ...
Setting up python-cassandra (2.5.1-1ubuntu0.1) ...
[ 8:23AM 10137 ] [ bdmurray@impulse:~/source-trees/daisy/trunk ]
 $ ./tools/cql-check-oopses-for-arches.py
[ 8:23AM 10138 ] [ bdmurray@impulse:~/source-trees/daisy/trunk ]

tags: added: verification-done
removed: verification-needed
tags: removed: removal-candidate

The verification of the Stable Release Update for python-cassandra-driver has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-cassandra-driver - 2.5.1-1ubuntu0.1

---------------
python-cassandra-driver (2.5.1-1ubuntu0.1) xenial; urgency=high

  * Cherry-pick upstream commit to fix compat with python 2.7.12 -
    weakref.ref no longer accepts kwargs. (LP: #1603436)

 -- Dimitri John Ledkov <email address hidden> Mon, 25 Jul 2016 12:17:29 +0100

Changed in python-cassandra-driver (Ubuntu Xenial):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers