os-net-config - schema validation on routes fail if routes is []

Bug #1792992 reported by Harald Jensås
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
os-net-config
Fix Released
Undecided
Harald Jensås
tripleo
Fix Released
High
Harald Jensås

Bug Description

When support for routes was added to nic-config templates in Tripleo Heat templates the default is an empty list of routes. I.e []. Ref: https://review.openstack.org/#/c/580236/

os-net-config does not accept an empty list during schema validation. Schema validation fail with:

   items/oneOf/ovs_bridge/routes/minItems: [] is too short

[2018/09/17 04:42:37 PM] [WARNING] Config file failed schema validation at network_config/1:
    {'persist_mapping': False, 'addresses': [{'ip_netmask': '11.0.0.28/24'}], 'nic_mapping': None, 'routes': [], 'use_dhcp': False, 'type': 'interface', 'name': 'eth1'} is not valid under any of the given schemas
  Sub-schemas tested and not matching:
  - items/oneOf/interface/routes/minItems: [] is too short
Config file failed schema validation at network_config/3:
    {'persist_mapping': False, 'addresses': [{'ip_netmask': '12.0.0.34/24'}], 'nic_mapping': None, 'routes': [], 'use_dhcp': False, 'type': 'interface', 'name': 'eth3'} is not valid under any of the given schemas
  Sub-schemas tested and not matching:
  - items/oneOf/interface/routes/minItems: [] is too short

Changed in os-net-config:
assignee: nobody → Harald Jensås (harald-jensas)
Changed in tripleo:
importance: Undecided → High
summary: - os-net-config - schema validation on routes fail if routed is []
+ os-net-config - schema validation on routes fail if routes is []
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to os-net-config (master)

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

Changed in os-net-config:
status: New → In Progress
Changed in tripleo:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-net-config (master)

Reviewed: https://review.openstack.org/603192
Committed: https://git.openstack.org/cgit/openstack/os-net-config/commit/?id=acf646383ba1b5ecb982a0e57e093f841842c396
Submitter: Zuul
Branch: master

commit acf646383ba1b5ecb982a0e57e093f841842c396
Author: Harald Jensås <email address hidden>
Date: Mon Sep 17 19:33:15 2018 +0200

    Allow list_of_routes to be [] in config

    This changes the schema validation to allow an empty
    list of routes to be specified in the configuration.

    Closes-Bug: #1792992
    Change-Id: I808cdd9c352f3e0dd0b75b8b8b738b97d82da7c1

Changed in os-net-config:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to os-net-config (stable/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.openstack.org/608386

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-net-config (stable/rocky)

Reviewed: https://review.openstack.org/608386
Committed: https://git.openstack.org/cgit/openstack/os-net-config/commit/?id=bedb54a8a5d5caa5d022b4aa265a35a702e8dd87
Submitter: Zuul
Branch: stable/rocky

commit bedb54a8a5d5caa5d022b4aa265a35a702e8dd87
Author: Harald Jensås <email address hidden>
Date: Mon Sep 17 19:33:15 2018 +0200

    Allow list_of_routes to be [] in config

    This changes the schema validation to allow an empty
    list of routes to be specified in the configuration.

    Closes-Bug: #1792992
    Change-Id: I808cdd9c352f3e0dd0b75b8b8b738b97d82da7c1
    (cherry picked from commit acf646383ba1b5ecb982a0e57e093f841842c396)

tags: added: in-stable-rocky
Changed in tripleo:
milestone: stein-1 → stein-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/os-net-config 10.1.0

This issue was fixed in the openstack/os-net-config 10.1.0 release.

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/os-net-config 9.3.0

This issue was fixed in the openstack/os-net-config 9.3.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to os-net-config (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.opendev.org/731201

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-net-config (stable/queens)

Reviewed: https://review.opendev.org/731201
Committed: https://git.openstack.org/cgit/openstack/os-net-config/commit/?id=eacc5d8c05279172f1aaff8e3cf1c13cacbbfca7
Submitter: Zuul
Branch: stable/queens

commit eacc5d8c05279172f1aaff8e3cf1c13cacbbfca7
Author: Harald Jensås <email address hidden>
Date: Mon Sep 17 19:33:15 2018 +0200

    Allow list_of_routes to be [] in config

    This changes the schema validation to allow an empty
    list of routes to be specified in the configuration.

    Closes-Bug: #1792992
    Change-Id: I808cdd9c352f3e0dd0b75b8b8b738b97d82da7c1
    (cherry picked from commit acf646383ba1b5ecb982a0e57e093f841842c396)

tags: added: in-stable-queens
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/os-net-config queens-eol

This issue was fixed in the openstack/os-net-config queens-eol 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.