Change I5f5cec5a1622be4983b4d0db392453d1c489fa40 allowed the
net_config_override file to be yaml as well as json, but if
enable_validations is true the _validate_no_ip_change assumes the
network config is json.
This change loads this file as yaml in _validate_no_ip_change.
Change-Id: Iaeadf412865c059d252ffc7087db3853569b74ee
Related-Bug: #1927090
(cherry picked from commit f8ee246464)
In Train we still run Validation over Mistral for the Deployment which
is broken atm. Some pieces of the code has been dropped which make
the option --run-validations broken.
This review just call, like the undercloud-preflight Validations, the
Validation Framework instead of Mistral.
The results and output if some Validations failed will be easier to
debug, which is very difficult to do in the Mistral context.
Relared BZ:
https://bugzilla.redhat.com/show_bug.cgi?id=1974353
Change-Id: I88d7d09c2f3cf1b5bb23bca3e1436ea8e2ca0d07
This validation is no longer helpful, and it prevents deploying for
multi-architecture x86/ppc64le environments.
Change-Id: Ibb71e5dabaf09e45f0d2671aa0dfa60944728a2f
(cherry picked from commit f9e5d79f91)
The validations playbook is own and moved under the VF
ansible dir.
The undercloud preflight check should use VF for running it.
Change-Id: Id853b1e80d690734ac9c32a1b914e49608f6cc43
(cherry picked from commit 3dd2c83883)
(cherry picked from commit 8c7942ed25)
This change normalizes our client return formation by ensuring we're always
using the configured output path as defined within our constants.
Closes-Bug: #1868619
Change-Id: Ied051214c4d3f2a695d58a6cde6180f040ca02d4
Signed-off-by: Kevin Carter <kecarter@redhat.com>
(cherry picked from commit 8dc3273495)
Follow up for https://review.opendev.org/667380
Adds a validation to ensure that dns_nameservers
are used for all subnets if used. If not subnets
defines dns_nameservers they all fall back to
use undercloud_nameservers which was has been the
default for some time.
Relates-Bug: #1834306
Change-Id: I1cc1d20f8e15d531fb94b02c8d1313888fc8964d
Add a new option ``dns_nameservers`` in the subnet sections
for the undercloud ctlplane network. By default the option
is not set, and in that case the ``undercloud_nameservers``
are used, maintaining the current behaviour.
This decouples the nameservers used on the undercloud and
the ones used for the overcloud nodes. In a DCN setting
different DNS server may be preferred per-site.
Related-Bug: #1834306
Change-Id: I0dc03eddf9ea00ff33cd3ae0cdc8f42a4961e89c
We've retired the tripleo-ui repository so we need to remove the ui
configurations for the undercloud.
Change-Id: I536b2cf361cc4b2e47332bb9842d85ffe0643a60
Related-Bug: #1831478
We don't hardcode "python" anymore to run process_templates during the
pre-flight in _validate_env_files_paths, we now compute the python
version to execute with the right python binary.
Change-Id: Ie953cc8379532faa314b344d5423af672ab9d34d
Run a hostname preflight check when running the standalone as this can
cause issues with rabbit/mysql/pacemaker/puppet. The standalone check is
not run when an undercloud is being deployed or if output only is
specified. The undercloud has a different set of preflight checks run
prior to deployment so we do not need to rerun the hostname check when
the undercloud is being deployed.
Depends-On: https://review.openstack.org/#/c/634836/
Change-Id: I4de51d792f004575e0e802a1d340478d6ae9f848
Closes-Bug: #1814564
It's required to run TripleO Validation playbooks with Python3 on the
Undercloud.
blueprint python-3
Change-Id: I0600218163269409ae35ca34ffdfedb57926424e
Add a validation method to check for invalid (replaced/removed)
configuration options. Fail the validations if any such options
are detected in the configuration.
After the deprecation period is over and options are removed we
can add options to 'invalid_opts' to make sure users update
their configuration.
Closes-Bug: #1794038
Depends-On: Ia29a3aaeb23e63d68cfe4891436446093016ea3c
Change-Id: I26a1626aac9178ed87176b6577fcca970dfc182b
* Make dhcp_start and dhcp_end optional for subnet definitions
in undercloud.conf.
* Allow non-contiguous allocation pools for ctlplane subnets
Calcualte the allocation pools by removing the local_ip,
gateway, admin_host, public_host and ``inspection_iprange``,
from the subnets full ip range. Allocation_pools for all
remaining ranges will be configured. A new per-subnet option
``dhcp_exclude`` is added, a list of IP addresses or IP
ranges that will be excluded from the allocation pool. For
example:
dhcp_exclude = 172.20.0.101,172.20.0.210-172.20.0.219
^ ip addr ^ ip range
If dhcp_start is defined and dhcp_end is not defined (or vice
versa) any addresses prior to (or after) this address is
removed from the allocation pools.
Make dhcp_start and dhcp_end options ListOpts to enable non-
contigous allocation pools. For example, to create allocation
pools: [{'start': '172.20.0.100', 'end': '172.20.0.150'},
{'start': '172.20.0.200', 'end': '172.20.0.250'}]
the following configuration can be used in undercloud.conf:
dhcp_start = 172.20.0.100,172.20.0.200
dhcp_end = 172.20.0.150,172.20.0.250
A new method is added for remote_subnet_opts, same options as
for the local_subnet_opts but without the defaults.
To allow optional dhcp_start and dhcp_end for the local_subnet
which have defaults defined, a condition is used to ignore
dhcp_start and dhcp_end in case they are the default values
and the cidr is NOT the default.
Related-Bug: #1806512
Related-Bug: #1807707
Change-Id: I4ba148f465b4c452bd5b2c31009ac8a2897bcd5f
Converts stdout input from bytes to unicode to avoid printing lines
as b'<line>' on python3.
Address runtime warning related to deprecation of iter().
Stop using bugsize=1 as this is likely to break unicode encodings.
Usually an implementation using context managers would look much better
but due to several bugs related to only partial support of context
managers in py27 we cannot use them here.
Tested with py27 and py35-py37.
See: http://logs.openstack.org/37/616937/9/check/tripleo-ci-fedora-28-standalone/4a015f3/logs/undercloud/home/zuul/standalone_deploy.log.txt.gz#_2018-11-12_16_15_51
Change-Id: I00eaa508a6413c05c99beaca49e70c635a9116cc
Partial-Bug: #1787912
Add's a validation to undercloud preflight checks to ensure
eneble_routed_networks is True when multiple subnets is defined
in undercloud.conf.
Change-Id: I48ea4d70bf79c622f037469fa6d82eea7524b835
Closes-Bug: #1791034
When multiple subnets are configured validations where failing
becuase the admin and public host addresses where checked
for all subnets. The admin and public host addresses should
only be validated against the cidr of the local_subnet.
Closes-Bug: #1791088
Change-Id: Ie9a6f88cc449c135593a0df0426e4d8054b38183
This patch updates our Popen calls to enable universal newlines for
calls that we parse or consume the output for. Without
univeral_newlines=True, the output is treated as bytes under python3
which leads to issues later where we are using it as strings.
See https://docs.python.org/3/glossary.html#term-universal-newlines
Change-Id: Id0060a3abbcda8edb6124eb096cb824aaea48396
Currently, the preflight checks are run without any output.
This can be misleading, especially if we get an error on one
of the checks - no real way to know WHAT failed in the current
situation.
This easy log output helps the operator to know what's going on.
Change-Id: Ifbdbdb37431ad28fbd86993f9800bee8b3fbdd4a
Closes-Bug: 1783787
Enable disk space check on the undercloud in order to ensure we have
at least the minimal at disposal.
The check itself comes from the tripleo-validations repository in order
to avoid inconsistencies and do a first step toward ansible-driven
validations.
Change-Id: Ieea72ce2695683c5fb083887195044acbd6b92ee
Extend the tripleo client Command class to fetch heat roles data
from a role file. That new class method is shared by many derived
classes afterwards and used for containers images preparations,
containerized overcloud, undercloud and standalone deployments.
Apply normalization to the roles_file in plan management and
preflight checks as well.
Change-Id: I7b35e117b9d12f1e5a51e2ee0465244692d33e33
Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
In this case an additional architecture is any architecture that is NOT
the same as the one running the install.
Blueprint: multiarch-support
Change-Id: Idbf9d52515bddf598792bf4db71c56084c36075c
Undercloud deployment starts logging into its log file
too late, omitting log records from undercloud_config,
preflight checks. This is a problem as we want to log
at least the commands used for undercloud install/upgrade.
Ideally, messages in stdout/stderr should not miss the
log file.
Fix this via the added custom undercloud_log_file config
(use --log-file for standalone CLI). Use those to
configure logging to a file.
Fix missing formatting, like timestamps and source, for
undercloud config and preflight checks.
Write preflight/install/upgrade logs into the same
logfile.
Move the load oslo config method into shared utilities.
Add the configure logging shared utility for the classless
modules (w/o oslo_log supported). Such modules can
mimic oslo_log behavior defined for the main deployment
modules derived from openstack client classes, which
support logging to files natively and are not affected
by the subject issue. With an exception made for those
classless modules allowing them to log INFO+ be default.
So operators will have the pre-flight check
notes logged, for example.
Change-Id: I340be11bc9471df22f038629679634c3542d34d6
Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
The --templates path must match the -e path, e.g:
openstack overcloud upgrade prepare \
--templates ~/tripleo-heat-templates
-e ~/tripleo-heat-templates/*.yaml
Though, there are totally valid cases when --templates is
mixed with auto generated -e files residing in either temp
dirs or the user's home dir. For example, heat undercloud
installer generates such files. So we can not blindly
prohibit non matching --templates and -e's.
To adress that UX issue, add additional contstraints for
undercloud tht env files validation:
* "-e" files can not refer external files normally
processed from jinja2 in t-h-t. Those must come from
the templates path only.
NOTE: the similar change for overcloud should be done
in follow-ups.
Partial-bug: #1762403
Depends-On: I10d4dffcd3802f62fc824c808728c0b5b4f1002c
Change-Id: Ia9c62c787d6c581a66b2fde030a60499cfa18b82
Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
There is an issue with the _validate_no_ip_change function
where it doesn't work correctly with a custom net_config_override
file.
This patch resolves validation issue so that custom os-net-config
templates are taken into account. Additionally it makes it so
that the net_config_override can be empty, thus providing the
user a means of disabling os-net-config if they choose to do so.
Change-Id: I127c2742522e695dd1fd15413a47bf4d8ebea8fa
Related-bug: #1764507
When using public TLS and there is an external network
additionally to ctlplane, users might not expect to see
a preflight fails on validating that public VIP to belong
to control plane (internal) CIDR. This is as well valid in
general, only admin VIPs should be checked against that CIDR.
Change-Id: I010489f14ade757c35d04af68c328508a3ee46d3
Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
* Update config to use the same options used in
instack-undercloud for routed ctlplane network.
* Update pre-flight validations to validate all
the networks. (Also fix and re-enabled validations
that was disabled)
* Create input for OS::TripleO::Services::MasqueradeNetworks
Depends-On: Ide1267bfd9cc60d837dc823e4e106ac70dd2e5e6
Change-Id: I5fbac0c4a75ad2fb719bfd10887778c8eaeacfd6
Change Ib0c2e3ffd81742441400d27857afae457d71a424 moved the
undercloud-passwords.conf to constants.UNDERCLOUD_OUTPUT_DIR.
Re running undercloud installer fails becuase the preflight
validation does not find the password file if it the output
directory is not $HOME.
This changes the preflight code too use the constant specifying
the output dir.
Change-Id: Ib7dfe35b64509cb28ed4e2b5946a66aa4c8af95d
The validation is for existing ip == configured ip address but
the error message prints the value of CONF.network_cidr.
This patch changes the message to print the local_ip used in the
config.
Closes-Bug: #1756225
Change-Id: I045d72e48d63ab5b25858b5886578e18637c8d43