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
In Progress
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)
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.