vs_port: Port creation fails if name of a different port contains the name string

Bug #2043921 reported by Takashi Kajinami
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
puppet-vswitch
Fix Released
High
Takashi Kajinami

Bug Description

When there is a different ovs port and its name contains the name of the port being created, vs_port fails with execution error.

```
[root@localhost ~]# ovs-vsctl show
...
    Bridge testbr
        Port testbr
            Interface testbr
                type: internal
        Port mytestport
            Interface mytestport
                error: "could not open network device mytestport (No such device)"
...
[root@localhost ~]# cat port.pp
vs_port { 'testport':
  bridge => 'testbr'
}
[root@localhost ~]# sudo puppet apply --modulepath /usr/share/openstack-puppet/modules/ port.pp
Notice: Compiled catalog for localhost.localdomain in environment production in 0.04 seconds
Error: Execution of '/bin/ovs-vsctl -- --id=@1 create Interface name=testport -- set Port testport interfaces=@1' returned 1: ovs-vsctl: no row "testport" in table Port
Error: /Stage[main]/Main/Vs_port[testport]/interface: change from [] to ['testport'] failed: Execution of '/bin/ovs-vsctl -- --id=@1 create Interface name=testport -- set Port testport interfaces=@1' returned 1: ovs-vsctl: no row "testport" in table Port
```

Changed in puppet-vswitch:
importance: Undecided → High
assignee: nobody → Takashi Kajinami (kajinamit)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to puppet-vswitch (master)
Changed in puppet-vswitch:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to puppet-vswitch (master)

Reviewed: https://review.opendev.org/c/openstack/puppet-vswitch/+/901395
Committed: https://opendev.org/openstack/puppet-vswitch/commit/5b42cda62f4523a548f4bf9c213e89cb74251402
Submitter: "Zuul (22348)"
Branch: master

commit 5b42cda62f4523a548f4bf9c213e89cb74251402
Author: Takashi Kajinami <email address hidden>
Date: Sun Nov 19 20:33:38 2023 +0900

    vs_port: Avoid detecting partial name

    This ensures that a different port, which includes name of the port
    being created, is ignored when checking whether the target already
    exists.

    Closes-Bug: #2043921
    Change-Id: I4a8db4e7b0da87a00ef097c8e066a11bfc5fde90

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

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

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

Reviewed: https://review.opendev.org/c/openstack/puppet-vswitch/+/901491
Committed: https://opendev.org/openstack/puppet-vswitch/commit/25b990c44e7f428a414a4faa251db03e8d3687e9
Submitter: "Zuul (22348)"
Branch: stable/2023.2

commit 25b990c44e7f428a414a4faa251db03e8d3687e9
Author: Takashi Kajinami <email address hidden>
Date: Sun Nov 19 20:33:38 2023 +0900

    vs_port: Avoid detecting partial name

    This ensures that a different port, which includes name of the port
    being created, is ignored when checking whether the target already
    exists.

    Closes-Bug: #2043921
    Change-Id: I4a8db4e7b0da87a00ef097c8e066a11bfc5fde90
    (cherry picked from commit 5b42cda62f4523a548f4bf9c213e89cb74251402)

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

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

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

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

commit be085d00bd2dda8a731200614fedce7d546b18ce
Author: Takashi Kajinami <email address hidden>
Date: Sun Nov 19 20:33:38 2023 +0900

    vs_port: Avoid detecting partial name

    This ensures that a different port, which includes name of the port
    being created, is ignored when checking whether the target already
    exists.

    Closes-Bug: #2043921
    Change-Id: I4a8db4e7b0da87a00ef097c8e066a11bfc5fde90
    (cherry picked from commit 5b42cda62f4523a548f4bf9c213e89cb74251402)
    (cherry picked from commit 25b990c44e7f428a414a4faa251db03e8d3687e9)

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

Fix proposed to branch: stable/zed
Review: https://review.opendev.org/c/openstack/puppet-vswitch/+/902027

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

Reviewed: https://review.opendev.org/c/openstack/puppet-vswitch/+/902027
Committed: https://opendev.org/openstack/puppet-vswitch/commit/9bd6efffbec65a734d50021004fafa3db5e69596
Submitter: "Zuul (22348)"
Branch: stable/zed

commit 9bd6efffbec65a734d50021004fafa3db5e69596
Author: Takashi Kajinami <email address hidden>
Date: Sun Nov 19 20:33:38 2023 +0900

    vs_port: Avoid detecting partial name

    This ensures that a different port, which includes name of the port
    being created, is ignored when checking whether the target already
    exists.

    Closes-Bug: #2043921
    Change-Id: I4a8db4e7b0da87a00ef097c8e066a11bfc5fde90
    (cherry picked from commit 5b42cda62f4523a548f4bf9c213e89cb74251402)
    (cherry picked from commit 25b990c44e7f428a414a4faa251db03e8d3687e9)
    (cherry picked from commit be085d00bd2dda8a731200614fedce7d546b18ce)

tags: added: in-stable-zed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/puppet-vswitch 20.0.0

This issue was fixed in the openstack/puppet-vswitch 20.0.0 release.

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

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