159 Commits

Author SHA1 Message Date
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
Zuul
707cfc90c6 Merge "Remove deploy steps on empty roles" 2018-12-14 22:38:31 +00:00
Zuul
2ee47591ef Merge "Allow for service_bootstrap_ips empty list in IpListMap" 2018-12-14 14:03:55 +00:00
Rabi Mishra
571a764cba Allow for service_bootstrap_ips empty list in IpListMap
It seems in some cases we get an empty list for services in
service_bootstrap_ips and the yaql expression fails. Though
there can be better solution to not look for EnabledServices
for roles that has zero count, this would probably fix the
immediate scenario008 failures.

Change-Id: Ife1fc3f7736ed5743c80fa3748a75cb0bb52b817
Closes-Bug: #1808240
2018-12-14 03:48:56 +00:00
Thomas Herve
eb3efe7133 Remove deploy steps on empty roles
When a role count is 0, we can create the deployment resources
conditionally.

Closes-Bug: #1671859
Change-Id: I467b9ded1a1b33d520cb69aa86b253a0552643f7
2018-12-12 09:50:36 +01:00
Thomas Herve
862f52cce0 Put user data in the main stack
We create user data per instance, but two are global for all, and the
last one per role, so we can move it up the stack.

Change-Id: I1330e54744adef9be159edd8f01aefa3db85a480
2018-12-07 15:45:10 +01:00
Zuul
2485978bee Merge "Add SERVICE_bootstrap_node_ip values to allNodesConfig" 2018-12-06 11:49:36 +00:00
Steven Hardy
a77d045663 Add SERVICE_bootstrap_node_ip values to allNodesConfig
This can be used to replace the per-role bootstrap_nodeid_ip,
and the redis-base template is updated to use the new hiera
key.

The old bootstrap_nodeid_ip appears to only be used for redis,
so the old key is removed, with an upgrade release note added
should any out-of-tree services reference this value.

Partial-Bug: #1792613
Change-Id: I830d5b9bae3e9d65c2c393e3dcdf70bffdb1ac7b
2018-11-26 17:01:24 +00:00
Rabi Mishra
5d275fb922 Check for available networks for a role
For network isolation, we specifcy available networks for role.
Therefore, there is no point in creating noop network resources for
networks that are not available/connected. This results in redundant
host entries for not available networks on overcloud nodes.

If a network is not available for a role we don't need to create
those extra noop resources.

For Undercloud/Standalone role we keep all networks in roles data
as the default ServiceNetMap specifies non ctlplane networks though
they map to ctlplane.

Change-Id: I07822ec0cba7eed352c0010eb893b5e5a522e95c
Closes-Bug: #1800811
2018-11-19 10:14:34 +05:30
Juan Antonio Osorio Robles
cb3c72f37d Remove references to logging_source
This has been unused for a while, and even deprecation was scheduled
(although the patch never merged [1]). So, in order to stop folks
getting confused with this, it's being removed.

[1] https://review.openstack.org/#/c/543871/

Change-Id: Iada64874432146ef311682f26af5990469790ed2
2018-10-08 13:43:47 +03:00
Juan Antonio Osorio Robles
90234f4f2a Remove references to logging_group
This has been unused for a while, and even deprecation was scheduled
(although the patch never merged [1]). So, in order to stop folks
getting confused with this, it's being removed.

[1] https://review.openstack.org/#/c/543871/

Change-Id: Icc6b51044ccc826f5b629eb1abd3342813ed84c0
2018-08-29 13:43:30 +03:00
Zuul
85abf46ada Merge "Add BlacklistedIpAddresses stack output" 2018-08-17 11:30:36 +00:00
Zuul
9928adca3b Merge "Make Horizon's SECURITY_KEY 64 characters long" 2018-08-13 23:00:11 +00:00
James Slagle
aeded3e428 Add BlacklistedIpAddresses stack output
The output is a list of blacklisted server ip addresses on the ctlplane
network and will be used by the enable_ssh_admin workflow so that the
workflow does not operate on any blacklisted servers.

Change-Id: Ie96acf29a857e4801f5823f26a7de6bc989f39e2
Partial-Bug: #1785680
2018-08-06 14:17:14 -04:00
Zuul
dfc09b6ff1 Merge "ControlPlaneSubnetCidr using get_attr" 2018-07-24 01:34:20 +00:00
Harald Jensås
6ab86a3ebe ControlPlaneSubnetCidr using get_attr
Use get_attr on the server resource to resolve attribute
value from the subnet(s) and pass it to the parameter
'ControlPlaneSubnetCidr' used in the THT/network/config/*
templates.

As the value is now resolved from resource attributes,
this changes the default for 'ControlPlaneSubnetCidr' to ''
as well as the comment that these value should be overriden
in parameters_defaults. It also removes the parameter from
network-environment templates.

A conditinal is used in  puppet/role.role.j2.yaml so that
the parameter value is used whenever it is not '' (the
default) to provide backwards compatibility in case the user
set a different value (different from the one used in
undercloud.conf) for this parameter in
network-environment.yaml.

When deploying a routed control plane the network config
templates would previously need to be updated to carry
'ControlPlaneXSubnetCidr' parameter (in case the subnet
mask is not the same for all the routed network leafs).
With 8 Leafs in addition to the network local to the
undercloud that is 8 parameters less to place in the
configuration. By getting the value to pass from the
server resource this change reduces the required nic-config
template customisation (reduces the risk of user error).

Partial: blueprint tripleo-routed-networks-templates
Change-Id: I92ee0f9a2107cdf1ca5903d3756a235a79c36c73
2018-07-14 09:11:28 +02:00
Radomir Dopieralski
d5bfa09b4d Make Horizon's SECURITY_KEY 64 characters long
Our own security guide recommends it:
https://docs.openstack.org/security-guide/dashboard/secret-key.html

Change-Id: I7c85e9ff8b3bc92b80a3d0728f299ed1e4cb436c
2018-07-10 10:56:44 +02:00
James Slagle
7f42272024 Add AllNodesExtraMapData parameter
The AllNodesExtraMapData parameter is used to inject additional
hieradata into the all_nodes hierdata file on each node. The injected
data will be deeploy merged with the calculated all_nodes data for the
stack.

The parameter can be taken advantage of for split-controlplane use cases
where the hieradata from the control stack needs to be populated into
the separate compute stacks.

To easily get the hieradata out of the control stack, a new stack output
is added, AllNodesConfig.

Partially Implements: blueprint split-controlplane

Change-Id: I7b865bf82520006eef3ac2f36df34b1f3c34e642
2018-07-09 12:22:32 -04:00
Zuul
ddc6b91b5e Merge "Add default value for name_lower in network_data.yaml to update ServiceNetMap" 2018-06-30 09:22:04 +00:00
Bob Fournier
d3eb296e19 Add default value for name_lower in network_data.yaml to update ServiceNetMap
In Pike and later, the name_lower field in network_data.yaml can be
re-defined to contain a custom network name.  When this is done the
ServiceNetMap field must be overridden to reflect the new name in all
places.  This changes adds a new optional field to network_data.yaml
that should be set to the original default name_lower value.
ServiceNetMap will then be automatically updated and will not need
to be overridden.

This also fixes the VipPort naming for the StorageManagement network
to not use a static value.

Change-Id: I8a238038122288899cef49faf38ea2c2ffc2176b
2018-06-28 10:17:28 -04:00
Jill Rouleau
c16167f3d9 Enable Ansible error handling per role
Enable any_errors_fatal and max_fail_percentage Ansible options
to be set per TripleO role.  This change also provides a
structure by which future per-role Ansible options can readily
be added to group_vars.

Closes-Bug: 1760989
Change-Id: I47954717f42f14bae8d9fd2bd17cd8ea1fd787b3
2018-06-21 09:40:29 -07:00
Zuul
4fb30dd5ec Merge "Add BlacklistedHostnames stack output" 2018-06-14 19:04:30 +00:00
Alex Schultz
7c97320334 Use str_replace for known_hosts
There is a limit to how long input data can be for the heat script hook.
It turns out that data longer than 131072, will return an Argument list
to long error. To get around this, we need to pass this data in a
different way so that the heat script hook will work.

Change-Id: Ie3bd17ca9863e7687721e8c2628e485ea1849321
Closes-Bug: #1772071
2018-05-21 14:32:49 +00:00
Zuul
a7857d6dfc Merge "Revert "Switch public endpoints to use FQDNs by default"" 2018-05-17 21:56:29 +00:00
James Slagle
f254a2169d Revert "Switch public endpoints to use FQDNs by default"
This reverts commit 8e104b3c549118727b53c9825a438e799715b7f9.

https://review.openstack.org/#/c/559926/ introduced requiring CloudName.
This broke the documented deployment process. I also don't see how
CloudName can be required, but CloudDomain can not.

I don't see a technical reason why we can't keep the default as
localdomain. If necessary, we can instead add a parameter
validation instead of requiring the parameter.

Closes-Bug: #1771627
Depends-On: Ia86842b0b1f42512f25390d6bdb695e0f8133c6d
Change-Id: I2c5b511df50f29c63aa613899c2bebb506360bf4
2018-05-16 21:45:42 +00:00
Zuul
2e1e3fcd7f Merge "Make the KeystoneURL stack output versionless" 2018-05-14 23:37:13 +00:00
Zuul
f5152da976 Merge "Switch public endpoints to use FQDNs by default" 2018-05-14 23:27:04 +00:00
Carlos Camacho
44ef2a3ec1 Change template names to rocky
The new master branch should point now to rocky.

So, HOT templates should specify that they might contain features
for rocky release [1]

Also, this submission updates the yaml validation to use only latest
heat_version alias. There are cases in which we will need to set
the version for specific templates i.e. mixed versions, so there
is added a variable to assign specific templates to specific heat_version
aliases, avoiding the introductions of error by bulk replacing the
the old version in new releases.

[1]: https://docs.openstack.org/heat/latest/template_guide/hot_spec.html#rocky
Change-Id: Ib17526d9cc453516d99d4659ee5fa51a5aa7fb4b
2018-05-09 08:28:42 +02:00
Juan Antonio Osorio Robles
8e104b3c54 Switch public endpoints to use FQDNs by default
This is in preparation for TLS by default, since the TLS certificate will
use FQDNs for the SubjectAltName, and that will be verified.
This required for us to change both CloudDomain and CloudName to be
required parameters, and not default them to use localdomain. This is to
avoid folks in real deployments using them in their clouds.

Change-Id: Ic70dd323b33596eaa3fc18bdc69a7c011ccd7fa1
2018-05-08 18:16:27 +03:00
Juan Antonio Osorio Robles
9926359131 Make the KeystoneURL stack output versionless
Given that we have now moved all of the places where the keystone auth
URL is used to be versionless. We now make the KeystoneURL output to be
versionless as well.

Story: #2001897
Change-Id: I8c9fbfc77fe47e3ed2e58eac27119f86a045483c
2018-05-08 08:19:30 +00:00
James Slagle
262c0b4b86 Add BlacklistedHostnames stack output
The BacklistedHostnames stack output will be used as input into the
config-download-deploy workflow so that the hostnames can be excluded
from the Ansible deployment with config-download.

Change-Id: I4705be446756869ba3d04fc59daffa4d4748e12c
2018-05-01 16:42:32 -04:00
Zuul
1e2cdd60aa Merge "Support SshKnownHostsDeployment with config-download" 2018-03-29 21:45:09 +00:00
Zuul
3eb0c62e47 Merge "Remove unused minor update code" 2018-03-19 12:34:21 +00:00
James Slagle
088d5c12f0 Support SshKnownHostsDeployment with config-download
Add support for the SshKnownHostsDeployment resources to
config-download. Since the deployment resources relied on Heat outputs,
they were not supported with the default handling from tripleo-common
that relies on the group_vars mechanism.

Instead, this patch refactors the templates to add the known hosts
entries as global_vars to deploy_steps_playbook.yaml, and then includes
the new tripleo-ssh-known-hosts role from tripleo-common to apply the
same configuration that the Heat deployment did.

Since these deployments no longer need to be triggered when including
config-download-environment.yaml, a mapping is added that can be
overridden to OS::Heat::None to disable the deployment resources when
using config-download.

The default behavior when not using config-download remains unchanged.

Closes-Bug: #1746336
Change-Id: Ia334fe6adc9a8ab228f75cb1d0c441c1344e2bd9
2018-03-19 07:50:06 -04:00
Jiri Stransky
a782462a1a Remove unused minor update code
Since Pike, minor updates are done via the composable services
framework. The old shell script approach hasn't been used/tested for 2
releases now, and should be dropped.

Also drop the UpdateWorkflow interface. Before we started doing
upgrades via Ansible, we used this pluggable resource interface to
perform oneshot operations like migrations to WSGI or AODH
services. Nowadays this interface is not referenced from anywhere and
we'd probably rather do similar operations via Ansible tasks.

Change-Id: I6c5eafe76eb53bc38d100a9ba132dd8fe6dd2d5f
2018-03-15 18:27:14 +01:00
Thomas Herve
0ddfff79ee Do not use the 3rd argument of yaql groupBy
Due to an incompatible change in yaql, it's hard to use the aggregration
of groupBy as the behavior is completely different depending on the
version. Let's try to not rely on it.

Change-Id: I2887011f6baf4867d422579b116b5e143acf5679
Related-Bug: #1750032
2018-02-19 16:32:42 +01:00
Emilien Macchi
e897da3b69 Update YAQL queries with groupBy
YAQL introduced a backward incompatible change in one of its minor
versions:
3fb9178401 (diff-f36776b660e5fe4f88e3295e5b751396R215)

It changes the expected behavior of groupBy() aggregator, so we need to
update our queries otherwise it fails with a "list index out of range"
error.

Change-Id: I2ca2ebb2c8d22aeedbcb6920072db5b6dba3311b
Closes-Bug: #1750032
Co-Authored-By: Alex Schultz <aschultz@redhat.com>
2018-02-17 01:41:12 +00:00
Harald Jensas
77c82f6645 Add subnet property to ctlplane network for server resources
The subnet property is added to puppet/role.role.j2.yaml as
`{{role}}ControlPlaneSubnet`. Roles with a different subnet specified
can be used to deploy a routed network architecture by using one
role per routed network.

When enabling the neutron segments plug-in to support routed-networks
the neutron IPAM code will defer ipallocation unless the port create
request contain enough details. (Ref: LP Bug: #1695740) By adding the
subnet to port create request this change enables tripleo deployment
on an undercloud with Neutron segments plug-in and routed networks.

This depends on a Heat change that improves network logic in server
resource to not replace the current port if new props match what is
on the current interface. Without this adding the subnet property on
update/upgrades would cause a port replacement, which in turn would
cause IPAM info in undercloud neutron to miss-match the deployed
overcloud nodes.

Depends-On: Iab75ec49b962617943017dcaf1b04b89f91a982e
Change-Id: I33804bfd105a13c25d6057e8414e09957939e8af
Implements: blueprint tripleo-routed-networks-deployment
2018-02-02 09:53:03 +00:00
Zuul
4be52761af Merge "Allow defaults for Image/Flavor/RoleParameters in roles_data.yaml" 2018-01-24 02:28:57 +00:00
Steven Hardy
d006711426 Allow defaults for Image/Flavor/RoleParameters in roles_data.yaml
This allows specific roles, e.g ComputeRealTime to specify defaults
where the services are the same as some existing roles but a different
image and/or configuration are needed.

Inspired by discussion of this requirement in:
  https://review.openstack.org/#/c/531739/

RoleParametersDefaults is merged with the user provided parameters
with precendence to user parameters, as this is a special parameter,
which contains a map of the actual parameters to be applied to a
role.

Partially Implements: blueprint tripleo-realtime
Change-Id: I6497144340d3b9276e6ed141d3bc655bfbbeb53c
2018-01-19 11:06:36 +05:30
James Slagle
d4a5876e57 Also pass blacklisted hostnames
Workflows may need access to the list of blacklisted hostnames so they
can filter on that value. This change adds that input to the workflow
execution environment.

Change-Id: I41de32b324a406633699d17933ae05417b28c57b
Partial-Bug: #1743046
2018-01-15 15:26:11 +01:00
James Slagle
79570ed2b9 Workflow execution blacklist support
Workflows triggered from deploy-steps.j2 were not honoring the
blacklist, particularly ceph-ansible. This patch starts to address that
issue by passing in a list of blacklisted ip addresses to the workflow
execution environment that the workflow can make use of to filter
against ctlplane_service_ips.

Change-Id: Ic158171c629e82892e480f1e6903a67457f86064
Partial-Bug: #1743046
2018-01-15 15:25:49 +01:00
Zuul
f253c0d08d Merge "Add EndpointMapOverride parameter" 2017-12-04 23:09:48 +00:00
Zuul
fb8cad4b97 Merge "Add parameter ExtraHostFileEntries" 2017-11-28 11:40:41 +00:00
Steven Hardy
0f49e8eb8b Add EndpointMapOverride parameter
This allows overriding the calculated EndpointMap, which is useful
in some cases such as deploying compute-only stacks which reference
some existing endpoints from a controlplane stack.

The values can be generated like:

openstack stack output show controlplane EndpointMap

Or with https://review.openstack.org/#/c/521969/ applied to heatclient:

openstack stack output show controlplane EndpointMap --format yaml \
 | grep -A 1000 output_value | sed "s/^/  /" \
 | sed "1s/^/parameter_defaults:\n  EndpointMapOverride:\n/" | sed "/output_value/d"

Change-Id: Ie1185b99db1b0db93acaf0deae05bd7b707b442f
2017-11-23 11:59:00 +00:00
Steven Hardy
f2915552b9 Add parameter ExtraHostFileEntries
This allows passing hosts entries from an external stack, or
that references other external nodes.  This is useful in the
case where you want to split e.g controlplane nodes from compute
or similar.

As an example you could do something like this to generate an
environment file:

openstack stack output show controlplane HostsEntry | grep controller\
 | sed "s/|//g" | sed "s/^ */    - /" \
 | sed "1s/^/parameter_defaults:\n  ExtraHostFileEntries:\n/"

Change-Id: If26f87e3384e242ae637650adce7c5dba1611cdf
2017-11-23 11:58:25 +00:00
Carlos Camacho
927495fe3d Change template names to queens
The new master branch should point now to queens instead of pike.

So, HOT templates should specify that they might contain features
for queens release [1]

[1]: https://docs.openstack.org/heat/latest/template_guide/hot_spec.html#queens

Change-Id: I7654d1c59db0c4508a9d7045f452612d22493004
2017-11-23 10:15:32 +01:00
Oliver Walsh
61fcfca045 Refactor cellv2 host discovery logic to avoid races
The compute service list is polled until all expected hosts are reported or a
timeout occurs (600s).

Adds a cellv2_discovery flag to puppet services. Used to generate a list of
hosts that should have cellv2 host mappings.

Adds a canonical fqdn and that should match the fqdn reported by a host.

Adds the ability to upload a config script for docker config instead of using
complex bash on-liners.

Closes-bug: 1720821
Change-Id: I33e2f296526c957cb5f96dff19682a4e60c6a0f0
2017-11-08 23:20:46 +00:00
Steven Hardy
87735ac4bc Expose role tags via heat RoleTags output
This will enable easier consumption of the tags e.g via
the dynamic ansible inventory or workflows that run ansible

Change-Id: I8810240d012ff369991e5e6098e36aa3713e2615
2017-10-31 11:32:15 +00:00
Tim Rozet
9285cb5fc9 Fixes dynamic networks falling back to ctlplane
Currently when a network in network_data is disabled it no port
definitions for that network will be created per role.  This results in
no fallback to the ctlplane IP because overriding a type in
network-isolation to noop.yaml does nothing when the port does not exist
for the role.

This patch changes the IPs when a network is disabled to be the same IPs
as ctlplane and fixes the issue, along with removing the need to use
noop.yaml override for ports (non-vip).

Closes-Bug: 1721542

Change-Id: I301370fbf47a71291614dd60e4c64adc7b5ebb42
Signed-off-by: Tim Rozet <trozet@redhat.com>
2017-10-05 09:59:49 -04:00