tripleo-heat-templates for Cisco Ml2 plugins to be made compatible with composable roles

Bug #1704853 reported by Sandhya Dasu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Sandhya Dasu

Bug Description

Not all ML2 plugins have moved to the new composable role model. This is causing the triplet-heat-templates for these plugins to ignore Compute hosts that have been assigned composable roles.

For example in:
https://github.com/openstack/tripleo-heat-templates/blob/master/puppet/extraconfig/all_nodes/neutron-ml2-cisco-nexus-ucsm.yaml, line numbers 185 to 191.

Pasting for reference:
CollectMacDeploymentsCompute:
    type: OS::Heat::SoftwareDeployments
    properties:
      name: CollectMacDeploymentsCompute
      servers: {get_param: [servers, Compute]}
      config: {get_resource: CollectMacConfig}
      actions: ['CREATE'] # Only do this on CREATE

This block of code assumes that the compute role is called "Compute". When compute hosts are assigned different role names, then this block of code just ignores all compute hosts.

The above block of code should be able to act on a set of compute hosts with roles containing the substring "compute". The server specification should take a regular expression rather than a fixed role called "Compute".

Changed in tripleo:
status: New → Triaged
importance: Undecided → High
milestone: none → pike-3
Revision history for this message
Steven Hardy (shardy) wrote :

I would make this bug specific to the cisco integration, then we can raise follow-up bugs for any other integrations which need updating.

I think the cisco integration is something of a special case, because it won't convert cleanly to a composable service due to this logic that collects mac addresses:

https://github.com/openstack/tripleo-heat-templates/blob/master/puppet/extraconfig/all_nodes/neutron-ml2-cisco-nexus-ucsm.yaml#L158

I think the simplest short term approach is to convert the
neutron-ml2-cisco-nexus-ucsm.yaml to
neutron-ml2-cisco-nexus-ucsm.j2.yaml and use jinja2 templating (as in
many other places in t-h-t to support custom roles) to template the
yaml file for all roles. This could be considered a bugfix and
probably backported to newton I think, then we can consider options for refactoring into composable service templates as a second step.

I think you'll need a
j2 loop similar to this:

https://github.com/openstack/tripleo-heat-templates/blob/master/extraconfig/all_nodes/swap.j2.yaml#L42

There are some details about how this works in this blog post:

https://hardysteven.blogspot.co.uk/2016/10/tripleo-composablecustom-roles.html

You can test it by renaming your current yaml file, then running
./tools/process-templates.py (which does the same rendering we do on
plan creation in tripleo-common)

summary: - triplet-heat-templates for non-composable roles to be made compatible
- with composable roles
+ cisco-nexus-ucsm integration not compatible with custom roles
Sandhya Dasu (sadasu)
summary: - cisco-nexus-ucsm integration not compatible with custom roles
+ tripleo-heat-templates for Cisco Ml2 plugins to be made compatible with
+ composable roles
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/484861

Changed in tripleo:
assignee: nobody → Sandhya Dasu (sadasu)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (master)

Reviewed: https://review.openstack.org/484861
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=605ad6f65d35384353caa5046a9b105a2e99b384
Submitter: Jenkins
Branch: master

commit 605ad6f65d35384353caa5046a9b105a2e99b384
Author: Sandhya Dasu <email address hidden>
Date: Tue Jul 18 11:44:17 2017 -0400

    Modifying Cisco templates to support composable roles

    Change-Id: I21fee832aeeb9780f818ae869ea8714f28bbe4a0
    Closes-bug: #1704853

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/ocata)

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/487146

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

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/487164

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

Reviewed: https://review.openstack.org/487164
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=058b8559a269e162bb8dcc8664bd486714236dab
Submitter: Jenkins
Branch: stable/newton

commit 058b8559a269e162bb8dcc8664bd486714236dab
Author: Sandhya Dasu <email address hidden>
Date: Tue Jul 25 14:04:14 2017 -0400

    Modifying Cisco templates to support composable roles

    Change-Id: I21fee832aeeb9780f818ae869ea8714f28bbe4a0
    Closes-bug: #1704853
    (cherry picked from commit 605ad6f65d35384353caa5046a9b105a2e99b384)

tags: added: in-stable-newton
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-heat-templates 7.0.0.0b3

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

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

Reviewed: https://review.openstack.org/487146
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=eeaa2351118946d15dead4868a35970e9b0900f9
Submitter: Jenkins
Branch: stable/ocata

commit eeaa2351118946d15dead4868a35970e9b0900f9
Author: Sandhya Dasu <email address hidden>
Date: Tue Jul 25 13:20:17 2017 -0400

    Modifying Cisco templates to support composable roles

    Change-Id: I21fee832aeeb9780f818ae869ea8714f28bbe4a0
    Closes-bug: #1704853
    (cherry picked from commit 605ad6f65d35384353caa5046a9b105a2e99b384)

tags: added: in-stable-ocata
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-heat-templates 5.3.1

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

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

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