Containerized haproxy does not open firewall when using composable roles

Bug #1697387 reported by Michele Baldessari
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Damien Ciabrini

Bug Description

So in https://github.com/openstack/tripleo-heat-templates/blob/master/docker/docker-steps.j2#L169 we have the following lines:
  {{role.name}}PuppetStepConfig:
    type: OS::Heat::Value
    properties:
      type: string
      value:
        yaql:
          expression:
            # select 'step_config' only from services that do not have a docker_config
            $.data.service_names.zip($.data.step_config, $.data.docker_config).where($[2] = null).where($[1] != null).select($[1]).join("\n")
          data:
            service_names: {get_param: [role_data, {{role.name}}, service_names]}
            step_config: {get_param: [role_data, {{role.name}}, step_config]}
            docker_config: {get_param: [role_data, {{role.name}}, docker_config]}

The problem is that in our current haproxy HA docker service we need both docker_config *and* step_config to do stuff. Namely in step_config we'd like to create the extra haproxy iptables rules that are needed when you split off galera/rabbit/etc off the haproxy nodes (controllers) whereas in docker_config we create the pacemaker bundle which manages the haproxy container.

In the current situation when we deploy an overcloud with galera and rabbitmq off to separate nodes, we can observe that the iptables rules on the haproxy node are not created:
https://github.com/openstack/tripleo-heat-templates/blob/master/docker/services/pacemaker/haproxy.yaml#L67

Tags: containers
summary: - In docker step_config is only run when docker_config is empty
+ Containerized haproxy does not open firewall when using composable roles
Revision history for this message
Michele Baldessari (michele) wrote :

We discussed this with shardy and there was always the assumption that docker_config and step_config was an either/or kind of thing. While we could change this back it would have a larger impact.

The other options we discussed are:
- Use host_prep_task
- Move the logic to tripleo::firewall
- Add a OS::Tripleo::HAProxyFirewallRules "service" that is still applied on the host for the docker case

Another option might be to just make it so that we can create the iptables rules on the host using a short-lived docker container.

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/473473

Changed in tripleo:
assignee: nobody → Damien Ciabrini (dciabrin)
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/473473
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=efb36b42d6e22327486f548209b2472ebf1fe276
Submitter: Jenkins
Branch: master

commit efb36b42d6e22327486f548209b2472ebf1fe276
Author: Damien Ciabrini <email address hidden>
Date: Mon Jun 12 15:37:15 2017 +0200

    Generate HAproxy iptables rules for containerized HA deployments

    The containerized HAproxy service can only specify steps to be run in
    containers, i.e. it cannot runs the regular puppet steps on bare metal
    at the same time. A side effect is that the dedicated HAproxy iptables
    rules are no longer generated.

    Update the docker_config step to fix the creation of iptables rules
    for HAproxy and persist them on-disk as before.

    Co-Authored-By: Michele Baldessari <email address hidden>

    Closes-Bug: 1697387

    Change-Id: Ib5a083ba3299a82645f1a0f9da0d482c6b89ee23

Changed in tripleo:
status: In Progress → Fix Released
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.

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.