error log is produced for etcd3gw backend even when not using it

Bug #1928318 reported by Pavlo Shchelokovskyy
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
oslo.cache
Fix Released
Undecided
Mitya Eremeev

Bug Description

We deploy OpenStack in containers, and use only memcached backend, not installing dependencies of other backends into the containers

on many services (e.g. Neutron, Keystone) we see the following errors:

2021-05-13 07:40:38.529 18 ERROR stevedore.extension [req-e5eecc70-adbe-4aa6-8325-a6f07c7d4a0a 38ffa727563a4ca3b6abda26d60e3494 0ed296340f02481ab60bb0bbdc03cfe0 - 0d654ccd0eb647e9badd34fdfe
746b67 0d654ccd0eb647e9badd34fdfe746b67] Could not load 'oslo_cache.etcd3gw': No module named 'etcd3gw': ModuleNotFoundError: No module named 'etcd3gw

even if our cache is explicitly configured to use memcached:

[cache]
backend = oslo_cache.memcache_pool
memcache_secret_key = eD6SEGCYNIMSyIWG
memcache_security_strategy = ENCRYPT
memcached_servers = openstack-memcached-memcached-0.memcached.openstack.svc.cluster.local:11211,openstack-memcached-memcached-1.memcached.openstack.svc.cluster.local:11211,openstack-memcached-memcached-2.memcached.openstack.svc.cluster.local:11211

Since it seems that the plugin lookup and loading code is actually in the dogpile.cache lib,
the solution would be for etcd3gw backend to use lazy imports similar to e.g. what mongodb backend does in the oslo.cache already https://opendev.org/openstack/oslo.cache/src/branch/master/oslo_cache/backends/mongo.py#L331-L333

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

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/oslo.cache/+/792677

Changed in oslo.cache:
status: New → In Progress
Mitya Eremeev (mitos)
Changed in oslo.cache:
assignee: nobody → Mitya Eremeev (mitos)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo.cache (master)

Reviewed: https://review.opendev.org/c/openstack/oslo.cache/+/792677
Committed: https://opendev.org/openstack/oslo.cache/commit/40946a9349407f36a43d5020d991085c11468698
Submitter: "Zuul (22348)"
Branch: master

commit 40946a9349407f36a43d5020d991085c11468698
Author: Mitya_Eremeev <email address hidden>
Date: Fri May 21 19:50:53 2021 +0300

    Don't import module "etcd3gw" if etcd3gw backend is not used.

    If module etcd3gw is not required for used backend,
    then no need to have it installed and imported.
    Otherwise we always have ugly log error:
    Could not load 'oslo_cache.etcd3gw': No module named 'etcd3gw': ModuleNotFoundError: No module named 'etcd3gw

    Closes-Bug: 1928318
    Change-Id: Icbe6dc3e93b4d2fec1ceb88366027294e49d7032

Changed in oslo.cache:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/oslo.cache 2.8.1

This issue was fixed in the openstack/oslo.cache 2.8.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo.cache (stable/wallaby)

Fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/oslo.cache/+/822671

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo.cache (stable/wallaby)

Reviewed: https://review.opendev.org/c/openstack/oslo.cache/+/822671
Committed: https://opendev.org/openstack/oslo.cache/commit/3df5e9001346d17994deb8db60361cf8589a6230
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit 3df5e9001346d17994deb8db60361cf8589a6230
Author: Mitya_Eremeev <email address hidden>
Date: Fri May 21 19:50:53 2021 +0300

    Don't import module "etcd3gw" if etcd3gw backend is not used.

    If module etcd3gw is not required for used backend,
    then no need to have it installed and imported.
    Otherwise we always have ugly log error:
    Could not load 'oslo_cache.etcd3gw': No module named 'etcd3gw': ModuleNotFoundError: No module named 'etcd3gw

    Closes-Bug: 1928318
    Change-Id: Icbe6dc3e93b4d2fec1ceb88366027294e49d7032
    (cherry picked from commit 40946a9349407f36a43d5020d991085c11468698)

tags: added: in-stable-wallaby
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/oslo.cache 2.7.1

This issue was fixed in the openstack/oslo.cache 2.7.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo.cache (stable/victoria)

Fix proposed to branch: stable/victoria
Review: https://review.opendev.org/c/openstack/oslo.cache/+/844273

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo.cache (stable/victoria)

Reviewed: https://review.opendev.org/c/openstack/oslo.cache/+/844273
Committed: https://opendev.org/openstack/oslo.cache/commit/f0ddb8a63f8b36224b365c962004f17f83dd5ca4
Submitter: "Zuul (22348)"
Branch: stable/victoria

commit f0ddb8a63f8b36224b365c962004f17f83dd5ca4
Author: Mitya_Eremeev <email address hidden>
Date: Fri May 21 19:50:53 2021 +0300

    Don't import module "etcd3gw" if etcd3gw backend is not used.

    If module etcd3gw is not required for used backend,
    then no need to have it installed and imported.
    Otherwise we always have ugly log error:
    Could not load 'oslo_cache.etcd3gw': No module named 'etcd3gw': ModuleNotFoundError: No module named 'etcd3gw

    Closes-Bug: 1928318
    Change-Id: Icbe6dc3e93b4d2fec1ceb88366027294e49d7032
    (cherry picked from commit 40946a9349407f36a43d5020d991085c11468698)
    (cherry picked from commit 3df5e9001346d17994deb8db60361cf8589a6230)

tags: added: in-stable-victoria
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo.cache (stable/ussuri)

Fix proposed to branch: stable/ussuri
Review: https://review.opendev.org/c/openstack/oslo.cache/+/848727

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo.cache (stable/ussuri)

Reviewed: https://review.opendev.org/c/openstack/oslo.cache/+/848727
Committed: https://opendev.org/openstack/oslo.cache/commit/978a093b2357b5c7af29e248987ce61f0656358a
Submitter: "Zuul (22348)"
Branch: stable/ussuri

commit 978a093b2357b5c7af29e248987ce61f0656358a
Author: Mitya_Eremeev <email address hidden>
Date: Fri May 21 19:50:53 2021 +0300

    Don't import module "etcd3gw" if etcd3gw backend is not used.

    If module etcd3gw is not required for used backend,
    then no need to have it installed and imported.
    Otherwise we always have ugly log error:
    Could not load 'oslo_cache.etcd3gw': No module named 'etcd3gw': ModuleNotFoundError: No module named 'etcd3gw

    Closes-Bug: 1928318
    Change-Id: Icbe6dc3e93b4d2fec1ceb88366027294e49d7032
    (cherry picked from commit 40946a9349407f36a43d5020d991085c11468698)
    (cherry picked from commit 3df5e9001346d17994deb8db60361cf8589a6230)
    (cherry picked from commit f0ddb8a63f8b36224b365c962004f17f83dd5ca4)

tags: added: in-stable-ussuri
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo.cache (stable/train)

Fix proposed to branch: stable/train
Review: https://review.opendev.org/c/openstack/oslo.cache/+/848858

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo.cache (stable/train)

Reviewed: https://review.opendev.org/c/openstack/oslo.cache/+/848858
Committed: https://opendev.org/openstack/oslo.cache/commit/c6fb9987419d6f497d97dcd7590cbc32e134e435
Submitter: "Zuul (22348)"
Branch: stable/train

commit c6fb9987419d6f497d97dcd7590cbc32e134e435
Author: Mitya_Eremeev <email address hidden>
Date: Fri May 21 19:50:53 2021 +0300

    Don't import module "etcd3gw" if etcd3gw backend is not used.

    If module etcd3gw is not required for used backend,
    then no need to have it installed and imported.
    Otherwise we always have ugly log error:
    Could not load 'oslo_cache.etcd3gw': No module named 'etcd3gw': ModuleNotFoundError: No module named 'etcd3gw

    Closes-Bug: 1928318
    Change-Id: Icbe6dc3e93b4d2fec1ceb88366027294e49d7032
    (cherry picked from commit 40946a9349407f36a43d5020d991085c11468698)
    (cherry picked from commit 3df5e9001346d17994deb8db60361cf8589a6230)
    (cherry picked from commit f0ddb8a63f8b36224b365c962004f17f83dd5ca4)
    (cherry picked from commit 978a093b2357b5c7af29e248987ce61f0656358a)

tags: added: in-stable-train
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/oslo.cache train-eol

This issue was fixed in the openstack/oslo.cache train-eol release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/oslo.cache victoria-eom

This issue was fixed in the openstack/oslo.cache victoria-eom release.

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.