[Bug 1881771] Re: neutron-ipset-cleanup fails with Traceback: Unhandled error: oslo_config.cfg.NoSuchOptError: no such option AGENT in group [DEFAULT]

Bernard Cafarelli 1881771 at bugs.launchpad.net
Tue Jun 30 13:06:21 UTC 2020


** Tags added: neutron-proactive-backport-potential

-- 
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