[OVN] Error 400 when creating stateless SG [Unrecognized attribute(s) 'stateful']

Bug #1949451 reported by Ammad Ali
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Ihar Hrachyshka

Bug Description

Hi,

I am using neutron 19.0.0 with ovn 21.09 and ovs 2.16.0. I am trying to create a stateless security group with openstack python3 neutron client but its showing below error.

# openstack security group create --stateless sec02-stateless
Error while executing command: BadRequestException: 400, Unrecognized attribute(s) 'stateful'

In neutron logs I see stateful-security-group in neutron logs is not loaded.

## Showing nothing
# neutron ext-list | grep stateful-security-group

# grep stateful-security-group neutron-server.log

2021-11-02 13:02:20.846 998 DEBUG neutron.api.extensions [req-b022ced2-f365-4ab9-9f61-25e915231e02 - - - - -] Ext name="Stateful security group" alias="stateful-security-group" description="Indicates if the security group is stateful or not" updated="2019-11-26T09:00:00-00:00" _check_extension /usr/lib/python3/dist-packages/neutron/api/extensions.py:416
2021-11-02 13:02:20.846 998 INFO neutron.api.extensions [req-b022ced2-f365-4ab9-9f61-25e915231e02 - - - - -] Extension stateful-security-group not supported by any of loaded plugins

I have added stateful-security-group extension in neutron/common/ovn/extensions.py and SG creation goes successful.

Ammad Ali (syedammad83)
tags: added: ovn
Changed in neutron:
importance: Undecided → High
status: New → Confirmed
tags: added: api
Revision history for this message
Rodolfo Alonso (rodolfo-alonso-hernandez) wrote :

Hi Ammand:

As you found the problem and tested the solution, will you push a patch? If not, ping me to do it.

Thank you and regards.

Revision history for this message
Rodolfo Alonso (rodolfo-alonso-hernandez) wrote :

For documentation purposes, related bug: https://bugs.launchpad.net/neutron/+bug/1885262. That bug implemented this feature in Neutron.

Revision history for this message
Ammad Ali (syedammad83) wrote :

Hi Alonso,

I am new to openstack contribution and reviewing contribution guide. It will take some time. Its better you just push a quick fix in master and backport it to xena.

Revision history for this message
Ihar Hrachyshka (ihar-hrachyshka) wrote :

Thanks for the report, surprised it's not enabled, I probably missed it from inclusion when uploading the final version for review. Evidently we need tempest tests for this...

Changed in neutron:
assignee: nobody → Ihar Hrachyshka (ihar-hrachyshka)
Changed in neutron:
status: Confirmed → In Progress
Revision history for this message
Lajos Katona (lajos-katona) wrote :

Seems the bot didn't added the link:
https://review.opendev.org/c/openstack/neutron/+/816612

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron (master)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/816614
Committed: https://opendev.org/openstack/neutron/commit/753693d315a79c84eabd3fd21f2b6f3f5bcef23f
Submitter: "Zuul (22348)"
Branch: master

commit 753693d315a79c84eabd3fd21f2b6f3f5bcef23f
Author: Ihar Hrachyshka <email address hidden>
Date: Thu Nov 4 03:16:55 2021 +0000

    Bump OVN version for functional job to 21.06

    This is needed to validate allow-stateless with the job.

    Related-Bug: #1949451
    Change-Id: I2e3d389552aeb4f454b01fe69198d759c8b2a039

tags: added: neutron-proactive-backport-potential
summary: - [OVN] Stateless SG Extension Support
+ [OVN] Stateless SG Extension Support not working
summary: - [OVN] Stateless SG Extension Support not working
+ [OVN] Error 400 when creating stateless SG [Unrecognized attribute(s)
+ 'stateful']
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/816612
Committed: https://opendev.org/openstack/neutron/commit/c95ccf0a43f8f40ed6988d88fae01b225b68b43e
Submitter: "Zuul (22348)"
Branch: master

commit c95ccf0a43f8f40ed6988d88fae01b225b68b43e
Author: Ihar Hrachyshka <email address hidden>
Date: Thu Nov 4 03:02:03 2021 +0000

    ovn: enable stateless-security-group api

    The feature is long implemented but the list of extensions was not
    updated accordingly. Because of missing tempest test cases for the
    field, it was not caught before.

    Closes-Bug: #1949451
    Change-Id: I85f7749e7e6186b9e3a7534bce6c306b18702333

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron-tempest-plugin (master)

Reviewed: https://review.opendev.org/c/openstack/neutron-tempest-plugin/+/816613
Committed: https://opendev.org/openstack/neutron-tempest-plugin/commit/b0b597f803328b021474f1072f2cdeff9297391a
Submitter: "Zuul (22348)"
Branch: master

commit b0b597f803328b021474f1072f2cdeff9297391a
Author: Ihar Hrachyshka <email address hidden>
Date: Thu Nov 4 03:00:42 2021 +0000

    Add stateless security group test case

    It's a simple test case that creates, updates a stateless SG and
    checks that the attribute is updated accordingly.

    Related-Bug: #1949451
    Depends-On: I85f7749e7e6186b9e3a7534bce6c306b18702333
    Change-Id: I30e0a11c45618cbdaa0130942cb67ea99bbd0b92

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron (stable/xena)

Related fix proposed to branch: stable/xena
Review: https://review.opendev.org/c/openstack/neutron/+/821439

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

Fix proposed to branch: stable/xena
Review: https://review.opendev.org/c/openstack/neutron/+/821441

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron (stable/xena)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/821439
Committed: https://opendev.org/openstack/neutron/commit/cdf30d3e339567aab95e880c28fdde79a11c79fa
Submitter: "Zuul (22348)"
Branch: stable/xena

commit cdf30d3e339567aab95e880c28fdde79a11c79fa
Author: Ihar Hrachyshka <email address hidden>
Date: Thu Nov 4 03:16:55 2021 +0000

    Bump OVN version for functional job to 21.06

    This is needed to validate allow-stateless with the job.

    Related-Bug: #1949451
    Change-Id: I2e3d389552aeb4f454b01fe69198d759c8b2a039
    (cherry picked from commit 753693d315a79c84eabd3fd21f2b6f3f5bcef23f)

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

Reviewed: https://review.opendev.org/c/openstack/neutron/+/821441
Committed: https://opendev.org/openstack/neutron/commit/666562a258c00dc2cfcf6657ecb8343bc7703b75
Submitter: "Zuul (22348)"
Branch: stable/xena

commit 666562a258c00dc2cfcf6657ecb8343bc7703b75
Author: Ihar Hrachyshka <email address hidden>
Date: Thu Nov 4 03:02:03 2021 +0000

    ovn: enable stateless-security-group api

    The feature is long implemented but the list of extensions was not
    updated accordingly. Because of missing tempest test cases for the
    field, it was not caught before.

    Conflicts:
          neutron/common/ovn/extensions.py

    Closes-Bug: #1949451
    Change-Id: I85f7749e7e6186b9e3a7534bce6c306b18702333
    (cherry picked from commit c95ccf0a43f8f40ed6988d88fae01b225b68b43e)

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

This issue was fixed in the openstack/neutron 20.0.0.0rc1 release candidate.

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

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