Commit Graph

25 Commits

Author SHA1 Message Date
Alex Schultz 38dcad9152 Remove validation scripts
Change-Id: I7f08047f1257ef530c8e33ed769bc87bbfbd51ff
Depends-On: https://review.rdoproject.org/r/#/c/29054/
2020-09-04 15:28:18 -06:00
Cédric Jeanneret 0a27ab493b Small improvement on the default gateway(s) detection
Change-Id: I98cc39bc909b63b57e366cbb787f655097dfe254
2020-07-29 11:46:21 +00:00
Alex Schultz ed2df1a05f Remove ValidateNtp
We already do this in the time configuration and it is no longer a
configurable item due to containers. Let's stop doing this in the all
nodes validation and let the time configuration handle the failure
messaging.

Change-Id: Ib0abcbd25117ecd587f4a92698746e5e256e6e8e
2020-06-04 03:40:05 +00:00
Mihai Plasoianu ab02fbe75d Fix validation script
This change adds support for special routes on the host. Without this
the validation fails if any routes are present that don't have an IP
address in the first column, like blackhole, prohibit, throw, etc.
Instead of piping a bunch of `grep -v`, the regex filters all cases by
capturing all lines that start with an IP address. The regex doesn't
capture only valid IP addresses, but it should do just fine here.

Change-Id: I933b33ccf22fb42695be6ec9a5e62506a1b355fd
2020-04-27 16:25:34 +02:00
Alex Schultz 7ac8cf9c28 Make comparisons case insensitive
If the values for the conditional checks are "true" rather than "True",
they would be skipped. Let's force the variable contents to lowercase to
remove the possibility of skipping the check when the value is "true"

Change-Id: I9f288ee2771c0a954beee085b6df650419978422
Closes-Bug: #1833441
2019-06-19 10:01:41 -06:00
James Slagle ec68f1740c Use ansible for AllNodesValidationConfig
Replaces the Heat SoftwareDeployment resoure for
AllNodesValidationConfig with an Ansible stask instead.

Depends-On: I0b3188ef45dc379f83c36561616b422418845b66
Change-Id: I6e8f8f29cf9ef906b9be55f27aa536d8cc200190
implements: blueprint reduce-deployment-resources
2019-06-15 03:49:06 +00:00
Andreas Karis cb668e6b4c Optional ICMP validation of controllers and gateways
OpenStack Director uses ICMP packets during deployment to test
if overcloud nodes and the gateway are up. Make this validation
optional.

Closes-Bug: 1805703
Change-Id: I47835cae509f14c4ed51f4f6506a73070a125ca4
2019-01-28 17:18:27 +00:00
Jill Rouleau 971d97bf99 Correct file modes for rpmlint failures
Numerous files have incorrect modes set. Correct these so that executables
have 755 and yaml files are 644 to address rpmlint errors.

Change-Id: I8db36209b41a492f6b85e3469994de884bf556e8
2018-12-14 13:21:28 -07:00
Alex Schultz 1e5ccb4c7d Handle python binary look for scripts
We have some scripts that we deploy via tripleo that use inline python.
For this we need to be able to find an available python on the system in
order for it to work. This change adds a lookup function to the scripts
to find a working version of python as /usr/bin/python may not exist.

Change-Id: Ida7a7cbd064ebdb923f38c9102eb4b0771f9b273
Related-Blueprint: python3-support
2018-11-26 16:48:51 +00:00
Bob Fournier ae3379e070 Ping default gateways before controllers
It may be necessary, in certain situations when using IPv6,
to ping the default gateways first before attempting to
ping other hosts in the validation script.  This swaps the
order of the pings between the controllers and default gateways.

Change-Id: I14b7fcffb0609aee3f0f53150496461396348322
Closes-Bug: 1793598
2018-09-26 19:06:57 +00:00
Alex Schultz e0f6f9838f Add chrony support to validations
If ntpdate is not available, use chrony as that is a default package
shipped since CentOS7.

Change-Id: I6155508b491623de1370b9e78907bc36523409b5
Related-Blueprint: tripleo-chrony
2018-09-04 14:17:21 -06:00
Alex Schultz aa1b108760 Fix all-nodes.sh for python3
The unicode function no longer exists in python3 so let's just designate
the string as unicode since we're doing replacement in bash anyway.

Change-Id: I3226a3a16eec711097c30929946cb2d36646c4cc
Related-Blueprint: python3-support
2018-08-27 16:38:38 -06:00
Harald Jensas d0a03972a6 Use ipaddress module
This patch replaces use of ipaddr python module with
ipaddress module. The ipaddr has been superseded by the
ipaddress module.

Also install python-ipaddress instead of python-ipaddr in
deployed-server bootstrap scripts.

Closes-Bug: #1751934
Change-Id: I63ae89869c8994e17b3460f9ae94e5fa922f6237
2018-02-27 18:01:21 +01:00
Oliver Walsh 6a64a4a9d2 Tolerate network errors in pingtest retry logic
We use ping -w <deadline> -c <count>. This will ping every second until
<count> replies are received, or <deadline> is reached, or a network error occurs.

With the current retry logic a network error will result in a short tight loop
instead of waiting for the network to come up.

This change reduces the deadline to 10s, but sleeps 60s between retries.

Change-Id: Ib00cff6f843c04a00737b40e3ef3d1560d6e6d2d
Related-bug: #1680167
2017-06-30 11:56:55 +01:00
Matthew Flusche cc1a8f9987 Validate NTP servers
Adds a validation to ensure at least one NTP source
is available.

Misconfigured or inaccessible NTP servers is a
common source of erratic behavior and failures. This
validation will ensure a NTP source is available
or fail with debug output from ntpdate.

The heat boolean: ValidateNtp can be set to disable
this check.

Change-Id: Ie93f943b53bf3a1b60a536df4a28ae203d98988f
2017-04-13 19:54:56 +00:00
Matthew Flusche bae2d11393 FQDN validation
Adds optional validation to ensure FQDN set by Nova matches /etc/hosts
as created by overcloud heat configuration.

Consistent FQDN requires the nova parameter [Default]/dhcp_domain to
match the CloudDomain tht parameter.

This validation is disabled by default.

Change-Id: Ib5689acae66baf63ecccbc3b1c0b96684781b863
2017-02-14 17:39:35 +00:00
Feng Pan 099ac31f8f Change ping wait flag
This is an optimization of the ping command. It changes ping test
from waiting for a single sent packet for 300 seconds to waiting
to receive a packet from any number of sent packets. The current
implemenation waits for full 300 seconds before retrying if we
do not get a reply for the first packet sent. By using -w flag,
we keep sending icmp packets until a reply is sent, making the
ping test more responsive to connectivity change.

Change-Id: I01ab374ae44718c8d56e2d7f35812dfb5bb2ce5a
Signed-off-by: Feng Pan <fpan@redhat.com>
2016-05-09 20:22:52 -04:00
Dan Prince 1c8ad9f41d Add ping_retry function
This patch cleans up the retry logic so that it is all
consolidated in the same function.

Change-Id: I003afe4963e2af8d55f11a4ae4867e563a22134f
Related-bug: #1567011
2016-04-13 22:42:54 -04:00
Dan Prince 8557ab7123 Revert "Ping retry"
This reverts commit 570c690bfb.

This patch broke the ping_gateway_function when using IPv6
network isolation.

Change-Id: I57850a527804f2e753270fd9063d119d41a83b17
Closes-bug: #1567011
2016-04-06 14:18:03 -04:00
Joe Talerico 570c690bfb Ping retry
The single ping method in the validation script is causing for
deployments to fail. When reviewing the network connectivity, we are
finding we actually do have connectivity
( https://gist.github.com/jtaleric/0276a117625e44993be0 ). This patch is
to change the ping count from 1 to 10, to ensure the network is up.

Closes-Bug: 1563521
Change-Id: I9772407554dffa91978a49a16490ef9ed448a054
2016-03-29 18:40:12 -04:00
Dan Prince bbb3853486 Use set -e for validation-scripts/all-nodes.sh
Update this script to use 'set -e' for all commands except
the ping checks themselves which we allow to fail so we
can give enhanced output.

This resolves an issue where some commands could fail and cause
an undetectable error (the scripted exits with success) thus causing
a case where Heat won't detect any network errors at all. This
was recently the case with git commit 45be848 where we switched
to use python -c 'import ipaddr' which wasn't even installed as a
library on our overcloud nodes, thus causing all network validations
to silently fail.

Change-Id: I40ed6a537136e866357cc0d9304e905afdd28522
Depends-On: Ia617f44b4673b89202e5e5cdcac9b50f46b3e6c8
Related-bug: #1551048
2016-02-29 08:18:14 -05:00
marios 45be848991 Adds v6 capability to the deploy validation test (pings)
This changes the ping_controller_ips function in the all-nodes.sh
bash validation script which is run during deployment to check
network connectivity (to fail early).

The main differences are using the v6 routes when it is a v6 address
and using python -c to check if the v6 address is in the network and
(thanks emachi!) using ping6 instead of ping.

Closes-Bug: 1534578
Change-Id: Id41950f767e11884b4123fcb0bd2339636fdda68
2016-01-20 11:53:29 +02:00
Dan Prince d148ddbe78 Add validation to ping the default gateway(s)
This patch adds a new function that runs on all nodes so that
all default gateways are ping tested early on during the
installation process (before any puppet is executed)

Note: this change depends on the static control plane network IPs
because some distros allow/create multiple default routes without
this patch (see depends-on below).

Depends-On: Ib267e6dcf2d5ff77f7a82ee20a123965c2d07565

Change-Id: Ida125e79f3e549cae66be9dbd562197afa6400a5
2015-10-21 16:47:50 -04:00
Giulio Fidente 9a7c55e4a7 Ensure ping returns after 5mins timeout
This change ensures the validation script returns (with a failure)
if the ping command remains stuck waiting for a response for more
than 5 minutes.

Change-Id: Ib184a01e04fe3c5e3ad13757a355735fff84548d
2015-10-21 17:26:34 +02:00
Dan Prince a6861730bd network validation to ping test each interface
This patches wires in a new "all nodes" validation resource
that can be used to add validations that occur early on
during the deployment process. This occurs after the nodes
have been brought online and the initial networks
have been configured but before any "post" (puppet, etc.)
sort of configuration has been executed.

A initial validation script has been added to ping test network IPs
on each network. When using network isolation this will ensure
network connectivity (vlans, etc) are working on each
node and if not the heat stack will fail early, allowing
time to fix the network connections and retry the
stack creation via an update.

Change-Id: I63cf95b27e8ad2aed48718cf84df5f324780e597
Co-Authored-By: Ian Main <imain@redhat.com>
Co-Authored-By: Ryan Hallisey <rhallise@redhat.com>
2015-07-24 16:36:57 -04:00