Browse Source

Merge "Remove ValidateNtp" into stable/ussuri

changes/42/734642/1
Zuul 4 weeks ago
committed by Gerrit Code Review
parent
commit
6f7813c7bc
5 changed files with 8 additions and 58 deletions
  1. +0
    -6
      all-nodes-validation.yaml
  2. +0
    -6
      ci/common/all-nodes-validation-disabled.yaml
  3. +0
    -6
      common/deploy-steps.j2
  4. +8
    -0
      releasenotes/notes/remove-ValidateNtp-15724eaa8345aa4f.yaml
  5. +0
    -40
      validation-scripts/all-nodes.sh

+ 0
- 6
all-nodes-validation.yaml View File

@@ -22,10 +22,6 @@ parameters:
default: false
description: Optional validation to ensure FQDN as set by Nova matches the name set in /etc/hosts.
type: boolean
ValidateNtp:
default: true
description: Validation to ensure at least one time source is accessible.
type: boolean

resources:
AllNodesValidationsImpl:
@@ -37,8 +33,6 @@ resources:
default: {get_param: PingTestIps}
- name: validate_fqdn
default: {get_param: ValidateFqdn}
- name: validate_ntp
default: {get_param: ValidateNtp}
- name: validate_controllers_icmp
default: {get_param: ValidateControllersIcmp}
- name: validate_gateways_icmp


+ 0
- 6
ci/common/all-nodes-validation-disabled.yaml View File

@@ -16,10 +16,6 @@ parameters:
default: false
description: Optional validation to ensure FQDN as set by Nova matches the name set in /etc/hosts.
type: boolean
ValidateNtp:
default: true
description: Validation to ensure at least one time source is accessible.
type: boolean

resources:
AllNodesValidationsImpl:
@@ -31,8 +27,6 @@ resources:
default: {get_param: PingTestIps}
- name: validate_fqdn
default: {get_param: ValidateFqdn}
- name: validate_ntp
default: {get_param: ValidateNtp}
config: |
#!/bin/bash
exit 0


+ 0
- 6
common/deploy-steps.j2 View File

@@ -136,10 +136,6 @@ parameters:
default: false
description: Optional validation to ensure FQDN as set by Nova matches the name set in /etc/hosts.
type: boolean
ValidateNtp:
default: true
description: Validation to ensure at least one time source is accessible.
type: boolean
PingTestIpsMap:
default: ''
description: A map of role name to a space separated list of IP addresses used to ping test each available network interface.
@@ -360,7 +356,6 @@ outputs:
validate_controllers_icmp: {get_param: ValidateControllersIcmp}
validate_gateways_icmp: {get_param: ValidateGatewaysIcmp}
validate_fqdn: {get_param: ValidateFqdn}
validate_ntp: {get_param: ValidateNtp}
ping_test_ips: {get_param: PingTestIpsMap}
stack_action: {get_param: StackAction}
deploy_artifact_urls: {list_join: [' ', {get_param: DeployArtifactURLs}]}
@@ -631,7 +626,6 @@ outputs:
validate_controllers_icmp: "{{ validate_controllers_icmp }}"
validate_gateways_icmp: "{{ validate_gateways_icmp }}"
validate_fqdn: "{{ validate_fqdn }}"
validate_ntp: "{{ validate_ntp }}"
ping_test_ips: "{{ ping_test_ips | to_json }}"
tripleo_role_name: "{{ tripleo_role_name }}"



+ 8
- 0
releasenotes/notes/remove-ValidateNtp-15724eaa8345aa4f.yaml View File

@@ -0,0 +1,8 @@
---
other:
- |
The ValidateNtp has been removed from the all nodes validation configuration.
During the time sync configuration we already do a check to ensure the ntp
servers are available. If they are not we will fail with an appropriate message.
The ValidateNtp option came from a time before we could fail in a more
explicit way.

+ 0
- 40
validation-scripts/all-nodes.sh View File

@@ -88,43 +88,6 @@ function fqdn_check() {
echo "SUCCESS"
}

# run chrony/ntpdate as available
function _run_ntp_sync() {
local NTP_SERVER=$1
if ! type ntpdate 2>/dev/null; then
chronyd -Q "server $NTP_SERVER iburst"
else
ntpdate -qud $NTP_SERVER
fi
}

# Verify at least one time source is available.
function ntp_check() {
NTP_SERVERS=$(hiera ntp::servers nil |tr -d '[],"')
if [[ "$NTP_SERVERS" != "nil" ]];then
echo -n "Testing NTP..."
NTP_SUCCESS=0
for NTP_SERVER in $NTP_SERVERS; do
set +e
NTPDATE_OUT=$(_run_ntp_sync $NTP_SERVER 2>&1)
NTPDATE_EXIT=$?
set -e
if [[ "$NTPDATE_EXIT" == "0" ]];then
NTP_SUCCESS=1
break
else
NTPDATE_OUT_FULL="$NTPDATE_OUT_FULL $NTPDATE_OUT"
fi
done
if [[ "$NTP_SUCCESS" == "0" ]];then
echo "FAILURE"
echo "$NTPDATE_OUT_FULL"
exit 1
fi
echo "SUCCESS"
fi
}

if [[ "${validate_gateways_icmp,,}" == "true" ]];then
ping_default_gateways
fi
@@ -134,6 +97,3 @@ fi
if [[ "${validate_fqdn,,}" == "true" ]];then
fqdn_check
fi
if [[ "${validate_ntp,,}" == "true" ]];then
ntp_check
fi

Loading…
Cancel
Save