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

Bug #1881771 reported by Frode Nordahl
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Frode Nordahl
neutron (Ubuntu)
Fix Released
High
Frode Nordahl
Focal
Fix Released
High
Unassigned

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.

Related branches

Frode Nordahl (fnordahl)
Changed in neutron:
status: New → In Progress
assignee: nobody → Frode Nordahl (fnordahl)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.opendev.org/732701

Revision history for this message
Corey Bryant (corey.bryant) wrote :

Thanks Frode! Do you need this prior to Victoria?

Changed in neutron (Ubuntu):
status: New → Triaged
importance: Undecided → High
assignee: nobody → Frode Nordahl (fnordahl)
Revision history for this message
Frode Nordahl (fnordahl) wrote :

Thanks for review/merge Corey. Yes, this fix and the fix in bug 1881852 is needed to complete the migration from OVS -> OVN for existing deployments. We expect our users to complete this migration on Ussuri.

Reviews look positive so far and I'll chase a upstream stable backport to Ussuri once we've got it merged into master.

Changed in neutron (Ubuntu Focal):
importance: Undecided → High
status: New → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package neutron - 2:16.0.0-0ubuntu2

---------------
neutron (2:16.0.0-0ubuntu2) groovy; urgency=medium

  * d/control: Add net-tools dependency to python3-neutron for netstat
    (LP: #1881852).
  * d/neutron-common.install: Add rootwrap.d/netns-cleanup.filters
    (LP: #1881852).
  * d/p/fix-neutron-ipset-cleanup-tool.patch: Fix Traceback (LP: #1881771).

 -- Frode Nordahl <email address hidden> Wed, 3 Jun 2020 10:19:56 +0200

Changed in neutron (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.opendev.org/732701
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=d57735ae0f01a4c0ae8c81dbdda62e07314face1
Submitter: Zuul
Branch: master

commit d57735ae0f01a4c0ae8c81dbdda62e07314face1
Author: Frode Nordahl <email address hidden>
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 <email address hidden>
    Closes-Bug: #1881771

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/ussuri)

Fix proposed to branch: stable/ussuri
Review: https://review.opendev.org/733866

Changed in neutron:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/ussuri)

Reviewed: https://review.opendev.org/733866
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=98010a2f6a87fe331cf55267fe61dcfc85045d55
Submitter: Zuul
Branch: stable/ussuri

commit 98010a2f6a87fe331cf55267fe61dcfc85045d55
Author: Frode Nordahl <email address hidden>
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 <email address hidden>
    Closes-Bug: #1881771
    (cherry picked from commit d57735ae0f01a4c0ae8c81dbdda62e07314face1)

tags: added: in-stable-ussuri
tags: added: neutron-proactive-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/train)

Fix proposed to branch: stable/train
Review: https://review.opendev.org/744125

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

Fix proposed to branch: stable/stein
Review: https://review.opendev.org/744126

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

Fix proposed to branch: stable/rocky
Review: https://review.opendev.org/744127

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

Fix proposed to branch: stable/queens
Review: https://review.opendev.org/744128

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

Reviewed: https://review.opendev.org/744125
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=91e5764a807c17ba65436eb167b12c5c73739e47
Submitter: Zuul
Branch: stable/train

commit 91e5764a807c17ba65436eb167b12c5c73739e47
Author: Frode Nordahl <email address hidden>
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 <email address hidden>
    Closes-Bug: #1881771
    (cherry picked from commit d57735ae0f01a4c0ae8c81dbdda62e07314face1)

tags: added: in-stable-train
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/queens)

Reviewed: https://review.opendev.org/744128
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=fbf786566274d6448a35922606e2f00b5c1f7184
Submitter: Zuul
Branch: stable/queens

commit fbf786566274d6448a35922606e2f00b5c1f7184
Author: Frode Nordahl <email address hidden>
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 <email address hidden>
    Closes-Bug: #1881771
    (cherry picked from commit d57735ae0f01a4c0ae8c81dbdda62e07314face1)

tags: added: in-stable-queens
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/rocky)

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 <email address hidden>
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 <email address hidden>
    Closes-Bug: #1881771
    (cherry picked from commit d57735ae0f01a4c0ae8c81dbdda62e07314face1)

tags: added: in-stable-rocky
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/stein)

Reviewed: https://review.opendev.org/744126
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=0d9ec2b758db13f75b4f9860ad0f92d7c801783b
Submitter: Zuul
Branch: stable/stein

commit 0d9ec2b758db13f75b4f9860ad0f92d7c801783b
Author: Frode Nordahl <email address hidden>
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 <email address hidden>
    Closes-Bug: #1881771
    (cherry picked from commit d57735ae0f01a4c0ae8c81dbdda62e07314face1)

tags: added: in-stable-stein
Revision history for this message
Chris MacNaughton (chris.macnaughton) wrote :

This was released to Focal via a stable point release of Neutron

Changed in neutron (Ubuntu Focal):
status: Triaged → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron queens-eol

This issue was fixed in the openstack/neutron queens-eol release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron rocky-eol

This issue was fixed in the openstack/neutron rocky-eol 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.