Keystone and Ceilometer unit tests fail with pymongo 3.0

Bug #1441393 reported by Brant Knudson on 2015-04-08
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
High
ZhiQiang Fan
Icehouse
Invalid
High
Unassigned
Juno
Invalid
High
Unassigned
OpenStack Identity (keystone)
High
Brant Knudson
Icehouse
High
Ihar Hrachyshka
Juno
High
Ihar Hrachyshka
Kilo
High
Unassigned
zaqar
High
Flavio Percoco

Bug Description

pymongo 3.0 was released 2015-04-07. This causes keystone tests to fail:

    Traceback (most recent call last):
      File "keystone/tests/unit/test_cache_backend_mongo.py", line 357, in test_correct_read_preference
        region.set(random_key, "dummyValue10")
...
      File "keystone/common/cache/backends/mongo.py", line 363, in get_cache_collection
        self.read_preference = pymongo.read_preferences.mongos_enum(
    AttributeError: 'module' object has no attribute 'mongos_enum'

    Traceback (most recent call last):
      File "keystone/tests/unit/test_cache_backend_mongo.py", line 345, in test_incorrect_read_preference
        random_key, "dummyValue10")
...
      File "keystone/common/cache/backends/mongo.py", line 168, in client
        self.api.get_cache_collection()
      File "keystone/common/cache/backends/mongo.py", line 363, in get_cache_collection
        self.read_preference = pymongo.read_preferences.mongos_enum(
    AttributeError: 'module' object has no attribute 'mongos_enum'

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

Changed in keystone:
assignee: nobody → Brant Knudson (blk-u)
status: New → In Progress

Reviewed: https://review.openstack.org/171442
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=7c3fe6acaef6fc283c383fb79f06e388df6e6926
Submitter: Jenkins
Branch: master

commit 7c3fe6acaef6fc283c383fb79f06e388df6e6926
Author: Brant Knudson <email address hidden>
Date: Tue Apr 7 19:35:00 2015 -0500

    Work with pymongo 3.0

    pymongo 3.0 renamed mongos_enum to read_pref_mode_from_name which
    was causing the unit tests to fail.

    Change-Id: Iaa7fd7221c2e6c865633ef342e6b83304a1de655
    Closes-Bug: 1441393

Changed in keystone:
status: In Progress → Fix Committed
Alan Pevec (apevec) on 2015-04-08
Changed in keystone:
importance: Undecided → High
Alan Pevec (apevec) wrote :
summary: - keystone unit tests fail with pymongo 3.0
+ Keystone and Ceilometer unit tests fail with pymongo 3.0
Changed in ceilometer:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → ZhiQiang Fan (aji-zqfan)
Alan Pevec (apevec) on 2015-04-08
Changed in ceilometer:
status: Confirmed → In Progress
Alan Pevec (apevec) wrote :

Alternative fix for Celiometer is to cap pymongo<3.0
https://review.openstack.org/#/q/I742842c67576417a46eea52f10a74abd4d5b6656,n,z

Brant Knudson (blk-u) on 2015-04-08
tags: added: kilo-rc-potential
Changed in ceilometer:
assignee: ZhiQiang Fan (aji-zqfan) → Lianhao Lu (lianhao-lu)
Lianhao Lu (lianhao-lu) on 2015-04-09
Changed in ceilometer:
assignee: Lianhao Lu (lianhao-lu) → ZhiQiang Fan (aji-zqfan)

Reviewed: https://review.openstack.org/171458
Committed: https://git.openstack.org/cgit/openstack/ceilometer/commit/?id=b69d3a0f1f70274aa55d6dae26866baa7e9d9bcd
Submitter: Jenkins
Branch: master

commit b69d3a0f1f70274aa55d6dae26866baa7e9d9bcd
Author: ZhiQiang Fan <email address hidden>
Date: Wed Apr 8 10:29:16 2015 +0800

    pymongo 3.0 breaks ci gate

    we pass safe parameter to pymongo.MongoClient but this field is
    removed in 3.0. the default value is safe=True as of pymongo>=2.4[1].
    this patch also cleans up residual ensure_index usage in tests which
    were leftover from when ttl was not native to mongodb[2]

    [1] http://emptysqua.re/blog/pymongos-new-default-safe-writes/
    [2] I3d91fb08eb51ba6cfd5256abbeca43ed98321412

    Closes-Bug: #1441393
    Change-Id: I46f6ba28a4986c1f35b726c411d0804f3bb0cbda

Changed in ceilometer:
status: In Progress → Fix Committed
Lianhao Lu (lianhao-lu) on 2015-04-09
Changed in ceilometer:
milestone: none → kilo-rc1

Reviewed: https://review.openstack.org/171562
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=0e0efdbd6637d41b8d651e737e4b46faf1d11aa2
Submitter: Jenkins
Branch: stable/icehouse

commit 0e0efdbd6637d41b8d651e737e4b46faf1d11aa2
Author: Brant Knudson <email address hidden>
Date: Tue Apr 7 19:35:00 2015 -0500

    Work with pymongo 3.0

    pymongo 3.0 renamed mongos_enum to read_pref_mode_from_name which
    was causing the unit tests to fail.

    Conflicts:
     keystone/common/cache/backends/mongo.py

    Change-Id: Iaa7fd7221c2e6c865633ef342e6b83304a1de655
    Closes-Bug: 1441393
    (cherry picked from commit 7c3fe6acaef6fc283c383fb79f06e388df6e6926)

Reviewed: https://review.openstack.org/171559
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=e2bbebe0083e6d6b3fa39c5895bee15965da1ea3
Submitter: Jenkins
Branch: stable/juno

commit e2bbebe0083e6d6b3fa39c5895bee15965da1ea3
Author: Brant Knudson <email address hidden>
Date: Tue Apr 7 19:35:00 2015 -0500

    Work with pymongo 3.0

    pymongo 3.0 renamed mongos_enum to read_pref_mode_from_name which
    was causing the unit tests to fail.

    Change-Id: Iaa7fd7221c2e6c865633ef342e6b83304a1de655
    Closes-Bug: 1441393
    (cherry picked from commit 7c3fe6acaef6fc283c383fb79f06e388df6e6926)

Changed in zaqar:
assignee: nobody → Flavio Percoco (flaper87)
importance: Undecided → High
Thierry Carrez (ttx) on 2015-04-09
Changed in ceilometer:
status: Fix Committed → Fix Released
Changed in zaqar:
milestone: none → kilo-rc1
Changed in zaqar:
milestone: kilo-rc1 → next

Change abandoned by Doug Hellmann (<email address hidden>) on branch: proposed/kilo
Review: https://review.openstack.org/173393
Reason: replaced by https://review.openstack.org/174053 in stable/kilo

Reviewed: https://review.openstack.org/174053
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=a3d8ae8f5fa092fe99a35c0ea714eb5ce81bcc0b
Submitter: Jenkins
Branch: stable/kilo

commit a3d8ae8f5fa092fe99a35c0ea714eb5ce81bcc0b
Author: Brant Knudson <email address hidden>
Date: Tue Apr 7 19:35:00 2015 -0500

    Work with pymongo 3.0

    pymongo 3.0 renamed mongos_enum to read_pref_mode_from_name which
    was causing the unit tests to fail.

    Change-Id: Iaa7fd7221c2e6c865633ef342e6b83304a1de655
    Closes-Bug: 1441393
    (cherry picked from commit 7c3fe6acaef6fc283c383fb79f06e388df6e6926)

Thierry Carrez (ttx) on 2015-04-21
tags: removed: kilo-rc-potential
Thierry Carrez (ttx) on 2015-04-30
Changed in ceilometer:
milestone: kilo-rc1 → 2015.1.0
Download full text (4.7 KiB)

Reviewed: https://review.openstack.org/179288
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=9bc6043eb06199b8d4dbf6698e129d984a59cc11
Submitter: Jenkins
Branch: master

commit 65a50eebb8d0a53a2c4c226eb9a564c4d535ac68
Author: Brant Knudson <email address hidden>
Date: Wed Apr 22 11:33:00 2015 -0500

    Sync oslo-incubator Ie51669bd278288b768311ddf56ad31a2f28cc7ab

    This syncs to oslo-incubator to commit 64b5819 and also includes
    51280db.

    Change-Id: I7b43a67a0b67fe0ff5ac3d87708ecc4ab52102f8
    Depends-On: Ie51669bd278288b768311ddf56ad31a2f28cc7ab
    Closes-Bug: #1446583
    (cherry picked from commit 797da5f05444e7cfbf55df52867ade6107834f00)

commit 579a065c0dcce554a5dca86164eb8f1d6fb43c4d
Author: OpenStack Proposal Bot <email address hidden>
Date: Mon Apr 20 17:55:55 2015 +0000

    Updated from global requirements

    Change-Id: I72af7a36f2c3ba206be06fa35323386801e6ff81

commit 906485152a8ec886cf4a45cbe1037184ce39f1a1
Author: Andreas Jaeger <email address hidden>
Date: Mon Apr 20 11:11:25 2015 +0200

    Release Import of Translations from Transifex

    Manual import of Translations from Transifex. This change also removes
    all po files that are less than 66 per cent translated since such
    partially translated files will not help users.

    This change needs to be done manually since the automatic import does
    not handle the proposed branches and we need to sync with latest
    translations.

    Change-Id: Iaf4bdae303b06c1af4023fe2daa3a6b03c195ee9

commit 18ca7fabece4837ad56e435bc9d5f0b6278fa4be
Author: Alexander Makarov <email address hidden>
Date: Mon Apr 6 15:49:41 2015 +0300

    Make memcache client reusable across threads

    memcache.Client is inherited from threading._local so instances are only
    accessible from current thread or eventlet. Present workaround broke
    inheritance chain so super() call is unusable.

    This patch makes artificial client class mimic inheritance from
    threading._local while using generic object methods allowing reusability.

    Change-Id: Ic5d5709695877afb995fd816bb0e4ce711b99b60
    Closes-Bug: #1440493
    (cherry picked from commit 33a95575fc3778bf8ef054f7b9d24fcb7c75100b)

commit cedce339a08d475617c7f57c148e192dc3709a34
Author: Thierry Carrez <email address hidden>
Date: Thu Apr 16 22:19:42 2015 +0200

    Set default branch to stable/kilo

    Open stable/kilo branch by setting defaultbranch for git-review.

    Change-Id: If5b35b0fc5a85ba8dda16dc6b365537ed0d839bc

commit 86df39c01e96ad3b15e33eb6fc1bf726a0a704c5
Author: Eric Brown <email address hidden>
Date: Mon Apr 13 11:37:53 2015 -0700

    backend_argument should be marked secret

    Since the backend_argument can potentially contain a password,
    it should be marked secret to avoid leakage into the logs.

    Closes-Bug: #1443598

    Change-Id: I55663db4cf2df84a66de8f64fba4b4f129ae827d
    (cherry picked from commit f9db1a65bd4d83d12c572ba4d5807845996ef410)

commit b679e7d6be18d33ebdfe133161a3daf2f305d954
Author: Lance Bragstad <email address hidden>
Date: Tue Apr 7 18:47:34 2015 +0000

    Update man p...

Read more...

Changed in zaqar:
status: New → Confirmed
Changed in zaqar:
milestone: next → liberty-1
Changed in zaqar:
status: Confirmed → In Progress

Change abandoned by Flavio Percoco (<email address hidden>) on branch: master
Review: https://review.openstack.org/176855

Thierry Carrez (ttx) on 2015-06-23
Changed in zaqar:
milestone: liberty-1 → liberty-2
Changed in zaqar:
status: In Progress → Fix Committed
Changed in keystone:
milestone: none → liberty-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2015-07-30
Changed in zaqar:
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2015-10-15
Changed in zaqar:
milestone: liberty-2 → 1.0.0
Thierry Carrez (ttx) on 2015-10-15
Changed in keystone:
milestone: liberty-1 → 8.0.0
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers