keystone-manage domain_config_upload command yield "'CacheRegion' object has no attribute 'expiration_time'"

Bug #1441386 reported by Guang Yee
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
High
Guang Yee
Kilo
Fix Released
High
Unassigned

Bug Description

Steps to reproduce the error:

1. Install devstack
2. enable domain-specific driver feature

     domain_specific_drivers_enabled=true
     domain_config_dir=/etc/keystone/domains

3. create an domain-specific conf file in /etc/keystone/domains/. (i.e. /etc/keystone/domains/keystone.acme.conf)
4. run 'keystone-manage domain_config_upload --domain-name acme' and you'll see a traceback similar to this

keystone-manage domain_config_upload --domain-name acme
4959 DEBUG keystone.notifications [-] Callback: `keystone.identity.core.Manager._domain_deleted` subscribed to event `identity.domain.deleted`. register_event_callback /opt/stack/keystone/keystone/notifications.py:292
4959 DEBUG oslo_db.sqlalchemy.session [-] MySQL server mode set to STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION _check_effective_sql_mode /usr/local/lib/python2.7/dist-packages/oslo_db/sqlalchemy/session.py:509
4959 CRITICAL keystone [-] AttributeError: 'CacheRegion' object has no attribute 'expiration_time'
4959 TRACE keystone Traceback (most recent call last):
4959 TRACE keystone File "/usr/local/bin/keystone-manage", line 6, in <module>
4959 TRACE keystone exec(compile(open(__file__).read(), __file__, 'exec'))
4959 TRACE keystone File "/opt/stack/keystone/bin/keystone-manage", line 44, in <module>
4959 TRACE keystone cli.main(argv=sys.argv, config_files=config_files)
4959 TRACE keystone File "/opt/stack/keystone/keystone/cli.py", line 600, in main
4959 TRACE keystone CONF.command.cmd_class.main()
4959 TRACE keystone File "/opt/stack/keystone/keystone/cli.py", line 543, in main
4959 TRACE keystone status = dcu.run()
4959 TRACE keystone File "/opt/stack/keystone/keystone/cli.py", line 513, in run
4959 TRACE keystone self.read_domain_configs_from_files()
4959 TRACE keystone File "/opt/stack/keystone/keystone/cli.py", line 481, in read_domain_configs_from_files
4959 TRACE keystone os.path.join(conf_dir, fname), domain_name)
4959 TRACE keystone File "/opt/stack/keystone/keystone/cli.py", line 399, in upload_config_to_database
4959 TRACE keystone self.resource_manager.get_domain_by_name(domain_name))
4959 TRACE keystone File "/usr/local/lib/python2.7/dist-packages/dogpile/cache/region.py", line 1040, in decorate
4959 TRACE keystone should_cache_fn)
4959 TRACE keystone File "/usr/local/lib/python2.7/dist-packages/dogpile/cache/region.py", line 629, in get_or_create
4959 TRACE keystone expiration_time = self.expiration_time
4959 TRACE keystone AttributeError: 'CacheRegion' object has no attribute 'expiration_time'
4959 TRACE keystone

tags: added: kilo-rc-potential
Revision history for this message
Guang Yee (guang-yee) wrote :

So looks like keystone-manage CLI have a slimmed down version of load_backends

https://github.com/openstack/keystone/blob/master/keystone/cli.py#L339

which doesn't have the cache configured

https://github.com/openstack/keystone/blob/master/keystone/backends.py#L33

So we have two choices

1. add the cache configuration back to the slimmed down version. Drawback is that we have to perpetually maintaining two different versions of load_backends().
2. get rid of the slimmed down version and directly use the fat version in keystone/backends.py. Drawback is that it will contain extra fat.

But since keystone-manager CLI is something that will be used sparingly, I think we should go for option #2.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

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

Changed in keystone:
assignee: nobody → Guang Yee (guang-yee)
status: New → In Progress
Changed in keystone:
importance: Undecided → High
milestone: none → liberty-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

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

commit da2effe7f33f5822da33b3966e3afd386d6f43cb
Author: guang-yee <email address hidden>
Date: Wed Apr 8 16:07:02 2015 -0700

    make sure we properly initialize the backends before using the drivers

    Change-Id: I298515dafd7f8eb8a02745d128296a0da596adf6
    closes-bug: #1441386

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

Fix proposed to branch: proposed/kilo
Review: https://review.openstack.org/173676

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (stable/kilo)

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/174055

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on keystone (proposed/kilo)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (stable/kilo)

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

commit 21a1daeaad0e54c373ed91c9e6dbd6391c03eeff
Author: guang-yee <email address hidden>
Date: Wed Apr 8 16:07:02 2015 -0700

    make sure we properly initialize the backends before using the drivers

    Change-Id: I298515dafd7f8eb8a02745d128296a0da596adf6
    closes-bug: #1441386
    (cherry picked from commit da2effe7f33f5822da33b3966e3afd386d6f43cb)

Thierry Carrez (ttx)
tags: removed: kilo-rc-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)
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 keystone:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in keystone:
milestone: liberty-1 → 8.0.0
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.