[tripleo-heat-templates] The Referenced Attribute (ManagementPort ip_subnet) is incorrect

Bug #1575622 reported by Guillaume Chenuet
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Giulio Fidente

Bug Description

Hello,

When I tried to deploy an RHOSP8/RDO Liberty version with a management network and use the Predictable IPs functionality, I encounter this error:

"The Referenced Attribute (ManagementPort ip_subnet) is incorrect"

This is due to a misconfig on management_from_pool.yaml file.

The problem is in the ip_subnet function and more particularly on the network mask calculation:

  ip_subnet:
    description: IP/Subnet CIDR for the management network IP
    value:
      list_join:
      - ''
      - - {get_param: [IPPool, {get_param: ManagementNetName}, {get_param: NodeIndex}]}
        - '/'
        - {str_split: ['/', {get_param: ManagementNetCidr}, 1]}

The str_split function returned only the last number instead of the full network mask.
For and '/24' network mask, it returned only '4' .

I'm going to propose a fix to solve this issue.

Thanks,
Guillaume

Changed in tripleo:
assignee: nobody → Guillaume Chenuet (gchenuet)
summary: - [tripleo-heat-template] The Referenced Attribute (ManagementPort
+ [tripleo-heat-templates] The Referenced Attribute (ManagementPort
ip_subnet) is incorrect
Revision history for this message
Steven Hardy (shardy) wrote :

Can you confirm that you have ControlPlaneSubnetCidr as a string e.g '24' not 24 in the environment?

This looks similar to issues fixed via https://review.openstack.org/#/c/299664/ - your analysis is different, but I saw a similar error message because ip_subnet resolves to null in the output which consumes the non-string subnet.

Revision history for this message
Guillaume Chenuet (gchenuet) wrote :

Hi Steven,

The '24' are used with the 'ManagementNetCidr' parameter.
So yes, you're right the value is set without quotes.

But it's the same way for all networks CIDR params: InternalApiNetCidr, TenantNetCidr, etc.

One difference I saw between TripleO current release and RHOSP file config is the way to catch the network mask:

In TripleO mainstream code:
--
  ip_subnet:
    description: IP/Subnet CIDR for the storage network IP
    value:
      list_join:
      - ''
      - - {get_param: [IPPool, {get_param: StorageNetName}, {get_param: NodeIndex}]}
        - '/'
        - {str_split: ['/', {get_param: StorageNetCidr}, 1]}
--

In RHOSP 8:
--
ip_subnet:
    # FIXME: this assumes a 2 digit subnet CIDR (need more heat functions?)
    description: IP/Subnet CIDR for the internal API network IP
    value:
      list_join:
      - ''
      - - {get_param: [IPPool, {get_param: InternalApiNetName}, {get_param: NodeIndex}]}
        - '/'
        - {get_param: [InternalApiNetCidr, -2]}
        - {get_param: [InternalApiNetCidr, -1]}
--

All *-from_pool.yaml were modified except for management-from_pool.yaml file.

I'm in IRC (yaume) if you need more informations.

Thanks
Guillaume

Changed in tripleo:
status: New → Confirmed
importance: Undecided → High
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/319840

Changed in tripleo:
assignee: Guillaume Chenuet (gchenuet) → Giulio Fidente (gfidente)
status: Confirmed → In Progress
Changed in tripleo:
milestone: none → newton-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (master)

Reviewed: https://review.openstack.org/319840
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=6a962c59e902d626b11a9fea3825d0faaf2b3007
Submitter: Jenkins
Branch: master

commit 6a962c59e902d626b11a9fea3825d0faaf2b3007
Author: Giulio Fidente <email address hidden>
Date: Mon May 23 12:28:10 2016 +0200

    Update management_from_pool template version to 2015-10-15

    The str_split function was added after the 2015-04-30 release so
    it wasn't working as intended.

    Change-Id: Ib8827879182e6ea3bd2227b0cfa77f70aabb0ac6
    Closes-Bug: 1575622

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/319917

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/319919

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

Reviewed: https://review.openstack.org/319917
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=67558d78637584c74e0a2ada56b07305ed6df6a0
Submitter: Jenkins
Branch: stable/liberty

commit 67558d78637584c74e0a2ada56b07305ed6df6a0
Author: Giulio Fidente <email address hidden>
Date: Mon May 23 12:28:10 2016 +0200

    Update management_from_pool template version to 2015-10-15

    The str_split function was added after the 2015-04-30 release so
    it wasn't working as intended.

    Change-Id: Ib8827879182e6ea3bd2227b0cfa77f70aabb0ac6
    Closes-Bug: 1575622
    (cherry picked from commit 6a962c59e902d626b11a9fea3825d0faaf2b3007)

tags: added: in-stable-liberty
tags: added: in-stable-mitaka
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (stable/mitaka)

Reviewed: https://review.openstack.org/319919
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=f12588854274ab66824746519bf86614c29a1929
Submitter: Jenkins
Branch: stable/mitaka

commit f12588854274ab66824746519bf86614c29a1929
Author: Giulio Fidente <email address hidden>
Date: Mon May 23 12:28:10 2016 +0200

    Update management_from_pool template version to 2015-10-15

    The str_split function was added after the 2015-04-30 release so
    it wasn't working as intended.

    Change-Id: Ib8827879182e6ea3bd2227b0cfa77f70aabb0ac6
    Closes-Bug: 1575622
    (cherry picked from commit 6a962c59e902d626b11a9fea3825d0faaf2b3007)

Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/tripleo-heat-templates 5.0.0.0b1

This issue was fixed in the openstack/tripleo-heat-templates 5.0.0.0b1 development milestone.

Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/tripleo-heat-templates 2.1.0

This issue was fixed in the openstack/tripleo-heat-templates 2.1.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

This issue was fixed in the openstack/tripleo-heat-templates 2.1.0 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.