neutron_network provider_segmentation_id broken

Bug #2072332 reported by Tim Bishop
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
puppet-neutron
Fix Released
Critical
Takashi Kajinami

Bug Description

On Ubuntu 22.04 with Neutron from 2024.1 and puppet-neutron version 24.0.0 I get the following error when using the provider_segmentation_id option to neutron_network:

Error: Execution of '/usr/bin/openstack network create --format shell vlan44 --share --project=admin --provider-network-type=vlan --provider-physical-network=physnet1 --provider-segmentation-id=44' returned 2: usage: openstack network create [-h] [-f {json,shell,table,value,yaml}]
                                [-c COLUMN] [--noindent] [--prefix PREFIX]
                                [--max-width <integer>] [--fit-width]
                                [--print-empty]
                                [--extra-property type=<property_type>,name=<property_name>,value=<property_value>]
                                [--share | --no-share] [--enable | --disable]
                                [--project <project>]
                                [--description <description>] [--mtu <mtu>]
                                [--project-domain <project-domain>]
                                [--availability-zone-hint <availability-zone>]
                                [--enable-port-security | --disable-port-security]
                                [--external | --internal]
                                [--default | --no-default]
                                [--qos-policy <qos-policy>]
                                [--transparent-vlan | --no-transparent-vlan]
                                [--provider-network-type <provider-network-type>]
                                [--provider-physical-network <provider-physical-network>]
                                [--provider-segment <provider-segment>]
                                [--dns-domain <dns-domain>]
                                [--tag <tag> | --no-tag]
                                <name>
openstack network create: error: unrecognized arguments: --provider-segmentation-id=44

The fix is pretty straightforward:

diff -ruN neutron/lib/puppet/provider/neutron_network/openstack.rb.orig neutron/lib/puppet/provider/neutron_network/openstack.rb
--- neutron/lib/puppet/provider/neutron_network/openstack.rb.orig 2024-06-17 14:49:49.780655809 +0100
+++ neutron/lib/puppet/provider/neutron_network/openstack.rb 2024-07-04 12:35:22.133007670 +0100
@@ -97,7 +97,7 @@

     if @resource[:provider_segmentation_id]
       opts << \
- "--provider-segmentation-id=#{@resource[:provider_segmentation_id]}"
+ "--provider-segment=#{@resource[:provider_segmentation_id]}"
     end

     if @resource[:router_external] == 'True'

But obviously not backwards compatible.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to puppet-neutron (master)
Changed in puppet-neutron:
status: New → In Progress
Revision history for this message
Takashi Kajinami (kajinamit) wrote :

The option was added a while back https://review.opendev.org/c/openstack/python-openstackclient/+/303224

I think this is the regression we introduced when replacing neutron CLI by openstack CLI... so we don't have to care about backwords compatibility and can just replace the wrong option.

Changed in puppet-neutron:
importance: Undecided → Critical
assignee: nobody → Takashi Kajinami (kajinamit)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to puppet-neutron (master)

Related fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/puppet-neutron/+/924561

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

Reviewed: https://review.opendev.org/c/openstack/puppet-neutron/+/923610
Committed: https://opendev.org/openstack/puppet-neutron/commit/035ecbaa3e6b556694da95664c327204affe21f8
Submitter: "Zuul (22348)"
Branch: master

commit 035ecbaa3e6b556694da95664c327204affe21f8
Author: Takashi Kajinami <email address hidden>
Date: Mon Jul 8 12:45:39 2024 +0900

    Fix wrong option to define provider segmentation id

    Fix the regression introduced by migration from neutron CLI to
    openstack CLI.

    Closes-Bug: #2072332
    Change-Id: Id719358010f6400c010f5aaca834d0a5ed46b871

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

Reviewed: https://review.opendev.org/c/openstack/puppet-neutron/+/924561
Committed: https://opendev.org/openstack/puppet-neutron/commit/f50297f3a30128de20997ded9559d8f8ea900efd
Submitter: "Zuul (22348)"
Branch: master

commit f50297f3a30128de20997ded9559d8f8ea900efd
Author: Takashi Kajinami <email address hidden>
Date: Sun Jul 21 21:48:13 2024 +0900

    Create vlan provider network

    ... to catch any regressions related to provider network options.

    Related-Bug: #2072332
    Depends-on: https://review.opendev.org/924565
    Change-Id: Idf32ab947e252ce618c5823dc861afa56e29cc18

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

Fix proposed to branch: stable/2024.1
Review: https://review.opendev.org/c/openstack/puppet-neutron/+/925100

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

Related fix proposed to branch: stable/2024.1
Review: https://review.opendev.org/c/openstack/puppet-neutron/+/925108

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

Fix proposed to branch: stable/2023.2
Review: https://review.opendev.org/c/openstack/puppet-neutron/+/925308

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

Reviewed: https://review.opendev.org/c/openstack/puppet-neutron/+/925100
Committed: https://opendev.org/openstack/puppet-neutron/commit/f81600bfe447c7f7f72f0073eee3648bcbd3920f
Submitter: "Zuul (22348)"
Branch: stable/2024.1

commit f81600bfe447c7f7f72f0073eee3648bcbd3920f
Author: Takashi Kajinami <email address hidden>
Date: Mon Jul 8 12:45:39 2024 +0900

    Fix wrong option to define provider segmentation id

    Fix the regression introduced by migration from neutron CLI to
    openstack CLI.

    Closes-Bug: #2072332
    Change-Id: Id719358010f6400c010f5aaca834d0a5ed46b871
    (cherry picked from commit 035ecbaa3e6b556694da95664c327204affe21f8)

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

Reviewed: https://review.opendev.org/c/openstack/puppet-neutron/+/925108
Committed: https://opendev.org/openstack/puppet-neutron/commit/944ba5cd3bd2627c110fd0ce9415a865cc0b0b9c
Submitter: "Zuul (22348)"
Branch: stable/2024.1

commit 944ba5cd3bd2627c110fd0ce9415a865cc0b0b9c
Author: Takashi Kajinami <email address hidden>
Date: Sun Jul 21 21:48:13 2024 +0900

    Create vlan provider network

    ... to catch any regressions related to provider network options.

    Related-Bug: #2072332
    Depends-on: https://review.opendev.org/925107
    Change-Id: Idf32ab947e252ce618c5823dc861afa56e29cc18
    (cherry picked from commit f50297f3a30128de20997ded9559d8f8ea900efd)

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

Related fix proposed to branch: stable/2023.2
Review: https://review.opendev.org/c/openstack/puppet-neutron/+/925314

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

Reviewed: https://review.opendev.org/c/openstack/puppet-neutron/+/925308
Committed: https://opendev.org/openstack/puppet-neutron/commit/ed01d7b9ec441a17111ee2156bea9a7f70fb2828
Submitter: "Zuul (22348)"
Branch: stable/2023.2

commit ed01d7b9ec441a17111ee2156bea9a7f70fb2828
Author: Takashi Kajinami <email address hidden>
Date: Mon Jul 8 12:45:39 2024 +0900

    Fix wrong option to define provider segmentation id

    Fix the regression introduced by migration from neutron CLI to
    openstack CLI.

    Closes-Bug: #2072332
    Change-Id: Id719358010f6400c010f5aaca834d0a5ed46b871
    (cherry picked from commit 035ecbaa3e6b556694da95664c327204affe21f8)
    (cherry picked from commit f81600bfe447c7f7f72f0073eee3648bcbd3920f)

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

Reviewed: https://review.opendev.org/c/openstack/puppet-neutron/+/925314
Committed: https://opendev.org/openstack/puppet-neutron/commit/40df6bf454ed94f23c3106271dcdae3991a8c2fe
Submitter: "Zuul (22348)"
Branch: stable/2023.2

commit 40df6bf454ed94f23c3106271dcdae3991a8c2fe
Author: Takashi Kajinami <email address hidden>
Date: Sun Jul 21 21:48:13 2024 +0900

    Create vlan provider network

    ... to catch any regressions related to provider network options.

    Related-Bug: #2072332
    Depends-on: https://review.opendev.org/925309
    Change-Id: Idf32ab947e252ce618c5823dc861afa56e29cc18
    (cherry picked from commit f50297f3a30128de20997ded9559d8f8ea900efd)
    (cherry picked from commit 944ba5cd3bd2627c110fd0ce9415a865cc0b0b9c)

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

Fix proposed to branch: stable/2023.1
Review: https://review.opendev.org/c/openstack/puppet-neutron/+/925561

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

Reviewed: https://review.opendev.org/c/openstack/puppet-neutron/+/925561
Committed: https://opendev.org/openstack/puppet-neutron/commit/691fd2063e2be590b04828b6032386615b0fa6f7
Submitter: "Zuul (22348)"
Branch: stable/2023.1

commit 691fd2063e2be590b04828b6032386615b0fa6f7
Author: Takashi Kajinami <email address hidden>
Date: Mon Jul 8 12:45:39 2024 +0900

    Fix wrong option to define provider segmentation id

    Fix the regression introduced by migration from neutron CLI to
    openstack CLI.

    Closes-Bug: #2072332
    Change-Id: Id719358010f6400c010f5aaca834d0a5ed46b871
    (cherry picked from commit 035ecbaa3e6b556694da95664c327204affe21f8)
    (cherry picked from commit f81600bfe447c7f7f72f0073eee3648bcbd3920f)
    (cherry picked from commit ed01d7b9ec441a17111ee2156bea9a7f70fb2828)

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

Related fix proposed to branch: stable/2023.1
Review: https://review.opendev.org/c/openstack/puppet-neutron/+/925699

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

Reviewed: https://review.opendev.org/c/openstack/puppet-neutron/+/925699
Committed: https://opendev.org/openstack/puppet-neutron/commit/f15a53bda3787db3c667cc84c6bf65fb64994863
Submitter: "Zuul (22348)"
Branch: stable/2023.1

commit f15a53bda3787db3c667cc84c6bf65fb64994863
Author: Takashi Kajinami <email address hidden>
Date: Sun Jul 21 21:48:13 2024 +0900

    Create vlan provider network

    ... to catch any regressions related to provider network options.

    Related-Bug: #2072332
    Depends-on: https://review.opendev.org/925562
    Change-Id: Idf32ab947e252ce618c5823dc861afa56e29cc18
    (cherry picked from commit f50297f3a30128de20997ded9559d8f8ea900efd)
    (cherry picked from commit 944ba5cd3bd2627c110fd0ce9415a865cc0b0b9c)
    (cherry picked from commit 40df6bf454ed94f23c3106271dcdae3991a8c2fe)

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

This issue was fixed in the openstack/puppet-neutron 22.0.1 release.

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

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