7 Commits

Author SHA1 Message Date
Harald Jensås
2e36a4cfe9 Remove unused jinja code in network-isolation environment
Change I222873859af1b4ed1050cfffe55687b2f8d4c528 removed the
RedisVipPort using the {{primary_role_name}} jinja varialble.
The code to get the primary_role_name is no longer necessary.

Closes-Bug: #1808893
Change-Id: Id416786c85a48c598ccc8a9975bb07d7735df218
2019-01-14 12:49:56 +00:00
Harald Jensås
2f2d8183e6 L3 routed networks - subnet fixed_ips (3/3)
When using neutron routed networks we need to specify
either the subnet or a ip address in the fixed-ips-request
when creating neutron ports.

a) For the Vip's:

Adds VipSubnetMap and VipSubnetMapDefaults parameters in
service_net_map.yaml. The two maps are merged, so that the
operator can override the subnet where VIP port should be
hosted. For example:

parameter_defaults:
  VipSubnetMap:
    ctlplane: ctlplane-leaf1
    InternalApi: internal_api_leaf1
    Storage: storage_leaf1
    redis: internal_api_leaf1

b) For overcloud node ports:

Enrich 'networks' in roles defenition to include both
network and subnet data. Changes the list to a map
instead of a list of strings. New schema:

- name: <role_name>
  networks:
    <network_name>
      subnet: <subnet_name>

For backward compatibility a conditional is used to check
if the data is a map or not. In either case the internal
list of role networks is created as '_role_networks' in
the jinja2 templates.

When the data is a map, and the map contains the 'subnet'
key the subnet specified in roles_data.yaml is used as
the subnet in the fixed-ips-reqest when ports are created.
If subnet is not set (or role.networks is not a map) the
default will be {{network.name_lower}}_subnet.

Also, since the fixed_ips request passed to Vip ports are no
longer [] by default, the conditinal has been updated to
test for 'ip_address' entries in the request.

Partial: blueprint tripleo-routed-networks-templates
Depends-On: I773a38fd903fe287132151a4d178326a46890969
Change-Id: I77edc82723d00bfece6752b5dd2c79137db93443
2019-01-03 19:07:20 +01:00
Dan Sneddon
f543752da6 Fix issue where 2 Redis VIPs are assigned, but only one used.
There is an extra RedisVipPort defined in network-isolation.j2.yaml
which is unused. This will waste an IP address, and can lead to
confusion if there are multiple ports named RedisVipPort.

This patch removes the extra (unneeded) instance of the VIP.

Change-Id: I222873859af1b4ed1050cfffe55687b2f8d4c528
Closes-bug: 1717017
2017-09-20 10:40:46 -05:00
Dan Sneddon
9b08df3733 Remove extra noop.yaml ports from network-isolation files.
The environments/network-isolation[-v6].yaml files have an
unneeded reference to network/ports/noop.yaml for unused
networks.

This introduces a regression where environment files that
define the networks and ports on a per-role basis can
cancel out other environment files. See bug # 1717322.

The overcloud-resource-registry.j2.yaml already uses noop.yaml
for every network on every role (whether or not the networks
are enabled, or whether the particular network is supposed
to be on a role. So having noop.yaml specified for every
role in network-isolation[-v6].yaml is not needed and can
cause issues with upgrades if the environments are not
included in a specific order.

Change-Id: If06407e5235587af090ede44674bf9c7e08e340e
Closes-bug: 1717322
2017-09-14 13:46:02 -06:00
Dan Sneddon
48cf302fb9 Fix network-isolation.j2.yaml to ignore VIPs for disabled networks
This change modifies network-isolation.j2.yaml to ignore VIPs for
networks that are disabled. This fixes a bug where VIPs would be
created in network-isolation.yaml even if a network was disabled.

Change-Id: I331b8fec3847bce6ca6c22a9f173055121ef65c9
2017-07-20 13:19:29 -07:00
Michele Baldessari
47a9472c88 Fix network names when using network isolation
When we merged If3989f24f077738845d2edbee405bd9198e7b7db we correctly
used name_lower for most things but we left out the the
OS::TripleO::Network resource which would cause errors like the
following:

Could not fetch contents for file:///tmp/tripleoclient-LdqQGJ/tripleo-heat-templates/network/internalapi.yaml

The reason is that the network filename is called internal_api.yaml.

Change-Id: I40f268668ed948e5d41ed0ff5a8fc954cef7b17c
Closes-Bug: #1697883
2017-06-14 10:10:03 +02:00
Steven Hardy
cba5288867 Make network-isolation environment rendered for all roles
Currently there's some hard-coded references to roles here, rendering
from the roles_data.yaml is a step towards making the use of isolated
networks for custom roles easier.

Partial-Bug: #1633090
Depends-On: Ib681729cc2728ca4b0486c14166b6b702edfcaab
Change-Id: If3989f24f077738845d2edbee405bd9198e7b7db
2017-06-13 11:19:02 +01:00