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