[Bug 2117135] Re: python-neutronclient generates excessive entries in ~/.cache/python-entrypoints when called often
Ghadi Rahme
2117135 at bugs.launchpad.net
Thu Jul 17 10:35:42 UTC 2025
Updated the description to clarify that it is the Octavia charm and not
Octavia itself that is affected by this issue.
Below is the python stack trace that leads to the initialization of the
v2 Client class in neutronclient, line numbers might be a bit off due to
some extra debug lines I added while investigating the issue:
File "/var/lib/juju/agents/unit-octavia-0/charm/./hooks/update-status", line 22, in <module>
main()
File "/var/lib/juju/agents/unit-octavia-0/.venv/lib/python3.10/site-packages/charms/reactive/__init__.py", line 78, in main
bus.dispatch(restricted=restricted_mode)
File "/var/lib/juju/agents/unit-octavia-0/.venv/lib/python3.10/site-packages/charms/reactive/bus.py", line 431, in dispatch
_invoke(other_handlers)
File "/var/lib/juju/agents/unit-octavia-0/.venv/lib/python3.10/site-packages/charms/reactive/bus.py", line 397, in _invoke
handler.invoke()
File "/var/lib/juju/agents/unit-octavia-0/.venv/lib/python3.10/site-packages/charms/reactive/bus.py", line 182, in invoke
self._action(*args)
File "/var/lib/juju/agents/unit-octavia-0/charm/reactive/octavia_handlers.py", line 134, in ensure_hm_port_mtu
api_crud.ensure_hm_port_mtu(identity_service)
File "/var/lib/juju/agents/unit-octavia-0/charm/lib/charm/openstack/api_crud.py", line 490, in ensure_hm_port_mtu
nc = init_neutron_client(session)
File "/var/lib/juju/agents/unit-octavia-0/charm/lib/charm/openstack/api_crud.py", line 137, in init_neutron_client
return neutron_client.Client(session=keystone_session,
File "/var/lib/juju/agents/unit-octavia-0/.venv/lib/python3.10/site-packages/neutronclient/v2_0/client.py", line 2514, in __init__
traceback.print_stack()
** Description changed:
Currently pyhton-neutronclient creates entry points when called due to
it trying to register extensions in the init of the Client class
(neutronclient/v2_0/client.py).
- Some applications such as octavia make use of python-neutronclient and
- in the Octavia charm, this class is being initialized on each update
- status hook run leading to an excessive amount of entries in
- ~/.cache/python-entrypoints.
+ Some applications such as the octavia charm make use of python-
+ neutronclient, this class is being initialized on each update status
+ hook run leading to an excessive amount of entries in ~/.cache/python-
+ entrypoints.
- In the case of Octavia, nothing is needed beyond the built-in feature
- set of python-neutronclient based on my testing. From what I can tell
- Octavia uses the API to fetch the MTU of other machines. Adding an
+ In the case of the Octavia charm, nothing is needed beyond the built-in
+ feature set of python-neutronclient based on my testing. From what I can
+ tell Octavia uses the API to fetch the MTU of other machines. Adding an
option to decide if an application wants python-neutronclient to
register more extensions would avoid this issue.
** Also affects: charm-octavia
Importance: Undecided
Status: New
** No longer affects: octavia (Ubuntu)
--
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to octavia in Ubuntu.
https://bugs.launchpad.net/bugs/2117135
Title:
python-neutronclient generates excessive entries in ~/.cache/python-
entrypoints when called often
Status in OpenStack Octavia Charm:
New
Status in python-neutronclient:
In Progress
Bug description:
Currently pyhton-neutronclient creates entry points when called due to
it trying to register extensions in the init of the Client class
(neutronclient/v2_0/client.py).
Some applications such as the octavia charm make use of python-
neutronclient, this class is being initialized on each update status
hook run leading to an excessive amount of entries in ~/.cache/python-
entrypoints.
In the case of the Octavia charm, nothing is needed beyond the built-
in feature set of python-neutronclient based on my testing. From what
I can tell Octavia uses the API to fetch the MTU of other machines.
Adding an option to decide if an application wants python-
neutronclient to register more extensions would avoid this issue.
To manage notifications about this bug go to:
https://bugs.launchpad.net/charm-octavia/+bug/2117135/+subscriptions
More information about the Ubuntu-openstack-bugs
mailing list