[Bug 1881771] Re: neutron-ipset-cleanup fails with Traceback: Unhandled error: oslo_config.cfg.NoSuchOptError: no such option AGENT in group [DEFAULT]
OpenStack Infra
1881771 at bugs.launchpad.net
Fri Aug 7 05:52:29 UTC 2020
Reviewed: https://review.opendev.org/744127
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=7e7a0da20d6f81fa6e9f3a890594e12726187be2
Submitter: Zuul
Branch: stable/rocky
commit 7e7a0da20d6f81fa6e9f3a890594e12726187be2
Author: Frode Nordahl <frode.nordahl at canonical.com>
Date: Tue Jun 2 16:55:50 2020 +0200
Fix Traceback when running neutron-ipset-cleanup tool
Some of the tools dependencies expect the AGENT group to be
present in the configuration, and at present it is not initialized,
this patch addresses that.
Change-Id: I1a50e77749aaecc3966c9d238f91a1968ed454ef
Signed-off-by: Frode Nordahl <frode.nordahl at canonical.com>
Closes-Bug: #1881771
(cherry picked from commit d57735ae0f01a4c0ae8c81dbdda62e07314face1)
** Tags added: in-stable-rocky
--
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to neutron in Ubuntu.
https://bugs.launchpad.net/bugs/1881771
Title:
neutron-ipset-cleanup fails with Traceback: Unhandled error:
oslo_config.cfg.NoSuchOptError: no such option AGENT in group
[DEFAULT]
Status in neutron:
Fix Released
Status in neutron package in Ubuntu:
Fix Released
Status in neutron source package in Focal:
Triaged
Bug description:
# /usr/bin/neutron-ipset-cleanup --debug --config-file /etc/neutron/neutron.conf
2020-06-02 14:36:08.891 124358 INFO neutron.common.config [-] Logging enabled!
2020-06-02 14:36:08.892 124358 INFO neutron.common.config [-] /usr/bin/neutron-ipset-cleanup version 16.0.0.0b3
2020-06-02 14:36:08.892 124358 INFO neutron.cmd.ipset_cleanup [-] Destroying IPsets with prefix: N
2020-06-02 14:36:08.892 124358 CRITICAL neutron [-] Unhandled error: oslo_config.cfg.NoSuchOptError: no such option AGENT in group [DEFAULT]
2020-06-02 14:36:08.892 124358 ERROR neutron Traceback (most recent call last):
2020-06-02 14:36:08.892 124358 ERROR neutron File "/usr/lib/python3/dist-packages/oslo_config/cfg.py", line 2197, in __getattr__
2020-06-02 14:36:08.892 124358 ERROR neutron return self._get(name)
2020-06-02 14:36:08.892 124358 ERROR neutron File "/usr/lib/python3/dist-packages/oslo_config/cfg.py", line 2631, in _get
2020-06-02 14:36:08.892 124358 ERROR neutron value, loc = self._do_get(name, group, namespace)
2020-06-02 14:36:08.892 124358 ERROR neutron File "/usr/lib/python3/dist-packages/oslo_config/cfg.py", line 2649, in _do_get
2020-06-02 14:36:08.892 124358 ERROR neutron info = self._get_opt_info(name, group)
2020-06-02 14:36:08.892 124358 ERROR neutron File "/usr/lib/python3/dist-packages/oslo_config/cfg.py", line 2849, in _get_opt_info
2020-06-02 14:36:08.892 124358 ERROR neutron raise NoSuchOptError(opt_name, group)
2020-06-02 14:36:08.892 124358 ERROR neutron oslo_config.cfg.NoSuchOptError: no such option AGENT in group [DEFAULT]
2020-06-02 14:36:08.892 124358 ERROR neutron
2020-06-02 14:36:08.892 124358 ERROR neutron During handling of the above exception, another exception occurred:
2020-06-02 14:36:08.892 124358 ERROR neutron
2020-06-02 14:36:08.892 124358 ERROR neutron Traceback (most recent call last):
2020-06-02 14:36:08.892 124358 ERROR neutron File "/usr/bin/neutron-ipset-cleanup", line 10, in <module>
2020-06-02 14:36:08.892 124358 ERROR neutron sys.exit(main())
2020-06-02 14:36:08.892 124358 ERROR neutron File "/usr/lib/python3/dist-packages/neutron/cmd/ipset_cleanup.py", line 98, in main
2020-06-02 14:36:08.892 124358 ERROR neutron cleanup_ipsets(conf)
2020-06-02 14:36:08.892 124358 ERROR neutron File "/usr/lib/python3/dist-packages/neutron/cmd/ipset_cleanup.py", line 78, in cleanup_ipsets
2020-06-02 14:36:08.892 124358 ERROR neutron ipsets = utils.execute(cmd, run_as_root=True)
2020-06-02 14:36:08.892 124358 ERROR neutron File "/usr/lib/python3/dist-packages/neutron/agent/linux/utils.py", line 120, in execute
2020-06-02 14:36:08.892 124358 ERROR neutron if run_as_root and cfg.CONF.AGENT.root_helper_daemon:
2020-06-02 14:36:08.892 124358 ERROR neutron File "/usr/lib/python3/dist-packages/oslo_config/cfg.py", line 2201, in __getattr__
2020-06-02 14:36:08.892 124358 ERROR neutron raise NoSuchOptError(name)
2020-06-02 14:36:08.892 124358 ERROR neutron oslo_config.cfg.NoSuchOptError: no such option AGENT in group [DEFAULT]
2020-06-02 14:36:08.892 124358 ERROR neutron
The config file does have a AGENT section, but from cursory view of
the source code of the neutron-ipset-cleanup command line tool it does
not initialize this section of the configuration.
I think this is a simple case of bit-rot and augmenting the command
line source code to initializing the missing section makes it run
successfully.
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1881771/+subscriptions
More information about the Ubuntu-openstack-bugs
mailing list