Deployed Server Fake Neutron Port does not match neutron API

Bug #1772396 reported by Harald Jensås
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Medium
Harald Jensås

Bug Description

TripleO's deployed server interface implements a fake neutron port[1].

In the example provided for the DeployedServerPortMap the cidr parameter exampled is just the prefix_length, not the full network address as it would be if asking neutron for the same data. E.g:

        gatsby-ctlplane:
          fixed_ips:
            - ip_address: 127.0.0.1
          subnets:
            - cidr: 24"

The example should read 127.0.0.0/24 to match the Neutron API[2].

The container undercloud uses this and it passes just the prefix length, not the actual CIDR

  Since the fake port does not actually return what an actual neutron port returns this becomes a problem when trying to improve THT to require less user provided parameters. Ref: https://review.openstack.org/#/c/569547/7/puppet/role.role.j2.yaml

[1] https://github.com/openstack/tripleo-heat-templates/blob/master/deployed-server/deployed-neutron-port.yaml#L15
[2] https://developer.openstack.org/api-ref/network/v2/#id189
[3] https://github.com/openstack/python-tripleoclient/blob/master/tripleoclient/v1/tripleo_deploy.py#L265-L279

description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to python-tripleoclient (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/569789

Changed in tripleo:
assignee: nobody → Harald Jensås (harald-jensas)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (master)

Fix proposed to branch: master
Review: https://review.openstack.org/569791

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to tripleo-quickstart-extras (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/570696

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

Reviewed: https://review.openstack.org/569789
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=4ad7dff959be3fbc78cd62798ad5a7c414f8a10a
Submitter: Zuul
Branch: master

commit 4ad7dff959be3fbc78cd62798ad5a7c414f8a10a
Author: Harald Jensås <email address hidden>
Date: Mon May 21 14:10:32 2018 +0200

    Deployed Server - portmap should match neutron API

    The cidr property for a Neutron subnet should contain
    the network cidr, not the network prefixlen.

    The example portmap for the fake neutron port in tripleo
    depleoyed-server is not correct. We should pass the
    netowork cidr in the subnets so that the fake neutron
    port subnets attribute return something that match
    what an actual neutron port would return.

    Change-Id: I0f8cad690a178e7b70044c38b2277a51ae3734eb
    Related-Bug: #1772396

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (master)

Reviewed: https://review.openstack.org/569791
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=96a5a4936b9a9e38ed0ef7ffb86124ced731049d
Submitter: Zuul
Branch: master

commit 96a5a4936b9a9e38ed0ef7ffb86124ced731049d
Author: Harald Jensås <email address hidden>
Date: Mon May 21 14:44:03 2018 +0200

    Deployed Server - portmap should match neutron API

    The cidr property for a Neutron subnet should contain
    the network cidr, not the network prefixlen.

    This change fixes the example provided in the description
    for the fake neutron port in deployed-server.

    Closes-bug: #1772396
    Depends-On: I0f8cad690a178e7b70044c38b2277a51ae3734eb
    Change-Id: I8b00eda3a9c047ce73aad11cac9b13bca653c544

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

Reviewed: https://review.openstack.org/570696
Committed: https://git.openstack.org/cgit/openstack/tripleo-quickstart-extras/commit/?id=dca6c0d03a9b864f56bbfc428e115f2c18011aef
Submitter: Zuul
Branch: master

commit dca6c0d03a9b864f56bbfc428e115f2c18011aef
Author: Harald Jensås <email address hidden>
Date: Mon May 28 01:04:46 2018 +0200

    Deployed Server - portmap should match neutron API

    The cidr property for a Neutron subnet should contain
    the network cidr, not the network prefixlen.

    The example portmap for the fake neutron port in tripleo
    depleoyed-server is not correct. We should pass the
    netowork cidr in the subnets so that the fake neutron
    port subnets attribute return something that match what
    an actual neutron port would return.

    Related-Bug: #1772396
    Change-Id: I45f5cd1924c1d74cf12719dbed160ea960478850

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-heat-templates 9.0.0.0b3

This issue was fixed in the openstack/tripleo-heat-templates 9.0.0.0b3 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to tripleo-quickstart-extras (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/572835

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

Reviewed: https://review.openstack.org/572835
Committed: https://git.openstack.org/cgit/openstack/tripleo-quickstart-extras/commit/?id=91e5aceaac2a0b44a2d2fa5e8ddac8240577ea8b
Submitter: Zuul
Branch: master

commit 91e5aceaac2a0b44a2d2fa5e8ddac8240577ea8b
Author: Harald Jensås <email address hidden>
Date: Wed Jun 6 18:48:24 2018 +0200

    Fix typo in config-download template so it match neturon api

    The DeployedServerPortMap need to use keys matching the neutron
    api. This change replaces 'subnet' with 'subnets'.

    Related-Bug: #1772396
    Change-Id: I8fdc7e711972e7ac488216db35409058c2c9cbcc

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.