Use ansible for nodes validation

The old all nodes validation used a bash script to run some basic ping
tests after the network setup. It used to be a software config but
eventually got baked into the deployment framework. This patch switches
to the ansible role implementation and cleans up the old references to
the old heat resource.

Change-Id: Ia7f055d2c636f950c3fe6d8611834c4ab290f31a
Depends-On: https://review.opendev.org/#/c/747466/
This commit is contained in:
Alex Schultz 2020-08-21 13:43:35 -06:00
parent b24dd5df62
commit 78ca1fe143
18 changed files with 8 additions and 135 deletions

View File

@ -1,45 +0,0 @@
heat_template_version: rocky
description: >
Software Config to drive validations that occur on all nodes.
Note, you need the heat-config-script element built into your
images, due to the script group below.
parameters:
PingTestIps:
default: ''
description: A string containing a space separated list of IP addresses used to ping test each available network interface.
type: string
ValidateControllersIcmp:
default: true
description: Validation to ensure that all controllers can be reached with ICMP
type: boolean
ValidateGatewaysIcmp:
default: true
description: Validation to ensure that all gateways can be reached with ICMP
type: boolean
ValidateFqdn:
default: false
description: Optional validation to ensure FQDN as set by Nova matches the name set in /etc/hosts.
type: boolean
resources:
AllNodesValidationsImpl:
type: OS::Heat::SoftwareConfig
properties:
group: script
inputs:
- name: ping_test_ips
default: {get_param: PingTestIps}
- name: validate_fqdn
default: {get_param: ValidateFqdn}
- name: validate_controllers_icmp
default: {get_param: ValidateControllersIcmp}
- name: validate_gateways_icmp
default: {get_param: ValidateGatewaysIcmp}
config: {get_file: ./validation-scripts/all-nodes.sh}
outputs:
OS::stack_id:
description: The ID of the AllNodesValidationsImpl resource.
value: {get_resource: AllNodesValidationsImpl}

View File

@ -1,37 +0,0 @@
heat_template_version: rocky
description: >
Software Config to drive validations that occur on all nodes.
Note, you need the heat-config-script element built into your
images, due to the script group below.
This implementation of the validations is a noop that always reports success.
parameters:
PingTestIps:
default: ''
description: A string containing a space separated list of IP addresses used to ping test each available network interface.
type: string
ValidateFqdn:
default: false
description: Optional validation to ensure FQDN as set by Nova matches the name set in /etc/hosts.
type: boolean
resources:
AllNodesValidationsImpl:
type: OS::Heat::SoftwareConfig
properties:
group: script
inputs:
- name: ping_test_ips
default: {get_param: PingTestIps}
- name: validate_fqdn
default: {get_param: ValidateFqdn}
config: |
#!/bin/bash
exit 0
outputs:
OS::stack_id:
description: The ID of the AllNodesValidationsImpl resource.
value: {get_resource: AllNodesValidationsImpl}

View File

@ -1,9 +1,6 @@
resource_registry:
OS::TripleO::Controller::Net::SoftwareConfig: ../common/net-config-multinode.yaml
OS::TripleO::Compute::Net::SoftwareConfig: ../common/net-config-multinode.yaml
# Some infra instances don't pass the ping test but are otherwise working.
# Since the OVB jobs also test this functionality we can shut it off here.
OS::TripleO::AllNodes::Validation: ../common/all-nodes-validation-disabled.yaml
OS::TripleO::Services::OVNDBs: ../../deployment/ovn/ovn-dbs-pacemaker-puppet.yaml
parameter_defaults:

View File

@ -1,9 +1,6 @@
resource_registry:
OS::TripleO::Controller::Net::SoftwareConfig: ../common/net-config-multinode.yaml
OS::TripleO::Compute::Net::SoftwareConfig: ../common/net-config-multinode.yaml
# Some infra instances don't pass the ping test but are otherwise working.
# Since the OVB jobs also test this functionality we can shut it off here.
OS::TripleO::AllNodes::Validation: ../common/all-nodes-validation-disabled.yaml
parameter_defaults:
ControllerServices:

View File

@ -1,8 +1,5 @@
# This scenario only install keystone and the required services to run it.
resource_registry:
# Some infra instances don't pass the ping test but are otherwise working.
# Since the OVB jobs also test this functionality we can shut it off here.
OS::TripleO::AllNodes::Validation: ../common/all-nodes-validation-disabled.yaml
OS::TripleO::Services::AodhApi: OS::Heat::None
OS::TripleO::Services::AodhEvaluator: OS::Heat::None
OS::TripleO::Services::AodhListener: OS::Heat::None

View File

@ -28,9 +28,6 @@ resource_registry:
OS::TripleO::Services::HeatApiCfn: ../../deployment/heat/heat-api-cfn-container-puppet.yaml
OS::TripleO::Services::HeatApiCloudwatch: ../../deployment/heat/heat-api-cloudwatch-disabled-puppet.yaml
OS::TripleO::Services::HeatEngine: ../../deployment/heat/heat-engine-container-puppet.yaml
# Some infra instances don't pass the ping test but are otherwise working.
# Since the OVB jobs also test this functionality we can shut it off here.
OS::TripleO::AllNodes::Validation: ../common/all-nodes-validation-disabled.yaml
parameter_defaults:
ControllerServices:

View File

@ -25,9 +25,6 @@ resource_registry:
OS::TripleO::Services::Redis: ../../deployment/database/redis-pacemaker-puppet.yaml
OS::TripleO::Services::CinderBackup: ../../deployment/cinder/cinder-backup-pacemaker-puppet.yaml
OS::TripleO::Services::CinderVolume: ../../deployment/cinder/cinder-volume-pacemaker-puppet.yaml
# Some infra instances don't pass the ping test but are otherwise working.
# Since the OVB jobs also test this functionality we can shut it off here.
OS::TripleO::AllNodes::Validation: ../common/all-nodes-validation-disabled.yaml
OS::TripleO::Services::SwiftProxy: OS::Heat::None
OS::TripleO::Services::SwiftStorage: OS::Heat::None
OS::TripleO::Services::SwiftRingBuilder: OS::Heat::None

View File

@ -21,9 +21,6 @@ resource_registry:
OS::TripleO::Services::CinderBackup: ../../deployment/cinder/cinder-backup-pacemaker-puppet.yaml
OS::TripleO::Services::CinderVolume: ../../deployment/cinder/cinder-volume-pacemaker-puppet.yaml
OS::TripleO::Services::BarbicanBackendSimpleCrypto: ../../deployment/barbican/barbican-backend-simple-crypto-puppet.yaml
# Some infra instances don't pass the ping test but are otherwise working.
# Since the OVB jobs also test this functionality we can shut it off here.
OS::TripleO::AllNodes::Validation: ../common/all-nodes-validation-disabled.yaml
# NOTE(mwhahaha): cheat and use the horizon "service" for our test service
# since disable horizon. This allows us to not have to keep some test service
# in the defaults just for this case.

View File

@ -18,9 +18,6 @@ resource_registry:
OS::TripleO::Services::DesignateWorker: ../../deployment/experimental/designate/designate-worker-container-puppet.yaml
OS::TripleO::Services::DesignateMDNS: ../../deployment/experimental/designate/designate-mdns-container-puppet.yaml
OS::TripleO::Services::Redis: ../../deployment/database/redis-container-puppet.yaml
# Some infra instances don't pass the ping test but are otherwise working.
# Since the OVB jobs also test this functionality we can shut it off here.
OS::TripleO::AllNodes::Validation: ../common/all-nodes-validation-disabled.yaml
parameter_defaults:
Debug: true

View File

@ -27,9 +27,6 @@ resource_registry:
OS::TripleO::Services::Clustercheck: ../../deployment/pacemaker/clustercheck-container-puppet.yaml
OS::TripleO::Services::MySQL: ../../deployment/database/mysql-pacemaker-puppet.yaml
OS::TripleO::Services::LoginDefs: ../../deployment/login-defs/login-defs-baremetal.yaml
# Some infra instances don't pass the ping test but are otherwise working.
# Since the OVB jobs also test this functionality we can shut it off here.
OS::TripleO::AllNodes::Validation: ../common/all-nodes-validation-disabled.yaml
parameter_defaults:
ManagePolling: true

View File

@ -10,9 +10,6 @@ resource_registry:
OS::TripleO::Services::NeutronL3Agent: ../../deployment/neutron/neutron-l3-container-puppet.yaml
OS::TripleO::Services::ComputeNeutronOvsAgent: ../../deployment/neutron/neutron-ovs-agent-container-puppet.yaml
# Some infra instances don't pass the ping test but are otherwise working.
# Since the OVB jobs also test this functionality we can shut it off here.
OS::TripleO::AllNodes::Validation: ../common/all-nodes-validation-disabled.yaml
OS::TripleO::Services::NovaMigrationTarget: OS::Heat::None
OS::TripleO::Services::SwiftProxy: OS::Heat::None
OS::TripleO::Services::SwiftStorage: OS::Heat::None

View File

@ -6,9 +6,6 @@ resource_registry:
OS::TripleO::Services::NeutronOvsAgent: ../../deployment/neutron/neutron-ovs-agent-container-puppet.yaml
OS::TripleO::Services::NeutronDhcpAgent: ../../deployment/neutron/neutron-dhcp-container-puppet.yaml
OS::TripleO::Services::NeutronL3Agent: ../../deployment/neutron/neutron-l3-container-puppet.yaml
# Some infra instances don't pass the ping test but are otherwise working.
# Since the OVB jobs also test this functionality we can shut it off here.
OS::TripleO::AllNodes::Validation: ../../ci/common/all-nodes-validation-disabled.yaml
OS::TripleO::Services::BlockStorageCinderVolume: OS::Heat::None
OS::TripleO::Services::CinderVolume: OS::Heat::None

View File

@ -10,7 +10,6 @@ resource_registry:
OS::TripleO::Services::PacemakerRemote: ../../deployment/pacemaker/pacemaker-remote-baremetal-puppet.yaml
OS::TripleO::Services::Clustercheck: ../../deployment/pacemaker/clustercheck-container-puppet.yaml
OS::TripleO::Services::MySQL: ../../deployment/database/mysql-pacemaker-puppet.yaml
OS::TripleO::AllNodes::Validation: ../common/all-nodes-validation-disabled.yaml
OS::TripleO::Services::OctaviaApi: ../../deployment/octavia/octavia-api-container-puppet.yaml
OS::TripleO::Services::OctaviaHousekeeping: ../../deployment/octavia/octavia-housekeeping-container-puppet.yaml
OS::TripleO::Services::OctaviaHealthManager: ../../deployment/octavia/octavia-health-manager-container-puppet.yaml

View File

@ -5,9 +5,6 @@ resource_registry:
OS::TripleO::Services::CephClient: ../../deployment/ceph-ansible/ceph-client.yaml
OS::TripleO::Services::OsloMessagingRpc: ../../deployment/rabbitmq/rabbitmq-messaging-rpc-pacemaker-puppet.yaml
OS::TripleO::Services::OsloMessagingNotify: ../../deployment/rabbitmq/rabbitmq-messaging-notify-shared-puppet.yaml
# Some infra instances don't pass the ping test but are otherwise working.
# Since the OVB jobs also test this functionality we can shut it off here.
OS::TripleO::AllNodes::Validation: ../common/all-nodes-validation-disabled.yaml
OS::TripleO::Services::OctaviaApi: ../../deployment/octavia/octavia-api-container-puppet.yaml
OS::TripleO::Services::OctaviaHousekeeping: ../../deployment/octavia/octavia-housekeeping-container-puppet.yaml
OS::TripleO::Services::OctaviaHealthManager: ../../deployment/octavia/octavia-health-manager-container-puppet.yaml

View File

@ -6,9 +6,6 @@ resource_registry:
OS::TripleO::Services::IronicApi: ../../deployment/ironic/ironic-api-container-puppet.yaml
OS::TripleO::Services::IronicConductor: ../../deployment/ironic/ironic-conductor-container-puppet.yaml
OS::TripleO::Services::IronicPxe: ../../deployment/ironic/ironic-pxe-container-puppet.yaml
# Some infra instances don't pass the ping test but are otherwise working.
# Since the OVB jobs also test this functionality we can shut it off here.
OS::TripleO::AllNodes::Validation: ../common/all-nodes-validation-disabled.yaml
OS::TripleO::NodeExtraConfigPost: ../common/ironic_standalone_post.yaml
OS::TripleO::Services::CinderVolume: ../../deployment/cinder/cinder-volume-container-puppet.yaml
OS::TripleO::Services::NeutronCorePlugin: OS::TripleO::Services::NeutronCorePluginML2Ansible

View File

@ -2,10 +2,6 @@
resource_registry:
OS::TripleO::Services::Keepalived: OS::Heat::None
OS::TripleO::Services::OsloMessagingRpc: ../../deployment/rabbitmq/rabbitmq-messaging-rpc-container-puppet.yaml
OS::TripleO::Services::OsloMessagingNotify: ../../deployment/rabbitmq/rabbitmq-messaging-notify-shared-puppet.yaml
# Some infra instances don't pass the ping test but are otherwise working.
# Since the OVB jobs also test this functionality we can shut it off here.
OS::TripleO::AllNodes::Validation: ../common/all-nodes-validation-disabled.yaml
OS::TripleO::Services::OctaviaApi: ../../deployment/octavia/octavia-api-container-puppet.yaml
OS::TripleO::Services::OctaviaHousekeeping: ../../deployment/octavia/octavia-housekeeping-container-puppet.yaml
OS::TripleO::Services::OctaviaHealthManager: ../../deployment/octavia/octavia-health-manager-container-puppet.yaml

View File

@ -411,7 +411,6 @@ outputs:
deploy_steps_tasks_step_0: {get_file: deploy-steps-tasks-step-0.yaml}
common_deploy_steps_tasks_step_1: {get_file: deploy-steps-tasks-step-1.yaml}
container_puppet_script: {get_file: ./container-puppet.sh}
all_nodes_validation_script.sh : {get_file: ../validation-scripts/all-nodes.sh}
deploy-artifacts.sh : {get_file: ../puppet/deploy-artifacts.sh}
generate-config-tasks: {get_file: generate-config-tasks.yaml}
host-container-puppet-tasks: {get_file: host-container-puppet-tasks.yaml}
@ -575,14 +574,14 @@ outputs:
tripleo_network_config_async_poll: "{{ async_poll | default(3) }}"
when:
- NetworkConfig_stat.stat.exists
- name: AllNodesValidationConfig
script: all_nodes_validation_script.sh
environment:
validate_controllers_icmp: "{{ validate_controllers_icmp }}"
validate_gateways_icmp: "{{ validate_gateways_icmp }}"
validate_fqdn: "{{ validate_fqdn }}"
ping_test_ips: "{{ ping_test_ips | to_json }}"
tripleo_role_name: "{{ tripleo_role_name }}"
- name: Basic Network Validation
include_role:
name: tripleo_nodes_validation
vars:
tripleo_nodes_validation_validate_controllers_icmp: "{{ validate_controllers_icmp }}"
tripleo_nodes_validation_validate_gateways_icmp: "{{ validate_gateways_icmp }}"
tripleo_nodes_validation_validate_fqdn: "{{ validate_fqdn }}"
tripleo_nodes_validation_ping_test_ips: "{{ ping_test_ips.get(tripleo_role_name).split(' ') | list | unique }}"
tags:
- overcloud
- pre_deploy_steps

View File

@ -92,9 +92,6 @@ resource_registry:
# Service Endpoint Mappings
OS::TripleO::EndpointMap: network/endpoints/endpoint_map.yaml
# validation resources
OS::TripleO::AllNodes::Validation: all-nodes-validation.yaml
OS::TripleO::DeployedServerEnvironment: OS::Heat::None
OS::TripleO::DeploymentSteps: OS::Heat::None