Bug 1392373

Summary: Neutron L3HA is turned on based on Controller count.
Product: Red Hat OpenStack Reporter: Gregory Charot <gcharot>
Component: rhosp-directorAssignee: Steven Hardy <shardy>
Status: CLOSED CURRENTRELEASE QA Contact: Marius Cornea <mcornea>
Severity: medium Docs Contact:
Priority: medium    
Version: 10.0 (Newton)CC: aschultz, dbecker, jslagle, mburns, mcornea, morazi, pbandark, rhel-osp-director-maint, roxenham, shardy
Target Milestone: ---Keywords: Triaged, ZStream
Target Release: 10.0 (Newton)Flags: pbandark: needinfo? (shardy)
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: puppet-tripleo-5.4.0-3.el7ost openstack-tripleo-heat-templates-5.1.0-6.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-07-17 21:12:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Gregory Charot 2016-11-07 11:15:17 UTC
Description of problem:

By default Neutron L3HA is automatically turned on based on the controller count. Since we now have composable roles it makes less sense to use ControllerCount as a test condition because users can move L3 Agents on dedicated nodes.

L3HA should be turn on automatically based on the number of L3 agents instead of number of controllers.

Version-Release number of selected component (if applicable):
10

How reproducible:
Every Time - from /usr/share/openstack-tripleo-heat-templates/puppet/services/neutron-api.yaml

conditions:

  auto_enable_l3_ha:
    and:
      - not:
          equals:
            - get_param: ControllerCount
            - 1
      - equals:
        - get_param: NeutronEnableDVR
        - false

(...)
neutron::server::l3_ha: {if: ["auto_enable_l3_ha", true, {get_param: NeutronL3HA}]}

Steps to Reproduce:
1. Deploy a 3 controllers / 1 Networker node (L3/DHCP/Metadata)
2.
3.

Actual results:
Can't create router as L3HA is turned on.

Expected results:

L3HA turned of as there is only one L3 agent.

Additional info:

Comment 1 Marius Cornea 2016-11-17 07:48:59 UTC
I tried to workaround this issue by setting NeutronL3HA: False in an environment but it doesn't work.

Comment 2 Steven Hardy 2016-11-17 09:00:58 UTC
This has already been discussed upstream in https://bugs.launchpad.net/tripleo/+bug/1629187  and I think we know what the fix is (move the conditional calculation into puppe-tripleo).

I'll look at getting a fix posted today.

Comment 3 Marius Cornea 2016-11-17 09:27:16 UTC
(In reply to Marius Cornea from comment #1)
> I tried to workaround this issue by setting NeutronL3HA: False in an
> environment but it doesn't work.

In the end I was able to workaround this issue by overriding the neutron::server::l3_ha hieradata:

parameter_defaults:
  ControllerExtraConfig:
    neutron::server::l3_ha: False

Comment 5 Gregory Charot 2016-11-17 15:26:32 UTC
NeutronL3HA: False does not work because auto_enable_l3_ha is set to one due to ControllerCount > 1.

Then neutron::server::l3_ha: {if: ["auto_enable_l3_ha", true, {get_param: NeutronL3HA}]} 

skips NeutronL3HA if auto_enable_l3_ha is true.

overriding the neutron::server::l3_ha hieradata indeed works but is not really convenient.

Cheers,
Greg

Comment 6 Steven Hardy 2016-11-17 15:28:01 UTC
> overriding the neutron::server::l3_ha hieradata indeed works but is not really convenient.

Yes, this is a reasonable interim workaround though I think.

Upstream patches posted which aim to resolve the issue:

https://review.openstack.org/#/c/398926/

https://review.openstack.org/#/c/398934/

Comment 7 Gregory Charot 2016-11-18 11:39:30 UTC
Agreed.

Thanks for the quick resolution Steve, much appreciated ! Please let us know whenever the fix is merged downstream.